 # Direction Cosines

In analytical geometry, the directional cosines also known as direction cosine of a vector is defined as the cosines of the angles between the three coordinate axes and the vector.  In this section, we will first learn about the position vector of a point and direction cosines and then finding the angle between two lines.

Position Vector

If O is taken as reference origin and A is an arbitrary point in space then the vector $$\vec{OA}$$ is called as the position vector of the point.

Position vector simply denotes the position or location of a point in the three-dimensional Cartesian system with respect to a reference origin.

## Direction cosines and Angle between two lines

Let us consider a point P lying in space and if its position vector makes positive angles (anticlockwise direction) of α, β and γ with the positive x,y and z-axis respectively, then these angles are known as direction angles and on taking the cosine of these angles we get direction cosines. Taking direction cosines makes it easy to represent the direction of a vector in terms of angles with respect to the reference.

The coordinates of the point P may also be expressed as the product of the magnitude of the given vector and the cosines of direction on the three axes, i.e.

$$x = l| \vec{r} |$$

$$y = m| \vec{r} |$$

$$z = n| \vec{r} |$$

Where l, m, n represent the direction cosines of the given vector on the axes x, y, z respectively. We can clearly see that lr, mr, nr are in proportion to the direction cosines and these are called as the direction ratios and they are denoted by a, b, c.

Let L1 and L2 represent two lines having the direction ratios as a1, b1, c1 and a2, b2, c2 respectively such that they are passing through the origin. Let us choose a random point An on the line L1 and B on the line L2. Considering the directed lines OA and OB as shown in the figure given below, let the angle between these lines be θ. Using the concept of direction cosines and direction ratios, the angle θ between L1 and L2 is given by: In terms of sin θ = $$\sqrt{(1 – cos^2 θ)}$$

Therefore, ### Special Cases

• If L1 and L2 having the direction ratios as a1, b1, c1 and a2, b2, c2 respectively are perpendicular to each other, then θ = 900. Therefore, a1a2 + b1b2 + c1c2 = 0
• If L1 and L2 having the direction ratios as a1, b1, c1 and a2, b2, c2 respectively are parallel to each other, then θ = 00. Therefore, $$\frac{a_1}{a_2}$$ = $$\frac{b_1}{b_2}$$ = $$\frac{c_1}{c_2}$$

### How to Find the Direction Cosine?

The direction cosine of the vector can be determined by dividing the corresponding coordinate of a vector by the vector length. The unit vector coordinates is equal to the direction cosine. One such property of the direction cosine is that the addition of the squares of the direction cosines is equivalent to one.