# Direction Cosines and Direction Ratios

Last Updated : 23 Apr, 2024

Usually, for three-dimensional geometry, we rely on the three-dimensional Cartesian plane. Vectors can also be used to describe the lines and the angles they make with the axis. How should we describe a line passing through the origin making an angle with different axes? We define them using cosine ratios of the line. While working with three-dimensional geometry (used in so many applications such as game designing), it is required to describe the significance of the line present in 3-D space.

### Direction Cosines and Direction Ratios of a LineÂ

Let’s assume a line OA that is passing through the origin and makes anglesÂ Î±, Î², andÂ Î³ with x, y, and z-axis respectively, called direction angles. The cosines of these anglesÂ cos(Î±), cos(Î²), andÂ cos(Î³) are called directional cosines of the directed line OA. The figure given below shows the line OA passing through the origin and all the angles it makes with the coordinate axes.Â

Note: The line can extend in both the directions, and there can be two sets of angles that it makes with coordinate axes. The line makes Î±, Î², andÂ Î³ and their supplementsÂ [Tex]\pi – \alpha, Â \pi -\beta[/Tex], andÂ [Tex]\pi – \gamma[/Tex]Â with the coordinate axes. Now the signs of the directional cosines will be reversed. So, to have unique directional cosines, we choose to make it a directed line.Â

Let’s say the directional cosines of the lines are l, m, and n.

### Direction Ratios

Numbers that are proportional to the direction cosines of the line are called direction ratios of the line. We have assumed l, m, and n as the directional cosines of the lines. Let’s say a, b and c are the directional ratios of the line. Then,Â

l = k Ã— a, m = k Ã— b and n = k Ã— c

[Tex]\frac{l}{a} = \frac{m}{b} = \frac{n}{c} = k[/Tex]

Where k is any constant.Â

Now we know that,Â

l2 + m2 + n2 = 1

â‡’k2(a2 + b2 + c2) = 1

â‡’ k =Â [Tex]\pm \frac{1}{a^2 + b^2 + c^2}[/Tex]

So, now the directional cosines of a line are,Â

l =Â [Tex]Â \pm \frac{a}{a^2 + b^2 + c^2}[/Tex], m =[Tex]Â \pm \frac{b}{a^2 + b^2 + c^2}[/Tex]Â and n =Â [Tex]\pm \frac{c}{a^2 + b^2 + c^2}[/Tex]

### Relation between Directional Cosines Â

Let’s assume we have a line BC that has directional cosines l, m, and n. Draw a line through the origin that is parallel to this line and let’s take A(x, y, z) a point on this line. We draw a perpendicular from A to the x-axis.Â

Let OA = r.Â

[Tex]cos(\alpha) = \frac{OA}{OP} = \frac{x}{r}[/Tex]

So, x = lr and similarly, y = mr and z = nr.Â

x2 + y2 + z2 = r2(l2 + m2 + n2)Â

We know that distance of (x, y,z) from origin is r.Â

x2 + y2 + z2 = r2

Thus,

l2 + m2 + n2Â  = 1

### Direction cosines of the lines passing through two points

Imagine we have two points A(x1,y1,z1) and B(x2, y2, z2) and a line passes through them. Our goal is to determine the directional cosines of the line that is passing through these points. Let l, m, and n be the directional cosines of the line AB and let’s say the angles they make with the x,y and z axes respectively are Î±, Î², andÂ Î³.

In the figure given above, perpendiculars are drawn from the line AB to the XY plane, and they reach the XY plane at CD. Another perpendicular should be drawn from A to BD which meets BD and N. So, now in the triangle ANB, âˆ ABN is Î³.Â

[Tex]cos(\gamma) = \frac{BN}{AB} = \frac{z_2 – z_1}{AB}[/Tex]

In the same way,Â

[Tex]cos(\alpha) = \frac{x_2 – x_1}{AB}[/Tex]Â andÂ [Tex]cos(\beta) = \frac{y_2 – y_1}{AB}[/Tex]

So, the directional cosines of the line joining AB are,Â

[Tex]\frac{x_2 – x_1}{AB}, \frac{y_2 – y_1}{AB}, \frac{z_2 – z_1}{AB}[/Tex]

Here, AB =Â [Tex]\sqrt{(x_2 – x_1)^2 + (y_2 – y_1)^2 + (z_2 – z_1)^2}[/Tex]

Let’s see some sample problems based on these concepts,Â

### Sample Problems

Question 1: Find the directional cosines of the x, y, and z-axis.Â

Solution:Â

The x-axis makes an angle of 90Â°, 90Â° and 0Â° with the coordinate axes. We know that the direction cosines are basically cosines of the angle the line makes with different axes.Â

l = cos(0Â°) m = cos(90Â°) and n = cos(90Â°)

Thus,Â

l = 1, m = n = 0 Â

Similarly, for y-axis,Â

l = 0, m = 1 and n = 0Â

and for z-axisÂ

l = 0, m = 0 and n = 1.Â

Question 2: Find the directional cosines for a line that makes 30Â°, 60Â°, and 90Â° with the x, y, and z axes respectively.Â

Solution:Â

Directional cosines for the given line are,Â

l = cos(30Â°) ; m = cos(60Â°) and n = cos(90Â°)Â

â‡’ l =Â [Tex]\frac{\sqrt{3}}{2}[/Tex]Â ; m =Â [Tex]\frac{1}{2}[/Tex]Â and n = 0

Question 3: Let’s say we have a line with direction ratios 4, 2, -4. Calculate the direction cosines for this line.Â

Solution:

Given direction ratios: a = 4 , b = 2 , c = -4

l = 4 / âˆš[ 42 + 22 + (-4) ] , m = 2 / âˆš[ 42 + 22 + (-4) ] , n = -4/ âˆš[42 + 22 + (-4)2 ) ]

â‡’ l = 4 / âˆš 16 + 4 + 16, m = 2 / âˆš16+ 4 + 16 , n = -4/ âˆš 16 + 4 + 16

â‡’ l = 4/âˆš36 , m = 2/âˆš36 , n = -4/âˆš36

â‡’ l = 4/6 , m = 2/6 , n = -2/3

â‡’ l = 2/3, m = 1/3, n = -2/3

So, the correct directional cosines for the given line are ( 2/3 , 1/3 , -2/3)

Question 4: Let’s say we have a line with direction ratios 0, 1, 0. Calculate the direction cosines for the line.Â

Solution:Â

Given direction ratios: 0, 1, and 0.Â

The formula for directional cosines from direction ratios is given by,Â

l =[Tex]Â \frac{a}{\sqrt{a^2 + b^2 + c^2}}[/Tex], m =[Tex]Â \frac{b}{\sqrt{a^2 + b^2 + c^2}}[/Tex]Â and n =Â [Tex]\frac{c}{\sqrt{a^2 + b^2 + c^2}}[/Tex]

Here, a = 0, b = 1 and c =0.Â

l =Â [Tex]Â \frac{0}{\sqrt{0^2 + 1^2 + 0^2}}[/Tex], m =[Tex]Â  \frac{1}{\sqrt{0^2 + 1^2 + (0)^2}}[/Tex]Â  and n =Â [Tex]\frac{0}{\sqrt{0^2 + 1^2 + 0^2}}[/Tex]

l = 0

m =Â 1

n =Â 0

Question 5: Find the direction cosines of the lines passing through (1, 1, 1) and (3, 3, 3).Â

Solution:Â

Let’s say these points are A(1,1,1) and B(3,3,3). Â We know for any two points on the line AB, the direction cosines are given by,Â

[Tex]\frac{x_2 – x_1}{AB}, \frac{y_2 – y_1}{AB}, \frac{z_2 – z_1}{AB}[/Tex]

Here, AB =Â [Tex]\sqrt{(x_2 – x_1)^2 + (y_2 – y_1)^2 + (z_2 – z_1)^2}[/Tex]

Here, (x1,y1,z1) = (1,1,1) and (x2,y2,z2) = (3,3,3)Â

AB =Â [Tex]\sqrt{(x_2 – x_1)^2 + (y_2 – y_1)^2 + (z_2 – z_1)^2}[/Tex]

Â  Â  Â  =Â [Tex]\sqrt{(3-1)^2 + (3 – 1)^2 + (3 -1)^2}[/Tex]

Â  Â  Â  =Â [Tex]\sqrt{4+ 4 + 4}[/Tex]

Â  Â  Â  =Â [Tex]\sqrt{12}[/Tex]

Â  Â  Â  = 2âˆš3

[Tex]\frac{3-1}{AB}, \frac{3 – 1}{AB}, \frac{3 – 1}{AB}[/Tex]

â‡’Â [Tex]\frac{3-1}{2\sqrt{3}}, \frac{3 – 1}{2\sqrt{3}}, \frac{3 – 1}{2\sqrt{3}}[/Tex]

â‡’[Tex]\frac{1}{\sqrt{3}}, \frac{1}{\sqrt{3}}, \frac{1}{\sqrt{3}}[/Tex]

Previous
Next