Three Dimensional Geometry opens with one simple idea: every line in space has a “direction,” and we need a reliable way to describe that direction using numbers. That’s exactly what direction cosines and direction ratios do. Once you’re comfortable with them, every later topic in this chapter — equations of lines, angles between lines, shortest distance between skew lines — becomes far easier to follow. This guide breaks the concept down with clean formulas and fully worked examples.
What Are Direction Cosines?
Imagine a directed line L passing through the origin. This line makes three angles — α, β, and γ — with the positive x-axis, y-axis, and z-axis respectively. The cosines of these three angles, written as cos α, cos β, cos γ, are called the direction cosines of the line, usually denoted by l, m, n.
Two important points to remember:
-
Every line has a unique set of direction cosines only when it is treated as a directed line (i.e., a specific direction is chosen). Reverse the direction, and every direction cosine simply changes sign.
-
The three direction cosines always satisfy the identity:
l² + m² + n² = 1
This single equation is one of the most-used results in the entire chapter, so commit it to memory.
What Are Direction Ratios?
Not every problem hands you the exact direction cosines directly — often you’re given three numbers that are merely proportional to l, m, n. These are called direction ratios, denoted a, b, c.
Formally, if a, b, c are direction ratios, then there exists a nonzero constant k such that:
a = kl, b = km, c = kn
Since any scalar multiple of a valid set of direction ratios is also a valid set of direction ratios, a single line has infinitely many sets of direction ratios — but only one set of direction cosines (for a chosen direction).
Converting Direction Ratios to Direction Cosines
Given direction ratios a, b, c, the direction cosines are obtained using:
l = ± a / √(a² + b² + c²) m = ± b / √(a² + b² + c²) n = ± c / √(a² + b² + c²)
The ± sign depends on which direction along the line you choose to work with.
Direction Cosines of a Line Joining Two Points
If a line passes through two points P(x₁, y₁, z₁) and Q(x₂, y₂, z₂), its direction cosines are:
(x₂ − x₁)/PQ, (y₂ − y₁)/PQ, (z₂ − z₁)/PQ
where PQ = √[(x₂ − x₁)² + (y₂ − y₁)² + (z₂ − z₁)²] is the distance between the two points.
A quicker shortcut: the direction ratios of the same line segment can simply be taken as x₂ − x₁, y₂ − y₁, z₂ − z₁ (or the reverse order), without dividing by PQ at all. You only normalise by PQ when the question specifically asks for direction cosines.
Solved Examples
Example 1: A line makes angles of 90°, 60°, and 30° with the positive x, y, and z-axes respectively. Find its direction cosines.
Solution: l = cos 90° = 0, m = cos 60° = 1/2, n = cos 30° = √3/2. So the direction cosines are (0, 1/2, √3/2). Check: 0² + (1/2)² + (√3/2)² = 0 + 1/4 + 3/4 = 1 ✓
Example 2: Find the direction cosines of the line joining the points (−2, 4, −5) and (1, 2, 3).
Solution: Direction ratios = (1 − (−2), 2 − 4, 3 − (−5)) = (3, −2, 8)
PQ = √(3² + (−2)² + 8²) = √(9 + 4 + 64) = √77
Direction cosines = 3/√77, −2/√77, 8/√77
Example 3: Show that points A(2, 3, −4), B(1, −2, 3), and C(3, 8, −11) are collinear.
Solution: Direction ratios of AB = (1−2, −2−3, 3+4) = (−1, −5, 7) Direction ratios of BC = (3−1, 8+2, −11−3) = (2, 10, −14)
Since (2, 10, −14) = −2 × (−1, −5, 7), the ratios are proportional, so AB is parallel to BC. Because point B is common to both, A, B, and C must be collinear.
Why This Topic Matters for Board Exams and CUET
Direction cosines and direction ratios aren’t just a standalone topic — they’re the foundation for the vector and Cartesian equation of a line, the angle between two lines, and the shortest distance between skew lines, all of which appear later in this same chapter. In CBSE board papers, this concept typically shows up as a 2-mark or 3-mark question, while in CUET and other Commerce-entrance exams (IPMAT, JIPMAT, NPAT, SET), it often appears disguised inside coordinate geometry or vector-based MCQs. Getting the l² + m² + n² = 1 identity and the two-point formula automatic will save you valuable time.
Study Smarter with ChampionsPrep
Struggling to remember every 3D Geometry formula before your next test? ChampionsPrep gives CBSE and Maharashtra Board Class XI–XII Commerce students AI-powered, chapter-wise practice sessions with PrepCoin packs from ₹59 — including targeted questions on direction cosines, direction ratios, and every other Three Dimensional Geometry concept. It’s also built to support CUET, IPMAT, JIPMAT, NPAT, and SET aspirants. Visit app.championsprep.in and turn today’s revision into tomorrow’s exam score.

Direction Cosines and Direction Ratios of a Line – Class 12 Maths
Frequently Asked Questions
What is the difference between direction cosines and direction ratios? +
Direction cosines (l, m, n) are the actual cosines of the angles a line makes with the coordinate axes and always satisfy l squared plus m squared plus n squared equals 1. Direction ratios (a, b, c) are any numbers proportional to the direction cosines and do not need to satisfy that identity.
How many sets of direction ratios can a single line have? +
Infinitely many. Any nonzero scalar multiple of one valid set of direction ratios is also a valid set for the same line.
Can direction cosines be negative? +
Yes. Since a line can be directed in two opposite ways, direction cosines can be positive or negative depending on the chosen direction; reversing direction flips all three signs.
What are the direction cosines of the coordinate axes? +
The x-axis has direction cosines (1, 0, 0), the y-axis (0, 1, 0), and the z-axis (0, 0, 1).
How do you check if three points are collinear using direction ratios? +
Find the direction ratios of two segments formed by the three points. If the ratios are proportional and one point is common to both segments, the points are collinear.
AI-powered practice — free to start