Skip to content
MathsISC Class 12 · Three-dimensional Geometry

Direction Cosines and Direction Ratios of a Line

Updated 15 October 2026 · Fact-checked

If a line makes angles α, β, γ with the positive axes, its direction cosines are $l = \cos\alpha$, $m = \cos\beta$, $n = \cos\gamma$, with $l^2 + m^2 + n^2 = 1$. Direction ratios are any numbers a, b, c proportional to l, m, n; dividing each by $\sqrt{a^2 + b^2 + c^2}$ gives the direction cosines.

Understand Direction Cosines and Direction Ratios

Direction angles. Draw a line through the origin in the direction of a given directed line. The angles it makes with the positive x, y and z axes are its direction angles, each between and . Their cosines , , are the direction cosines (DCs). Reversing the direction replaces each angle by its supplement, so the DCs of the same (undirected) line are .

The key identity. Take the point on that line at distance from the origin. The foot of the perpendicular from to the x-axis is at distance from , and in the right-angled triangle . Similarly , . Since ,

Consequences: (asked as a 1-mark item in ISC 2024, where the examiners noted weak knowledge of direction angles), and . Also, the unit vector along the line is , and .

Direction ratios. Any numbers with are direction ratios (DRs). A line has infinitely many sets of DRs but only two sets of DCs. To convert,

with the same sign throughout. Three numbers are DCs only if their squares add to 1; otherwise they are just DRs.

Line through two points. The DRs of the line through and are , and its DCs are these divided by . Three points are collinear when the DRs of and are proportional.

Angle between two lines. With DCs and , the angle between the lines satisfies ; with DRs, . Perpendicular: . Parallel: . A line perpendicular to two given lines has DRs given by the cross product of their DR vectors.

Projection of a segment. The projection of on a line with DCs is : the dot product of with the unit vector of the line.

Coordinates and the coordinate planes. For : distance from the yz-plane is , from the zx-plane , from the xy-plane ; distance from the x-axis is . The ISC 2024 examiners reported that most candidates mixed up which coordinate gives the distance from which plane. The rule: the distance from a plane is the coordinate that plane leaves out.

Direction Cosines and Direction Ratios: formulas to remember

Direction cosines
Angles with the positive axes.
Identity
Hence .
DRs to DCs
Same sign for all three.
Two points
DCs: divide by PQ.
Angle between lines
Perpendicular when the sum is 0.
Projection of PQ
Onto a line with DCs l, m, n.
Distance from planes
The coordinate the plane leaves out.

How to solve Direction Cosines and Direction Ratios questions

Decide first whether you have angles, direction ratios or direction cosines, then convert.

  1. 1From angles: take cosines; use to find a missing one.
  2. 2From two points: subtract coordinates to get DRs.
  3. 3From DRs: divide by and attach (same sign) unless a direction is specified.
  4. 4For an angle between lines, use the dot product of DRs over the product of their lengths.
  5. 5For a line perpendicular to two lines, take the cross product of their DRs.
  6. 6Check: the squares of your DCs must add to 1.

Direction Cosines and Direction Ratios in real life

Each concept, met in an everyday situation. Read the situation, try the problem, then check the solution. The one-line hook is what to remember.

Direction cosines of a rope

Suppose a straight rope runs from a peg at the origin to the top of a pole at (6, 2, 3) metres, with the z-axis vertical.

Find the length of the rope, its direction cosines and the angle it makes with the vertical.

Try it first, then show the solutionSolution
  1. Length m.
  2. DCs: (check: ).
  3. Angle with the vertical: .

Answer: 7 m; ; about 64.6° from the vertical.

Memory hook: Each DC = coordinate ÷ length.

Distances from coordinate planes

Imagine a room with one corner at the origin, walls along the planes x = 0 and y = 0 and the floor z = 0. A lamp hangs at (2, 3, 2.5) metres.

How far is the lamp from each wall, from the floor, and from the corner?

Try it first, then show the solutionSolution
  1. From the wall x = 0 (yz-plane): 2 m; from y = 0 (zx-plane): 3 m; from the floor (xy-plane): 2.5 m.
  2. From the corner: m.

Answer: 2 m, 3 m, 2.5 m and about 4.39 m.

Memory hook: Distance from a plane = the coordinate that plane does not contain.

Tricks to remember Direction Cosines and Direction Ratios

Short memory aids. Say each one aloud once, then use it on a question the same day.

  • Squares sum to one

    DCs: squares add to 1. DRs: any multiple. If the squares do not add to 1, you have DRs.

    Use it when: Testing and converting.

  • Sines sum to two

    of the three direction angles add to .

    Use it when: Quick 1-mark identities.

  • Leave-out rule

    xy-plane leaves out z, so distance from it is |z|.

    Use it when: Distances from coordinate planes.

  • Cross for perpendicular

    A line perpendicular to two lines: cross their DRs.

    Use it when: Finding a common perpendicular direction.

Direction Cosines and Direction Ratios: solved examples

Ordered from board level to HOTS. Try each one before you open the solution.

Example 1: A missing direction angle · 1 mark · MCQBoard level

A line makes angles of 90° and 60° with the x- and y-axes. The acute angle it makes with the z-axis is:
(a) 30°
(b) 45°
(c) 60°
(d) 90°

Try it first, then show the solutionSolution
  1. , so .

Answer: (a) 30°.

Example 2: From DRs and from two points · 2 marks · Short answerBoard level

(i) Find the DCs of a line with DRs 2, −6, 3. (ii) Find the DCs of the line from to .

Try it first, then show the solutionSolution
  1. (i) : DCs . (1 mark)
  2. (ii) DRs , : DCs (directed from A to B). (1 mark)

Answer: (i) ; (ii) .

Example 3: Collinear points · 2 marks · Short answerHarder board level

Using direction ratios, show that , and are collinear.

Try it first, then show the solutionSolution
  1. DRs of AB: ; DRs of BC: . (1 mark)
  2. : parallel with B in common, so collinear. (1 mark)

Answer: Collinear (BC = −2 AB in direction ratios).

Example 4: Angle between two lines · 3 marks · Short answerHarder board level

Find the angle between the lines with DRs 2, −1, 2 and 3, 4, 0. Find also the DCs of a line perpendicular to both lines with DRs 1, 2, 3 and 2, −1, 1.

Try it first, then show the solutionSolution
  1. , so . (1 mark)
  2. , DRs . (1 mark)
  3. DCs: . (1 mark)

Answer: ; .

Example 5: Projection of a segment · 3 marks · Short answerHarder board level

Find the projection of the segment joining and on the line with DRs 2, 2, 1, and hence the angle between PQ and that line.

Try it first, then show the solutionSolution
  1. DCs of the line: . (1 mark)
  2. Projection . (1 mark)
  3. , so . (1 mark)

Answer: ; .

Example 6: DCs from two conditions · 4 marks · Long answerHOTS / competency

The direction cosines l, m, n of two lines satisfy and . Find the DCs of both lines and the angle between them.

Try it first, then show the solutionSolution
  1. From the first, . Substitute: , so or . (1 mark)
  2. : , and gives . (1 mark)
  3. : , giving . (1 mark)
  4. , so . (1 mark)

Answer: and (up to sign); 60°.

Where students lose marks in Direction Cosines and Direction Ratios

The slips examiners see most often, and what to write instead.

  • Mistake: Weak on direction angles

    The ISC 2024 examiners noted candidates lacked knowledge of direction angles and cosines in the item.

    Do this: Learn with its proof and its two corollaries.

    Usually costs: 1 mark.

  • Mistake: Wrong coordinate for a plane distance

    Most 2024 candidates confused which coordinate gives the distance from which coordinate plane.

    Wrong working

    Distance of (a, b, c) from the xy-plane = |a|.

    Right working

    |c|: the xy-plane is z = 0.

    Do this: Write the plane as an equation () before answering.

    Usually costs: 1 mark.

  • Mistake: Calling DRs direction cosines

    Writing 2, −1, 2 as DCs without dividing by 3.

    Do this: Check that the squares add to 1.

    Usually costs: 1 mark.

  • Mistake: Mixed signs

    Choosing + for one DC and − for another when converting DRs.

    Do this: Use one sign for all three.

    Usually costs: 1 mark.

Exam tips

  • Show the check in one line; it reassures the examiner and you.
  • When the direction is not stated, give DCs with .
  • Use DRs for all working and convert to DCs only at the end.
  • Prove collinearity with DRs of PQ and QR, then mention the common point.

Practice questions on Direction Cosines and Direction Ratios

Write each answer on paper first. Open the hint only if you are stuck, and the answer only when you have finished.

  1. Q1 · 1 mark · MCQBoard level

    A line makes angles α, β, γ with the positive axes, and . The acute angle γ is:
    (a) 30°
    (b) 45°
    (c) 60°
    (d) 90°
    (Built on the identity asked in ISC 2024.)

    Hint

    , so the three terms add to 2.

    Answer

    (b) 45°: .

  2. Q2 · 1 mark · Very short answerBoard level

    For , find its distance from the yz-plane and from the x-axis.

    Hint

    yz-plane leaves out x.

    Answer

    3; .

  3. Q3 · 2 marks · Short answerHarder board level

    Can be the direction cosines of a line? If not, find the DCs of a line with these as DRs.

    Hint

    Add the squares.

    Answer

    No: . DRs 6, 4, 3: DCs .

  4. Q4 · 2 marks · Short answerHarder board level

    A line makes equal acute angles with the x- and y-axes and an angle of 45° with the z-axis. Find the angle with the x-axis.

    Hint

    .

    Answer

    , so 60°.

  5. Q5 · 1 mark · Assertion-reasonHarder board level

    Assertion (A): 2, −1, 2 can be the direction cosines of a line.
    Reason (R): Direction cosines satisfy .
    (a) Both true, R explains A. (b) Both true, R does not explain A. (c) A true, R false. (d) A false, R true.

    Hint

    4 + 1 + 4 = ?

    Answer

    (d): they are only direction ratios (DCs ).

  6. Q6 · 3 marks · Short answerHOTS / competency

    Find the angle between the lines whose DCs satisfy and (with ).

    Hint

    Case l = 0 and case m = 0.

    Answer

    : , ; : , ; , .

  7. Q7 · 4 marks · Case-basedHOTS / competency

    Case study: Suppose a drone climbs in a straight line from its base O(0, 0, 0) to the point (40, 30, 120) metres, the z-axis being vertical.
    (i) Find the direction cosines of its path. (1 mark)
    (ii) Find the angle the path makes with the vertical. (1 mark)
    (iii) Find the angle the path makes with the ground. (1 mark)
    (iv) Find the projection of the path on the line with DRs 1, 0, 0 and say what it represents. (1 mark)

    Hint

    Length .

    Answer

    (i) . (ii) . (iii) (). (iv) 40 m: the eastward (x) displacement.

Test your recall

Answer in your head or on paper first, then open the card. Pulling an answer out of memory makes it stick far better than re-reading.

  1. 1.State the relation between DCs.Show answer

    .

  2. 2.DCs of the z-axis?Show answer

    0, 0, 1.

  3. 3.DCs of a line equally inclined to the axes?Show answer

    .

  4. 4.DRs of the line through (1, 0, 2) and (3, −1, 4)?Show answer

    2, −1, 2.

  5. 5.Value of ?Show answer

    −1.

Direction Cosines and Direction Ratios: frequently asked questions

What is the difference between direction cosines and direction ratios?

Direction cosines are the cosines of the angles with the axes, so their squares add to 1. Direction ratios are any three numbers proportional to them; there are infinitely many sets.

Why can a line have two sets of direction cosines?

An undirected line can be traced in either direction; reversing it changes every angle to its supplement, which changes the sign of every cosine.

How do direction ratios help with equations of lines?

The denominators of the Cartesian equation of a line are its direction ratios, and the normal to a plane has direction ratios equal to the coefficients of x, y and z.

Can a direction cosine be zero?

Yes. A zero DC means the line is perpendicular to that axis; for example, any line in a plane parallel to the xy-plane has n = 0.

How often is this topic tested in ISC?

It appeared as two 1-mark items in 2024 (the \sin^2 identity and distances from coordinate planes) and as a 1-mark collinearity item in 2025, within the 6 marks for three-dimensional geometry.