# Vectors

A Vector is a quantity that has magnitude and direction   2D vector
3D vector
and that is commonly represented by a directed line segment whose length represents the magnitude and whose orientation in space represents the direction. Generally, a vector is  an element of a vector space.

vCalc's Vector library  contains basic vector mathematics demonstrating vectors in 2D and 3D (examples).  The functions for 2D vectors use vecA and vecB.  The functions for 3D vectors use vecU, vecV, and vecW.

The convention of an arrow over the name, as in vecV indicates a vector quantity.  A hat over the name, as in hatV, implies a unit vector.

## Vectors Equations

• cos theta = (Deltax)/|Deltar|
• Delta x = |Deltar|* cos theta
• Delta y = |Deltar|* sin theta
• Deltax_t = Deltax_1 + Deltax_2
• Deltay_t = Deltay_1 + Deltay_2
• sin theta = (Deltay)/|Deltar|
• theta = cos^-1(hatA * hatB)
• theta = tan^(-1)((Deltay)/(Deltax))
• vecA * vecB
• vecA + vecB
• vecA - vecB
• |r| = sqrt(Deltax^2 + Deltay^2)
• |vecA + vecB|
• Magnitude of Position Vector
• Quaternion Conjugate
• Quaternion Inverse
• Quaternion Magnitude
• Quaternion Multiplication
• Quaternion of Rotation
• Quaternion Subtraction
• Quaternion Versor
• V2 - Vector (x component)
• V2 - Vector (y component)
• V2 - Vector addition by components
• V2 - Vector addition orthogonal vectors (magnitude)
• V2 - Vector addition orthogonal vectors (x,y)
• V3 (l) - scalar multiplcation
• V3 - Angle between vectors
• V3 - cartesian to cylindrical
• V3 - cartesian to spherical
• V3 - cylindrical to cartesian
• V3 - scalar division
• V3 - scalar multiplication
• V3 - spherical to cartesian
• V3 - Unit Vector
• V3 - V + U
• V3 - V - U
• V3 - V dot U
• V3 - V x U
• V3 - Vector Magnitude
• V3 - Vector Norm
• V3 - Vector Projection
• V3 - Vector Rotation
• V3 - |V+U|
• V3 - |V-U|
• V3 - |V|
• Vector Sum of Forces (2D)
• 4-Vector Norm
• 5-Vector Norm
• Conversion from Cartesian Coordinates to Cylindrical Coordinates
• Conversion from Cartesian Coordinates to Spherical Coordinates
• Conversion from Cartesian to Polar Coordinates
• Distance (Velocity Vector, Time)
• Dot Product