Direction cosine

From HandWiki
Short description: Cosines of the angles between a vector and the coordinate axes

In analytic geometry, the direction cosines (or directional cosines) of a vector are the cosines of the angles between the vector and the three positive coordinate axes. Equivalently, they are the contributions of each component of the basis to a unit vector in that direction.

Three-dimensional Cartesian coordinates

Vector v in 3
Direction cosines and direction angles for the unit vector 𝐯|𝐯|

If v is a Euclidean vector in three-dimensional Euclidean space, 3,

𝐯=vx𝐞x+vy𝐞y+vz𝐞z,

where ex, ey, ez are the standard basis in Cartesian notation, then the direction cosines are

α=cosa=𝐯𝐞x𝐯=vxvx2+vy2+vz2,β=cosb=𝐯𝐞y𝐯=vyvx2+vy2+vz2,γ=cosc=𝐯𝐞z𝐯=vzvx2+vy2+vz2.

It follows that by squaring each equation and adding the results

cos2a+cos2b+cos2c=α2+β2+γ2=1.

Here α, β, γ are the direction cosines and the Cartesian coordinates of the unit vector 𝐯|𝐯|, and a, b, c are the direction angles of the vector v.

The direction angles a, b, c are acute or obtuse angles, i.e., 0 ≤ a ≤ π, 0 ≤ bπ and 0 ≤ cπ, and they denote the angles formed between v and the unit basis vectors ex, ey, ez.

General meaning

More generally, direction cosine refers to the cosine of the angle between any two vectors. They are useful for forming direction cosine matrices that express one set of orthonormal basis vectors in terms of another set, or for expressing a known vector in a different basis. Simply put, direction cosines provide an easy method of representing the direction of a vector in a Cartesian coordinate system.

Applications

Determining angles between two vectors

Let u and v have direction cosines (αu, βu, γu) and (αv, βv, γv), respectively, having an angle θ between them. Their unit vectors areu^=ux𝐮𝐞x+uy𝐮𝐞y+uz𝐮𝐞z=αu𝐞x+βu𝐞y+γu𝐞zv^=vx𝐯𝐞x+vy𝐯𝐞y+vz𝐯𝐞z=αv𝐞x+βv𝐞y+γv𝐞zrespectively.

Taking the scalar product of these two unit vectors yield,u^v^=αuαv+βuβv+γuγv.The geometric interpretation of the scalar product of these two unit vectors is equivalent to the projection of one vector onto another; linking the two definitions we find the following.

αuαv+βuβv+γuγv=cosθ

There exist two choices for θ (because cosine is odd); one is acute, another is the obtuse angle between them. The convention is to choose the acute, so we take the absolute value of the scalar product.θ=arccos(|αuαv+βuβv+γuγv|).

See also

References