Posts

Showing posts from July, 2026

Deriving the Direction Cosines of a Unit Vector

Direction Cosines of a Unit Vector A vector in 3D can be written as v = (x, y, z). This vector points from the origin to the point (x, y, z). Its direction depends on how much it travels in the x-direction, the y-direction and the z-direction. Magnitude of the Vector The magnitude, or length, of v is |v| = √(x² + y² + z²). This comes from the 3D version of Pythagoras' theorem. The vector has three perpendicular components: x, y and z. Squaring them, adding them, and taking the square root gives the total length. Unit Vector A unit vector is a vector with length 1. To turn v into a unit vector, divide every component by the magnitude of v: v̂ = (1 / |v|)(x, y, z). So v̂ = (x / |v|, y / |v|, z / |v|). This new vector points in the same direction as v, but its length is exactly 1. The Dot Product The dot product has two important forms. Algebraic form: a · b = a₁b₁ + a₂b₂ + a₃b₃. Geometric form: a · b = |a||b|cos(θ). The algebraic form uses co...