Direction Cosine
Direction cosine is the cosine of the angle made by the line in the threedimensional space, with the xaxis, yaxis, zaxis respectively. Direction cosines can be calculated for a vector or a straight line in a threedimensional space. It is the cosines of the angle made by the line with the three axes.
Let us learn more about the direction cosine, the relationship between the direction cosines, and the direction cosine of a line connecting two points in a threedimensional space.
What Is Direction Cosine?
Direction Cosine gives the relation of a vector or a line in a threedimensional space, with each of the three axes. The direction cosine is the cosine of the angle subtended by this line with the xaxis, yaxis, and zaxis respectively. If the angles subtended by the line with the three axes are α, β, and γ, then the direction cosines are Cosα, Cosβ, Cosγ respectively.
The direction cosines for a vector \(\overrightarrow A = a \hat i + b \hat j + c \ \hat k\) is Cosα = \(\frac{a}{\sqrt {a^2 + b^2 + c^2}}\), Cosβ = \(\frac{b}{\sqrt {a^2 + b^2 + c^2}}\), Cosγ = \(\frac{c}{\sqrt {a^2 + b^2 + c^2}}\). The direction cosines are also represented by l, m, n and we often represent the direction cosines as l = \(\frac{a}{\sqrt {a^2 + b^2 + c^2}}\), m = \(\frac{b}{\sqrt {a^2 + b^2 + c^2}}\), n = \(\frac{c}{\sqrt {a^2 + b^2 + c^2}}\).
The direction cosine for a point A (a, b, c) in a threedimensional space is the direction cosine of the line connecting this point with the origin O. The direction cosine of the line OA is l = \(\frac{a}{\sqrt {a^2 + b^2 + c^2}}\), m = \(\frac{b}{\sqrt {a^2 + b^2 + c^2}}\), n = \(\frac{c}{\sqrt {a^2 + b^2 + c^2}}\).
Relationship Between Direction Cosines
The direction cosines of a line joining the point(a, b, c) with the origin is Cosα, Cosβ, Cosγ respectively, and the distance of this point from the origin be r. Here the values of these direction cosines areCosα = a/r, Cosβ=b/r, Cosγ=c/r.The value of distance r is \(\sqrt {a^2 + b^2 + c^2}\). Here we aim at finding the relationship between the direction cosines of this point. Let us square and add the direction cosines of the point.
Cos^{2}α + Cos^{2}β + Cos^{2}γ = a^{2}/r^{2} + b^{2}/r^{2} + c^{2}/r^{2}
Cos^{2}α + Cos^{2}β + Cos^{2}γ = (a^{2} + b^{2} + c^{2})/r^{2}
But we have r^{2} = \(a^2 + b^2 + c^2\). Substituting this in the above expression we have.
Cos^{2}α + Cos^{2}β + Cos^{2}γ = r^{2}/r^{2}
Cos^{2}α + Cos^{2}β + Cos^{2}γ = 1
Let us now consider l = Cosα, m = Cosβ, n = Cosγ. Hence we have the relationship between the direction cosines as l^{2} + m^{2} + n^{2} = 1.
Direction Cosine in Three Dimensional Geometry
The direction cosine of a line joining two points (\(x_1, y_1, z_1\)), and (\(x_2, y_2, z_2\)), can be easily computed using the direction ratios of the lines joining these two points, and by finding the distance between these two points. The direction ratio of the line joining these two points is \(x_2  x_1\), \(y_2  y_1\), \(z_2  z_1\). And the distance between these two points is \(\sqrt {(x_2  x_1)^2 + (y_2  y_1)^2 + (z_2 z_1)^2} \).
The direction cosine of a line is calculated by dividing the respective direction ratios with the distance between the two points. The formula for the direction cosines for a line joining two points is as follows.
Direction Cosines = \(\left(\dfrac{x_2  x_1}{\sqrt {(x_2  x_1)^2 + (y_2  y_1)^2 + (z_2 z_1)^2}}, \dfrac{y_2  y_1}{\sqrt {(x_2  x_1)^2 + (y_2  y_1)^2 + (z_2 z_1)^2}}, \dfrac{z_2  z_1}{\sqrt {(x_2  x_1)^2 + (y_2  y_1)^2 + (z_2 z_1)^2}}\right)\)
Related Topics
The following topics help in a better understanding of direction cosines.
Examples on Direction Cosine

Example 1: Find the direction cosine of the line joining the point (4, 2, 3), with the origin.
Solution:
For the line joining the origin (0, 0, 0), and the point(4, 2, 3), the direction ratios are 4, 2, 3.
The magnitude of the line = \(\sqrt{(4)^2 + 2^2 + 3^2)} = \sqrt{29}\)
Hence the direction cosines are (4/√29, 2/√29, 3/√29).
Therefore the direction cosines are (4/√29, 2/√29, 3/√29).

Example 2: Find the direction cosine of the line with respect to the zaxis, if two of the other direction cosines are 4/3√5, and 2/3√5.
Solution:
The given two direction cosines are 4/3√5, and 2/3√5. The direction cosine with respect to the zaxis would be c/3√5.
Also we know that the magnitude of this line is \(\sqrt {a^2 + b^2 + c^2}\), and here we have a = 4, b = 2, and the magnitude of the line = 3√5.
\(\sqrt{(4)^2 + 2^2 + c^2} \) = 3√5
\(\sqrt{16 + 4 + c^2} = \sqrt{45}\)
\(\sqrt{20 + c^2} = \sqrt{45}\)
20 + c^{2} = 45
C^{2} =25, and c = 5.
The direction cosine of the zaxis is 5/3√5 = √5/3.
Therefore the direction cosine of the line with respect to the zaxis is √5/3.
FAQs on Direction Cosine
How Do You Find Direction Cosines?
The direction cosine for a vector or a line is a three dimension space can be calculated from the direction ratio, and the magnitude of the vector. The direction cosine for a point A (a, b, c) in a threedimensional space is the direction cosine of the line connecting this point with the origin O. The direction cosine of the line OA is l = \(\frac{a}{\sqrt {a^2 + b^2 + c^2}}\), m = \(\frac{b}{\sqrt {a^2 + b^2 + c^2}}\), n = \(\frac{c}{\sqrt {a^2 + b^2 + c^2}}\).
What Is Direction Cosine and Direction Ratios?
The direction cosines can be calculated by dividing the respective direction ratios with the magnitude of the vector. The direction ratios of a line joining the point point A (a, b, c) with the origin in the three dimensional frame is a, b, c respectively, and the direction ratios are \(\left(\frac{a}{\sqrt {a^2 + b^2 + c^2}}, \frac{b}{\sqrt {a^2 + b^2 + c^2}}, \frac{c}{\sqrt {a^2 + b^2 + c^2}} \right)\).
What Are the Direction Cosines of 2i + 3j + 4k?
The direction ratios of the vector 2i = 3j + 4k is 2, 3, 4, and the magnitude of the vector is \(\sqrt{2^2 + 3^2 + 4^2} = \sqrt{29}\). Hence the direction cosines of the vector is (2/√29, 3/√29, 4/√29).
visual curriculum