PYQ Vault

JEE Mains Maths · Three Dimensional Geometry

Direction Cosines and Equations of Lines

Describing a direction in space by its direction cosines or direction ratios, the angle between two lines, and writing a line through a point, through two points, or perpendicular to two given lines.

Why this matters

Twenty-seven PYQs. One step carries most of them: the cross product of two directions gives a third direction perpendicular to both. Five ideas cover the page.

Concept 1 of 5: Direction cosines and direction ratios

A line making angles α\alpha, β\beta, γ\gamma with the three axes has direction cosines l=cos⁡αl=\cos\alpha, m=cos⁡βm=\cos\beta, n=cos⁡γn=\cos\gamma, and these always satisfy l2+m2+n2=1l^2+m^2+n^2=1. Any triple in the same proportion, such as (2,3,6)(2,3,6), is a set of direction ratios. To turn ratios into cosines, divide by their length.

Definition

  • Direction cosines: (cos⁡α,cos⁡β,cos⁡γ)(\cos\alpha,\cos\beta,\cos\gamma), with l2+m2+n2=1l^2+m^2+n^2=1.
  • Direction ratios: any (a,b,c)(a,b,c) proportional to them; (l,m,n)=±(a,b,c)a2+b2+c2(l,m,n)=\pm\frac{(a,b,c)}{\sqrt{a^2+b^2+c^2}}.
  • Equivalently sin⁡2α+sin⁡2β+sin⁡2γ=2\sin^2\alpha+\sin^2\beta+\sin^2\gamma=2.
  • The line joining (x1,y1,z1)(x_1,y_1,z_1) and (x2,y2,z2)(x_2,y_2,z_2) has direction ratios (x2−x1, y2−y1, z2−z1)(x_2-x_1,\,y_2-y_1,\,z_2-z_1).

Direction cosines from direction ratios

(l,m,n)=(a,b,c)a2+b2+c2,l2+m2+n2=1(l,m,n)=\frac{(a,b,c)}{\sqrt{a^2+b^2+c^2}},\qquad l^2+m^2+n^2=1

Worked example

A line makes 60∘60^\circ with the xx-axis and 45∘45^\circ with the yy-axis. Find its angle with the zz-axis.
Practice this conceptself-check · 4 quick reps

The same idea in a real exam question:

JEE Mains · 2025 · 3 Apr 2025 · Q127Moderate

Example 1 · Three Dimensional Geometry · Direction Cosines and Equations of Lines

Each of the angles β\beta and γ\gamma that a given line makes with the positive y−y- and zz-axes, respectively, is half of the angle that this line makes with the positive xx-axes. Then the sum of all possible values of the angle β\beta is.

Ratios are not cosines until you divide

(2,3,6)(2,3,6) gives 4+9+36=494+9+36=49, not 11. Divide by 77 first; only then do the squares add to 11.

Concept 2 of 5: Two lines from a pair of equations in l, m, n

When the direction cosines of two lines satisfy one linear and one quadratic equation, use the linear one to remove a variable. The quadratic then becomes homogeneous in the other two, so it factorises into two ratios. Each ratio is one line's direction, and the angle between them follows from the dot product.

Definition

  • From the linear equation, write one of l,m,nl,m,n in terms of the others.
  • Substitute into the quadratic; divide by the square of one variable to get a quadratic in the ratio.
  • Its two roots give the two directions.
  • Equal roots mean the lines are parallel; roots with product −1-1 (in the right ratio) often signal perpendicular lines, but always check with the dot product.

Angle between the two directions

cos⁡θ=∣a1a2+b1b2+c1c2∣a12+b12+c12 a22+b22+c22\cos\theta=\frac{|a_1a_2+b_1b_2+c_1c_2|}{\sqrt{a_1^2+b_1^2+c_1^2}\,\sqrt{a_2^2+b_2^2+c_2^2}}

Worked example

The direction cosines of two lines satisfy l+m+n=0l+m+n=0 and 2lm+2ln−mn=02lm+2ln-mn=0. Find the angle between the lines.
Practice this conceptself-check · 4 quick reps

The same idea in a real exam question:

JEE Mains · 2026 · 23 Jan 2026 Shift 1 · Q70Moderate

Example 2 · Three Dimensional Geometry · Direction Cosines and Equations of Lines

Let the direction cosines of two lines satisfy the equations: 4l+m−n=04\mathcal{l +}m - n = 0 and 2mn+10nl+3lm=02mn + 10n\mathcal{l +}3\mathcal{l}m = 0. Then the cosine of the acute angle between these lines is :

Remove a variable with the LINEAR equation first

Only after substituting from the linear equation is the quadratic homogeneous in two variables. Dividing the original quadratic by l2l^2 straight away leaves three unknowns.

Concept 3 of 5: The angle between two lines, perpendicular and parallel lines

The angle between two lines is the angle between their direction vectors, so it comes from the dot product. Perpendicular lines have zero dot product; parallel lines have proportional direction ratios. The one care point is reading the direction ratios: the symmetric form needs xx, yy, zz with coefficient +1+1 in each numerator.

Definition

  • cos⁡θ=∣d⃗1⋅d⃗2∣∣d⃗1∣∣d⃗2∣\cos\theta=\frac{|\vec d_1\cdot\vec d_2|}{|\vec d_1||\vec d_2|}.
  • Perpendicular: a1a2+b1b2+c1c2=0a_1a_2+b_1b_2+c_1c_2=0. Parallel: a1a2=b1b2=c1c2\frac{a_1}{a_2}=\frac{b_1}{b_2}=\frac{c_1}{c_2}.
  • Rewrite first: 2−x3\frac{2-x}{3} is x−2−3\frac{x-2}{-3}; 3y−2k\frac{3y-2}{k} is y−23k/3\frac{y-\frac23}{k/3}.
  • The angle between two sides of a triangle at PP uses PQ⃗\vec{PQ} and PR⃗\vec{PR}.

Angle between two lines

cos⁡θ=∣d⃗1⋅d⃗2∣∣d⃗1∣ ∣d⃗2∣\cos\theta=\frac{|\vec d_1\cdot\vec d_2|}{|\vec d_1|\,|\vec d_2|}

Worked example

Find the angle between x−12=y+11=z−32\frac{x-1}{2}=\frac{y+1}{1}=\frac{z-3}{2} and x1=y−2−2=z2\frac{x}{1}=\frac{y-2}{-2}=\frac{z}{2}.
Practice this conceptself-check · 4 quick reps

The same idea in a real exam question:

JEE Mains · 2024 · 5 Apr 2024 · Q80Moderate

Example 3 · Three Dimensional Geometry · Direction Cosines and Equations of Lines

If the line 2−x3=3y−24λ+1=4−z\frac{2 - x}{3}=\frac{3y - 2}{4\lambda + 1}= 4 - z makes a right angle with the line x+33μ=1−2y6=5−z7\frac{x + 3}{3\mu}=\frac{1 - 2y}{6}=\frac{5 - z}{7}, then 4λ+9μ4\lambda + 9\mu is equal to :

Coefficient of xx, yy, zz must be +1+1

In 2−x3\frac{2-x}{3} the direction ratio for xx is −3-3, and in 3y−2k\frac{3y-2}{k} it is k3\frac{k}{3} for yy. Reading the denominators as they stand gives a wrong angle.

Concept 4 of 5: Writing a line: through a point, two points, or perpendicular to two lines

A line needs a point and a direction. In vector form it is r⃗=a⃗+λd⃗\vec r=\vec a+\lambda\vec d; in symmetric form x−x1a=y−y1b=z−z1c\frac{x-x_1}{a}=\frac{y-y_1}{b}=\frac{z-z_1}{c}. When a line must be perpendicular to two given lines, its direction is the cross product of their directions. To step a known distance along a line, use the unit direction.

Definition

  • Point and direction: r⃗=a⃗+λd⃗\vec r=\vec a+\lambda\vec d.
  • Two points AA, BB: direction AB⃗\vec{AB}.
  • Perpendicular to d⃗1\vec d_1 and d⃗2\vec d_2: direction d⃗1×d⃗2\vec d_1\times\vec d_2.
  • Points at distance kk from AA on the line: A±k d^A\pm k\,\hat d.
  • Where it meets a coordinate plane: set that coordinate to 00 in the parametric point.

Parametric point and a common perpendicular direction

(x1+aλ, y1+bλ, z1+cλ),d⃗=d⃗1×d⃗2(x_1+a\lambda,\ y_1+b\lambda,\ z_1+c\lambda),\qquad \vec d=\vec d_1\times\vec d_2

Worked example

A line through (1,2,3)(1,2,3) is perpendicular to the directions (1,1,0)(1,1,0) and (0,1,1)(0,1,1). Where does it meet the xyxy-plane?
Practice this conceptself-check · 4 quick reps

The same idea in a real exam question:

JEE Mains · 2025 · 29 Jan 2025 · Q131Moderate

Example 4 · Three Dimensional Geometry · Direction Cosines and Equations of Lines

Let a straight line LL pass through the point P(2,−1,3)P(2, - 1,3) and be perpendicular to the lines x−12=y+11=z−3−2\frac{x - 1}{2}=\frac{y + 1}{1}=\frac{z - 3}{- 2} and x−31=y−23=z+24\frac{x - 3}{1}=\frac{y - 2}{3}=\frac{z + 2}{4}. If the line L intersects the yz -plane at the point Q , then the distance between the points P and Q is :

Step with the UNIT vector

A+kd⃗A+k\vec d moves k∣d⃗∣k|\vec d|, not kk. For a stated distance, divide d⃗\vec d by its length first.

Concept 5 of 5: Triangles and tetrahedra with coordinates

Two edges from one vertex span a triangle: half the length of their cross product is its area. Three edges from one vertex span a tetrahedron: a sixth of their scalar triple product is its volume. Right angles show up as zero dot products.

Definition

  • Area: 12∣AB⃗×AC⃗∣\frac12|\vec{AB}\times\vec{AC}|.
  • Volume of a tetrahedron: 16∣[AB⃗ AC⃗ AD⃗]∣\frac16\left|[\vec{AB}\ \vec{AC}\ \vec{AD}]\right|.
  • Right angle at AA: AB⃗⋅AC⃗=0\vec{AB}\cdot\vec{AC}=0.
  • Three mutually perpendicular edges at AA: the opposite face's area squared is the sum of the other three faces' areas squared.

Area and volume

[ABC]=12∣AB⃗×AC⃗∣,V=16∣[AB⃗ AC⃗ AD⃗]∣[ABC]=\tfrac12|\vec{AB}\times\vec{AC}|,\qquad V=\tfrac16\left|[\vec{AB}\ \vec{AC}\ \vec{AD}]\right|

Worked example

Find the area of the triangle with vertices (1,0,0)(1,0,0), (0,2,0)(0,2,0), (0,0,3)(0,0,3).
Practice this conceptself-check · 4 quick reps

The same idea in a real exam question:

JEE Mains · 2025 · 28 Jan 2025 · Q56Moderate

Example 5 · Three Dimensional Geometry · Direction Cosines and Equations of Lines

Let A(x,y,z)A(x,y,z) be a point in xy-plane, which is equidistant from three points (0,3,2),(2,0,3)(0,3,2),(2,0,3) and (0,0,1)(0,0,1). Let B=(1,4,−1)B = (1,4, - 1) and C=(2,0,−2)C = (2,0, - 2). Then among the statements (S1): △ABC\bigtriangleup ABC is an isosceles right angled triangle and (S2) : the area of △ABC\bigtriangleup ABC is 922\frac{9\sqrt{2}}{2}.

Half for a triangle, a sixth for a tetrahedron

The cross product's length is a parallelogram's area and the triple product is a parallelepiped's volume. Forgetting the 12\frac12 or the 16\frac16 doubles or sextuples the answer.

Summary — formulas & gotchas at a glance

A revision cheat-sheet for the formulas and gotchas above. Click any concept name to jump back to its full explanation.

Formulas (5)

  • Direction cosines and direction ratios

    Direction cosines from direction ratios

    (l,m,n)=(a,b,c)a2+b2+c2,l2+m2+n2=1(l,m,n)=\frac{(a,b,c)}{\sqrt{a^2+b^2+c^2}},\qquad l^2+m^2+n^2=1
  • Two lines from a pair of equations in l, m, n

    Angle between the two directions

    cos⁡θ=∣a1a2+b1b2+c1c2∣a12+b12+c12 a22+b22+c22\cos\theta=\frac{|a_1a_2+b_1b_2+c_1c_2|}{\sqrt{a_1^2+b_1^2+c_1^2}\,\sqrt{a_2^2+b_2^2+c_2^2}}
  • The angle between two lines, perpendicular and parallel lines

    Angle between two lines

    cos⁡θ=∣d⃗1⋅d⃗2∣∣d⃗1∣ ∣d⃗2∣\cos\theta=\frac{|\vec d_1\cdot\vec d_2|}{|\vec d_1|\,|\vec d_2|}
  • Writing a line: through a point, two points, or perpendicular to two lines

    Parametric point and a common perpendicular direction

    (x1+aλ, y1+bλ, z1+cλ),d⃗=d⃗1×d⃗2(x_1+a\lambda,\ y_1+b\lambda,\ z_1+c\lambda),\qquad \vec d=\vec d_1\times\vec d_2
  • Triangles and tetrahedra with coordinates

    Area and volume

    [ABC]=12∣AB⃗×AC⃗∣,V=16∣[AB⃗ AC⃗ AD⃗]∣[ABC]=\tfrac12|\vec{AB}\times\vec{AC}|,\qquad V=\tfrac16\left|[\vec{AB}\ \vec{AC}\ \vec{AD}]\right|

Watch out for (5)

Test yourself on Three Dimensional Geometry

20 past JEE Mains questions from this chapter, timed at 48 minutes and marked the way the exam marks it. You see your score and every answer the moment you finish. Free to start.