Vector Tests
Explanations and demonstrations of basic vector math.
Vector Projection & Rejection
The figure on the right is an interactive test of vector projection and rejection. Click and drag one of the circles to adjust the vectors.
Vector Projection
The following shows the calculation for the projection of $u$ onto $v$:
$u_1 = proj_v(u) = \frac {u \cdot v}{||v||^2} v$
Vector Rejection:
The following shows the calculation for the rejection of $u$ from $v$:
$u_2 = u - \frac {u \cdot v}{||v||^2} v = u - u_1$
Vector Rotation
Vector Rotation:
The following shows the calculation for the rotation of a vector $v$ by $θ$ radians:
$v_x = cos(θ)*v_x - sin(θ)*v_y$
$v_y = sin(θ)*v_x + cos(θ)*v_y$
Angle Between Vectors:
The following shows how to calculate the angle, in radians, between vectors $u$ and $v$:
$θ = arccos(\frac{u \cdot v}{||u|| \ ||v||})$