krit.club logo

Three Dimensional Geometry - Direction cosines of a line passing through two points

Grade 12CBSE

Review the key concepts, formulae, and examples before starting your quiz.

🔑Concepts

•

The direction cosines of a line passing through two points P(x1,y1,z1)P(x_1, y_1, z_1) and Q(x2,y2,z2)Q(x_2, y_2, z_2) are determined by the ratios of the differences in coordinates to the distance between the two points. The distance PQPQ is calculated using the 3D distance formula: PQ=(x2−x1)2+(y2−y1)2+(z2−z1)2PQ = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}.

A line segment PQ in 3D space illustrating the displacement between two points.
•

Direction ratios (a,b,c)(a, b, c) of the line PQPQ are the differences in the respective coordinates: a=x2−x1a = x_2 - x_1, b=y2−y1b = y_2 - y_1, and c=z2−z1c = z_2 - z_1. Direction cosines (l,m,n)(l, m, n) are then obtained by normalizing these ratios: l=aPQl = \frac{a}{PQ}, m=bPQm = \frac{b}{PQ}, and n=cPQn = \frac{c}{PQ}.

Diagram showing the angle alpha between a line and the X-axis.
•

A line has two sets of direction cosines depending on the direction of travel (PP to QQ vs QQ to PP). These sets are (l,m,n)(l, m, n) and (−l,−m,−n)(-l, -m, -n).

Bi-directional arrow showing that direction cosines can have opposite signs depending on direction.
•

The sum of the squares of the direction cosines is always unity: l2+m2+n2=1l^2 + m^2 + n^2 = 1. This property acts as a useful verification step after computing the cosines of a line segment.

A unit circle/sphere representing the identity that the sum of squares of direction cosines equals one.

📐Formulae

PQ=(x2−x1)2+(y2−y1)2+(z2−z1)2PQ = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}

l=x2−x1PQl = \frac{x_2 - x_1}{PQ}

m=y2−y1PQm = \frac{y_2 - y_1}{PQ}

n=z2−z1PQn = \frac{z_2 - z_1}{PQ}

l2+m2+n2=1l^2 + m^2 + n^2 = 1

💡Examples

Problem 1:

Find the direction cosines of the line passing through the points A(−2,4,−5)A(-2, 4, -5) and B(1,2,3)B(1, 2, 3).

Solution:

Let the points be P(x1,y1,z1)=(−2,4,−5)P(x_1, y_1, z_1) = (-2, 4, -5) and Q(x2,y2,z2)=(1,2,3)Q(x_2, y_2, z_2) = (1, 2, 3). Step 1: Calculate the direction ratios: x2−x1=1−(−2)=3x_2 - x_1 = 1 - (-2) = 3 y2−y1=2−4=−2y_2 - y_1 = 2 - 4 = -2 z2−z1=3−(−5)=8z_2 - z_1 = 3 - (-5) = 8 Step 2: Calculate the distance PQPQ: PQ=32+(−2)2+82=9+4+64=77PQ = \sqrt{3^2 + (-2)^2 + 8^2} = \sqrt{9 + 4 + 64} = \sqrt{77} Step 3: Calculate the direction cosines: l=377,m=−277,n=877l = \frac{3}{\sqrt{77}}, m = \frac{-2}{\sqrt{77}}, n = \frac{8}{\sqrt{77}}

Explanation:

First, we find the differences between the coordinates to get the direction ratios. Then, we find the magnitude of the segment. Dividing each ratio by the magnitude gives the direction cosines.

Problem 2:

Find the direction cosines of the line passing through the origin (0,0,0)(0, 0, 0) and the point (2,3,6)(2, 3, 6).

Solution:

Points are O(0,0,0)O(0, 0, 0) and P(2,3,6)P(2, 3, 6). Direction ratios are (2−0,3−0,6−0)=(2,3,6)(2-0, 3-0, 6-0) = (2, 3, 6). Distance OPOP: OP=22+32+62=4+9+36=49=7OP = \sqrt{2^2 + 3^2 + 6^2} = \sqrt{4 + 9 + 36} = \sqrt{49} = 7 Direction cosines are: l=27,m=37,n=67l = \frac{2}{7}, m = \frac{3}{7}, n = \frac{6}{7}

Explanation:

When one point is the origin, the direction ratios are simply the coordinates of the second point. The magnitude is the distance from the origin to that point.

Problem 3:

Calculate the direction cosines of the line segment joining the points A(4,3,−5)A(4, 3, -5) and B(−2,1,−8)B(-2, 1, -8).

Line segment AB between given coordinates.

Solution:

  1. Find the direction ratios a,b,ca, b, c: a=x2−x1=−2−4=−6a = x_2 - x_1 = -2 - 4 = -6 b=y2−y1=1−3=−2b = y_2 - y_1 = 1 - 3 = -2 c=z2−z1=−8−(−5)=−3c = z_2 - z_1 = -8 - (-5) = -3

  2. Calculate the distance ABAB: AB=(−6)2+(−2)2+(−3)2AB = \sqrt{(-6)^2 + (-2)^2 + (-3)^2} AB=36+4+9=49=7AB = \sqrt{36 + 4 + 9} = \sqrt{49} = 7

  3. Calculate the direction cosines (l,m,n)(l, m, n): l=−67,m=−27,n=−37l = \frac{-6}{7}, m = \frac{-2}{7}, n = \frac{-3}{7}

Explanation:

Direction cosines are the ratios of the coordinate differences to the total length of the segment. Here, we first find the vector components (direction ratios) and then divide by the magnitude of the segment.

Problem 4:

A line passes through P(1,1,1)P(1, 1, 1) and Q(2,3,3)Q(2, 3, 3). Find its direction cosines.

Line segment PQ with distance marked as 3.

Solution:

  1. Direction ratios (a,b,c)(a, b, c): a=2−1=1a = 2 - 1 = 1 b=3−1=2b = 3 - 1 = 2 c=3−1=2c = 3 - 1 = 2

  2. Distance PQPQ: PQ=12+22+22=1+4+4=9=3PQ = \sqrt{1^2 + 2^2 + 2^2} = \sqrt{1 + 4 + 4} = \sqrt{9} = 3

  3. Direction cosines: l=13,m=23,n=23l = \frac{1}{3}, m = \frac{2}{3}, n = \frac{2}{3}

Explanation:

To find the direction cosines, we first compute the differences in the x, y, and z coordinates of the two points to get the direction ratios, then divide by the Euclidean distance between them.