5.6. Vector Magnitude#
The magnitude of a vector is it’s length. Vector magnitudes are always positive or zero.
2D Magnitude#
The magnitude of a 2D vector is given by:
\[ \lvert\vec{A}\rvert = A = \sqrt{A_{x}^2 + A_{y}^2} \]
3D Magnitude#
The magnitude of a 3D vector is given by:
\[ \lvert\vec{A}\rvert = A = \sqrt{A_{x}^2 + A_{y}^2 + A_{z}^2} \]
We still square the components and take the square root of the sum, even though 3D vectors have 3 components.
Angle of a 2D vector#
The angle \(\alpha\) of a vector relative +CCW (positive counter clockwise) from the +x-axis can be found using the tangent of the components.
\[ \alpha = \tan^-1\left(\frac{A_y}{A_x}\right) \]