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 L_{1} and L_{2} represent two lines having the direction ratios as a_{1}, b_{1}, c_{1} and a_{2}, b_{2}, c_{2} respectively such that they are passing through the origin. Let us choose a random point An on the line L_{1} and B on the line L_{2}. 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 L_{1} and L_{2} is given by:

In terms of sin Î¸ = \(\sqrt{(1 â€“ cos^2 Î¸)}\)

Therefore,

### Special Cases

- If L
_{1}and L_{2}having the direction ratios as a_{1}, b_{1}, c_{1}and a_{2}, b_{2}, c_{2}respectively are perpendicular to each other, then Î¸ = 90^{0}. Therefore,Â*a*_{1}a_{2}+ b_{1}b_{2}+ c_{1}c_{2}= 0

- If L
_{1}and L_{2}having the direction ratios as a_{1}, b_{1}, c_{1}and a_{2}, b_{2}, c_{2}respectively are parallel to each other, then Î¸ = 0^{0}. 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.

To learn more about direction cosines and similar concepts, download BYJU’S â€“ The Learning app.