Skip to content
Worked Examples · Example 3

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

Punjab PsebTextbookSubjective· 2mImportance★★★★★
Appeared in past exams:AP EAPCET 2021· Set eng-2021-08-20-AN· 1mreworded
12% · 8/68 Questions
🔒 Locked · start free trial →

You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.

Start your 14-day free trial to unlock the full solution →

The direction cosines of a line are the cosines of the angles it makes with the coordinate axes. For the line through (−2,4,−5)(-2,4,-5) and (1,2,3)(1,2,3), the direction ratios are (3,−2,8)(3, -2, 8), and the direction cosines are (377,−277,877)\left( \frac{3}{\sqrt{77}}, -\frac{2}{\sqrt{77}}, \frac{8}{\sqrt{77}} \right).

Why Direction Cosines? The Core Idea

A line in 3D space doesn't have a unique "starting point" — it's defined by its direction. Direction cosines capture that direction in a pure, unit-free way. They are the cosines of the three angles the line makes with the positive xx, yy, and zz axes. Because they come from a unit vector along the line, they always satisfy the beautiful relation:

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

where l,m,nl, m, n are the direction cosines. This is the Pythagorean theorem in 3D for a vector of length 1.

The trick: we first find the direction ratios (any numbers proportional to the direction cosines) by subtracting coordinates. Then we normalise them to get the actual cosines.


Step-by-Step Solution

1. Find the direction ratios of the line.

The direction ratios (DRs) are simply the differences in the coordinates of the two given points. If a line passes through A(x1,y1,z1)A(x_1, y_1, z_1) and B(x2,y2,z2)B(x_2, y_2, z_2), the DRs are (x2−x1,y2−y1,z2−z1)(x_2 - x_1, y_2 - y_1, z_2 - z_1).

Here, A=(−2,4,−5)A = (-2, 4, -5) and B=(1,2,3)B = (1, 2, 3).

So:

  • xx-difference: 1−(−2)=31 - (-2) = 3
  • yy-difference: 2−4=−22 - 4 = -2
  • zz-difference: 3−(−5)=83 - (-5) = 8

Thus the direction ratios are (3,−2,8)(3, -2, 8).

Watch out

A common mistake is to subtract in the wrong order or to forget the sign when subtracting a negative. Always do B−AB - A consistently. If you did A−BA - B, you'd get (−3,2,−8)(-3, 2, -8), which is also valid — it just points in the opposite direction. The cosines would all flip sign, but the line is the same.

2. Compute the magnitude (length) of this direction vector. …

Unlock everything free for 14 days

  • Full step-by-step solutions
  • Concept-first explanations
  • Methods, shortcuts & mistakes
  • PYQ mapping + timed mock tests

Full access for 14 days. No credit card required.