Model G20 2027 at FLAME University, registrations now open

Three Dimensional Geometry | CBSE Class 12 Maths Notes

23 min read

On this page

Three Dimensional Geometry connects vector algebra with Mathematics in space: direction cosines and direction ratios, directions determined by two points, collinearity, vector and Cartesian equations of straight lines, angles between lines, perpendicular and parallel directions, skew lines, and shortest distances between lines.

What do direction cosines tell us about a line?

A directed line has a chosen orientation. Let α\alpha, β\beta and γ\gamma be its direction angles with the positive directions of the coordinate axes xx, yy and zz, respectively. These axes measure the three Cartesian coordinates.

Definition: The direction cosines of a directed line are the cosines of its three direction angles. Writing these cosines as ll, mm and nn, respectively, gives l=cos⁡αl=\cos\alpha, m=cos⁡βm=\cos\beta and n=cos⁡γn=\cos\gamma.

The order matters: the first cosine belongs to the positive direction of the first coordinate axis, the second to the second axis, and the third to the third axis. Keep this correspondence when moving between angles, coordinates and vectors.

Result: The squared direction cosines sum to unity

Every valid set of direction cosines satisfies l2+m2+n2=1.l^2+m^2+n^2=1. This is a useful check on any calculated answer. It also distinguishes direction cosines from arbitrary proportional numbers that merely describe the same direction.

Reversing the orientation replaces each direction angle by its supplement. All three direction cosines therefore change sign together. An undirected line has two opposite sets of direction cosines; specifying its orientation selects one of them.

What the figure shows

Direction angles in space

Three coordinate axes meet at the origin OO. A sloping directed line LL passes through a point PP; arcs mark its three direction angles, and dotted segments show coordinate projections.

See Fig. 11.1 in your NCERT textbook

How are direction angles used?

Worked example 1. A line makes angles 90∘90^\circ, 60∘60^\circ and 30∘30^\circ with the positive coordinate axes, in their usual order. Find its direction cosines.

Answer:

  1. Take the cosine of the first angle: l=cos⁡90∘=0l=\cos90^\circ=0.
  2. Take the cosine of the second angle: m=cos⁡60∘=12m=\cos60^\circ=\frac12.
  3. Take the cosine of the third angle: n=cos⁡30∘=32n=\cos30^\circ=\frac{\sqrt3}{2}.
  4. Check the result: l2+m2+n2=0+14+34=1l^2+m^2+n^2=0+\frac14+\frac34=1. The required set is (0,12,32)\left(0,\frac12,\frac{\sqrt3}{2}\right).

The positive coordinate axes themselves have direction cosines (1,0,0)(1,0,0), (0,1,0)(0,1,0) and (0,0,1)(0,0,1), respectively. Each makes a zero angle with itself and a right angle with each of the other two axes.

How do direction ratios differ from direction cosines?

Direction ratios are any three numbers proportional to the direction cosines of a line. Denote them by aa, bb and cc. They cannot all be zero, because the zero vector does not specify a direction.

Unlike direction cosines, direction ratios do not have to have squared sum equal to unity. Multiplying all three by the same nonzero real number gives another valid set. Thus one line has infinitely many proportional sets of direction ratios.

Derivation: Converting ratios into cosines

Let kk be the common proportionality constant relating the direction cosines to the given ratios.

  1. Express proportionality without dividing by individual components: l=ka,m=kb,n=kc.l=ka,\qquad m=kb,\qquad n=kc.
  2. Substitute into the squared-sum identity: k2a2+k2b2+k2c2=1.k^2a^2+k^2b^2+k^2c^2=1.
  3. Factor and solve for the common multiplier: k2(a2+b2+c2)=1,k=±1a2+b2+c2.k^2(a^2+b^2+c^2)=1,\qquad k=\pm\frac1{\sqrt{a^2+b^2+c^2}}.
  4. Multiply every ratio by the same chosen value: (l,m,n)=±(a,b,c)a2+b2+c2.(l,m,n)=\pm\frac{(a,b,c)}{\sqrt{a^2+b^2+c^2}}.

Sign convention: The plus or minus applies to the entire triple. It does not allow independent sign choices for the three entries. The two choices represent opposite orientations of the same line.

Worked example 2. Find direction cosines for a line with direction ratios (2,−1,−2)(2,-1,-2).

Answer:

  1. Calculate the squared magnitude of the ratio vector: 22+(−1)2+(−2)2=4+1+4=92^2+(-1)^2+(-2)^2=4+1+4=9.
  2. Take its positive magnitude: 9=3\sqrt9=3.
  3. Divide each ratio by this magnitude: (l,m,n)=(23,−13,−23)(l,m,n)=\left(\frac23,-\frac13,-\frac23\right).
  4. Verify normalisation: 49+19+49=1\frac49+\frac19+\frac49=1. Reversing direction gives (−23,13,23)\left(-\frac23,\frac13,\frac23\right).
FeatureDirection cosinesDirection ratios
MeaningCosines of direction anglesNumbers proportional to those cosines
NormalisationSquared sum is unitySquared sum need not be unity
FreedomFixed once orientation is chosenAny common nonzero multiple is permitted

If a line does not pass through the origin, use a parallel directed line through the origin to define its direction angles. Its location changes, but the corresponding orientation and direction cosines remain the same.

How are direction ratios found from two points?

Let P(x1,y1,z1)P(x_1,y_1,z_1) and Q(x2,y2,z2)Q(x_2,y_2,z_2) be two distinct points. The subscripted symbols give their corresponding Cartesian coordinates. The direction from the first point to the second is found by subtracting the first coordinates from the second coordinates.

Result: Coordinate differences give a direction

The vector PQ→\overrightarrow{PQ}, meaning the displacement from PP to QQ, has components (x2−x1,y2−y1,z2−z1)(x_2-x_1,y_2-y_1,z_2-z_1). These components are direction ratios of the joining line. Reversing every subtraction gives the opposite direction along the same line.

Derivation: Normalising the joining vector

Write DD for the positive length of the segment joining the two points.

  1. Calculate the coordinate changes from the first point to the second: (x2−x1, y2−y1, z2−z1).(x_2-x_1,\ y_2-y_1,\ z_2-z_1).
  2. Use the distance formula to obtain the segment length: D=(x2−x1)2+(y2−y1)2+(z2−z1)2.D=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2+(z_2-z_1)^2}.
  3. Divide the components by the same length: l=x2−x1D,m=y2−y1D,n=z2−z1D.l=\frac{x_2-x_1}{D},\qquad m=\frac{y_2-y_1}{D},\qquad n=\frac{z_2-z_1}{D}.
  4. Check that normalisation gives l2+m2+n2=D2D2=1.l^2+m^2+n^2=\frac{D^2}{D^2}=1.

Consistent subtraction is essential. Choosing the opposite direction is harmless when all three differences change sign. Reversing just one difference generally describes a different line.

Worked example 3. Find the direction cosines from P(−2,4,−5)P(-2,4,-5) towards Q(1,2,3)Q(1,2,3).

Answer:

  1. Subtract the corresponding coordinates: PQ→=(1−(−2),2−4,3−(−5))=(3,−2,8)\overrightarrow{PQ}=(1-(-2),2-4,3-(-5))=(3,-2,8).
  2. Find the length: D=32+(−2)2+82=9+4+64=77D=\sqrt{3^2+(-2)^2+8^2}=\sqrt{9+4+64}=\sqrt{77}.
  3. Normalise: (l,m,n)=(377,−277,877)(l,m,n)=\left(\frac3{\sqrt{77}},-\frac2{\sqrt{77}},\frac8{\sqrt{77}}\right).
  4. Check: l2+m2+n2=9+4+6477=1l^2+m^2+n^2=\frac{9+4+64}{77}=1.

What the figure shows

Coordinate projections of a joining segment

The points PP and QQ project down to points RR and SS on the coordinate plane. A horizontal segment from PP meets the vertical through QQ at NN, forming the right-angled triangle used to interpret a direction cosine.

See Fig. 11.2 in your NCERT textbook

How can direction ratios establish collinearity?

Three points are collinear when they lie on the same straight line. A useful method is to compare directions of two joining segments. If these directions are proportional and the segments share a point, their supporting lines coincide.

The shared-point condition completes the argument. Proportional directions alone can describe separate parallel lines. With joining segments between three given points, the common point is already available, so a proportionality check establishes that all three belong to one line.

How should the proportionality check be organised?

First calculate each joining vector using one consistent order of subtraction. Next look for one nonzero multiplier that transforms every component of the first vector into the corresponding component of the second. Finally state the geometric conclusion explicitly.

Worked example 4. Show that A(2,3,−4)A(2,3,-4), B(1,−2,3)B(1,-2,3) and C(3,8,−11)C(3,8,-11) are collinear. The letters name the three given points.

Answer:

  1. Find the direction from the first point to the second: AB→=(1−2,−2−3,3−(−4))=(−1,−5,7).\overrightarrow{AB}=(1-2,-2-3,3-(-4))=(-1,-5,7).
  2. Find the direction from the second point to the third: BC→=(3−1,8−(−2),−11−3)=(2,10,−14).\overrightarrow{BC}=(3-1,8-(-2),-11-3)=(2,10,-14).
  3. Compare every component with the same multiplier: BC→=−2AB→,−2(−1,−5,7)=(2,10,−14).\overrightarrow{BC}=-2\overrightarrow{AB},\qquad -2(-1,-5,7)=(2,10,-14).
  4. The two joining lines have parallel directions and both contain BB. They therefore coincide, proving that AA, BB and CC are collinear.

Negative proportionality is acceptable. It indicates that the chosen joining vectors point in opposite directions, rather than disproving collinearity. What matters is the common multiplier across all components.

There is no need to calculate direction cosines for this test. Normalising both vectors would add square roots without changing whether their directions are proportional. Direction ratios retain exactly the information required for this question.

Keep the algebra and the conclusion separate in a written solution. The vector calculation demonstrates proportional directions; the shared point then explains why the conclusion is collinearity rather than merely parallelism.

How is a line written using a point and a direction?

A straight line is determined by a point on it and a nonzero direction vector. Let a⃗\vec a be the position vector of the fixed point, measured from the origin, and let b⃗\vec b be a vector parallel to the line.

Let r⃗\vec r be the position vector of an arbitrary point on the line, and let λ\lambda be a real parameter. The displacement from the fixed point to the variable point must be a scalar multiple of the given direction vector.

Derivation: Vector, parametric and Cartesian forms

  1. Express the parallel displacement: r⃗−a⃗=λb⃗.\vec r-\vec a=\lambda\vec b.
  2. Rearrange to obtain the vector equation: r⃗=a⃗+λb⃗.\vec r=\vec a+\lambda\vec b.
  3. Take the fixed point as (x1,y1,z1)(x_1,y_1,z_1), the variable point as (x,y,z)(x,y,z), and the direction ratios as (a,b,c)(a,b,c). Comparing components gives x=x1+λa,y=y1+λb,z=z1+λc.x=x_1+\lambda a,\quad y=y_1+\lambda b,\quad z=z_1+\lambda c.
  4. When the three direction ratios are nonzero, eliminate the parameter: x−x1a=y−y1b=z−z1c.\frac{x-x_1}{a}=\frac{y-y_1}{b}=\frac{z-z_1}{c}.

Parametric equations express all coordinates using the same parameter. As that parameter varies over the real numbers, the variable point traces the entire line, including both directions from the fixed point.

The symbols i^\hat i, j^\hat j and k^\hat k denote unit vectors along the positive coordinate axes. Thus coordinate triples can be written as vector expressions using these three unit vectors.

Worked example 5. Find vector and Cartesian equations of the line through (5,2,−4)(5,2,-4), parallel to 3i^+2j^−8k^3\hat i+2\hat j-8\hat k.

Answer:

  1. Identify the fixed position and direction vectors: a⃗=5i^+2j^−4k^\vec a=5\hat i+2\hat j-4\hat k and b⃗=3i^+2j^−8k^\vec b=3\hat i+2\hat j-8\hat k.
  2. Substitute them into the vector equation: r⃗=5i^+2j^−4k^+λ(3i^+2j^−8k^).\vec r=5\hat i+2\hat j-4\hat k+\lambda(3\hat i+2\hat j-8\hat k).
  3. Compare components: x=5+3λx=5+3\lambda, y=2+2λy=2+2\lambda, and z=−4−8λz=-4-8\lambda.
  4. Eliminate the parameter: x−53=y−22=z+4−8.\frac{x-5}{3}=\frac{y-2}{2}=\frac{z+4}{-8}. Setting λ=0\lambda=0 recovers the given point and checks the constant terms.

What the figure shows

A fixed point and a parallel vector

A line contains the points labelled AA and PP. Position vectors run from the origin to these points, while a separate arrow above the line shows its parallel direction vector.

See Fig. 11.3 in your NCERT textbook

Zero-component precaution: If a direction ratio is zero, keep the corresponding coordinate constant in the parametric form. Do not interpret division by zero as an ordinary fraction.

How is a line through two points expressed in vector form?

Two distinct points provide both ingredients of a line equation. Either point supplies a fixed position, and the vector joining them supplies a nonzero direction. This connects the coordinate-difference method directly to the point-and-direction form.

In this section, let a⃗\vec a and b⃗\vec b denote the position vectors of the first and second points. Here the second vector represents a point, rather than the independent direction vector used in the previous section.

Result: The two-point vector equation

  1. Subtract the position vectors to obtain the direction from the first point to the second: AB→=b⃗−a⃗.\overrightarrow{AB}=\vec b-\vec a.
  2. Use the first point as the fixed point in the line equation: r⃗=a⃗+λ(b⃗−a⃗),λ∈R.\vec r=\vec a+\lambda(\vec b-\vec a),\qquad \lambda\in\mathbb R.
  3. Check the first given point by setting λ=0\lambda=0: r⃗=a⃗.\vec r=\vec a.
  4. Check the second given point by setting λ=1\lambda=1: r⃗=a⃗+(b⃗−a⃗)=b⃗.\vec r=\vec a+(\vec b-\vec a)=\vec b.

Parameter checks establish that both required points belong to the line. They also catch the common mistake of inserting the second position vector itself as the direction, instead of subtracting the first position vector.

How do the coordinate and vector descriptions agree?

For the two distinct points with coordinates (x1,y1,z1)(x_1,y_1,z_1) and (x2,y2,z2)(x_2,y_2,z_2), the direction components are the corresponding coordinate differences. Substitute those differences into the point-and-direction parametric equations.

  1. Write the coordinate equations: x=x1+λ(x2−x1),y=y1+λ(y2−y1),z=z1+λ(z2−z1).x=x_1+\lambda(x_2-x_1),\quad y=y_1+\lambda(y_2-y_1),\quad z=z_1+\lambda(z_2-z_1).
  2. Where all three differences are nonzero, eliminate the common parameter: x−x1x2−x1=y−y1y2−y1=z−z1z2−z1.\frac{x-x_1}{x_2-x_1}=\frac{y-y_1}{y_2-y_1}=\frac{z-z_1}{z_2-z_1}.

The distinct-point condition matters because coincident points would give a zero joining vector. They supply a location but no unique direction. A zero individual coordinate difference, however, is allowed and simply leaves that coordinate constant.

Changing which point is used as the starting point gives another valid equation of the same line. The form may look different, but its fixed point lies on the original line and its direction is proportional to the original direction.

How is the angle between two lines calculated?

The angle depends on directions, not on the chosen fixed points. If the lines do not meet at the origin, take parallel lines through the origin. This also defines the angle between skew lines using intersecting representatives of their directions.

Let b⃗1\vec b_1 and b⃗2\vec b_2 be nonzero direction vectors of the two lines. Let θ\theta denote their smaller, non-obtuse angle. The notation ∣b⃗1∣|\vec b_1| means vector magnitude, while the dot denotes the scalar product.

Result: The scalar-product angle formula

  1. Apply the scalar-product relation and select the non-obtuse line angle: cos⁡θ=∣b⃗1⋅b⃗2∣∣b⃗1∣ ∣b⃗2∣.\cos\theta=\frac{|\vec b_1\cdot\vec b_2|}{|\vec b_1|\,|\vec b_2|}.
  2. Write the direction components as (a1,b1,c1)(a_1,b_1,c_1) and (a2,b2,c2)(a_2,b_2,c_2). Expanding gives cos⁡θ=∣a1a2+b1b2+c1c2∣a12+b12+c12a22+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}}.
  3. If (l1,m1,n1)(l_1,m_1,n_1) and (l2,m2,n2)(l_2,m_2,n_2) are the direction-cosine triples, their magnitudes are unity, so cos⁡θ=∣l1l2+m1m2+n1n2∣.\cos\theta=|l_1l_2+m_1m_2+n_1n_2|.

The absolute value makes the result independent of which orientation was selected for either line. For specifically directed vectors, the signed scalar product instead determines their directed-vector angle between zero and a straight angle.

Worked example 6. Find the angle between r⃗=3i^+2j^−4k^+λ(i^+2j^+2k^)\vec r=3\hat i+2\hat j-4\hat k+\lambda(\hat i+2\hat j+2\hat k) and r⃗=5i^−2j^+μ(3i^+2j^+6k^)\vec r=5\hat i-2\hat j+\mu(3\hat i+2\hat j+6\hat k), where μ\mu is an independent real parameter for the second line.

Answer:

  1. Read the direction vectors from the parameter coefficients: b⃗1=(1,2,2)\vec b_1=(1,2,2) and b⃗2=(3,2,6)\vec b_2=(3,2,6).
  2. Calculate their scalar product: b⃗1⋅b⃗2=1(3)+2(2)+2(6)=19\vec b_1\cdot\vec b_2=1(3)+2(2)+2(6)=19.
  3. Calculate the magnitudes: ∣b⃗1∣=1+4+4=3|\vec b_1|=\sqrt{1+4+4}=3 and ∣b⃗2∣=9+4+36=7|\vec b_2|=\sqrt{9+4+36}=7.
  4. Substitute and invert the cosine: cos⁡θ=193⋅7=1921\cos\theta=\frac{19}{3\cdot7}=\frac{19}{21}, hence θ=cos⁡−1(1921)\theta=\cos^{-1}\left(\frac{19}{21}\right).

How are directions read from Cartesian equations?

Worked example 7. Find the angle between x+33=y−15=z+34\frac{x+3}{3}=\frac{y-1}{5}=\frac{z+3}{4} and x+11=y−41=z−52\frac{x+1}{1}=\frac{y-4}{1}=\frac{z-5}{2}.

Answer:

  1. The denominator triples give directions (3,5,4)(3,5,4) and (1,1,2)(1,1,2).
  2. The scalar product is 3(1)+5(1)+4(2)=163(1)+5(1)+4(2)=16.
  3. The magnitudes are 9+25+16=50\sqrt{9+25+16}=\sqrt{50} and 1+1+4=6\sqrt{1+1+4}=\sqrt6.
  4. Therefore cos⁡θ=16506=16103=8315\cos\theta=\frac{16}{\sqrt{50}\sqrt6}=\frac{16}{10\sqrt3}=\frac{8\sqrt3}{15}, giving θ=cos⁡−1(8315)\theta=\cos^{-1}\left(\frac{8\sqrt3}{15}\right).

What conditions identify perpendicular or parallel directions?

The general angle formula contains two particularly useful cases. A right angle gives a zero scalar product. A zero angle between lines corresponds to proportional direction vectors. These tests use directions rather than the fixed points in the line equations.

Result: Perpendicular directions have zero scalar product

  1. For a right angle, substitute θ=90∘\theta=90^\circ into the angle formula: cos⁡90∘=0.\cos90^\circ=0.
  2. Both direction vectors have nonzero magnitude, so the numerator must vanish: b⃗1⋅b⃗2=0.\vec b_1\cdot\vec b_2=0.
  3. In components, this becomes a1a2+b1b2+c1c2=0.a_1a_2+b_1b_2+c_1c_2=0.

Parallel directions are scalar multiples of each other. A division-free test is b⃗2=tb⃗1\vec b_2=t\vec b_1, where tt is a nonzero real multiplier. This remains meaningful when an individual component is zero.

When the required denominators are nonzero, proportionality can also be written a1a2=b1b2=c1c2\frac{a_1}{a_2}=\frac{b_1}{b_2}=\frac{c_1}{c_2}. A negative multiplier represents the opposite orientation along a parallel direction.

How does the sine formula express the same direction test?

The cross symbol denotes the vector product. Its magnitude measures the product of the two vector magnitudes and the sine of their angle. For the smaller angle between the lines,

sin⁡θ=∣b⃗1×b⃗2∣∣b⃗1∣ ∣b⃗2∣.\sin\theta=\frac{|\vec b_1\times\vec b_2|}{|\vec b_1|\,|\vec b_2|}.

In components, the corresponding expression is

sin⁡θ=(b1c2−c1b2)2+(c1a2−a1c2)2+(a1b2−b1a2)2a12+b12+c12a22+b22+c22.\sin\theta=\frac{\sqrt{(b_1c_2-c_1b_2)^2+(c_1a_2-a_1c_2)^2+(a_1b_2-b_1a_2)^2}}{\sqrt{a_1^2+b_1^2+c_1^2}\sqrt{a_2^2+b_2^2+c_2^2}}.

This is the expanded sine expression obtained from the direction-ratio angle formula. For parallel directions the cross product is the zero vector, denoted by 0⃗\vec0, so the sine of the smaller line angle vanishes.

Direction relationshipVector conditionInterpretation
Perpendicular directionsb⃗1⋅b⃗2=0\vec b_1\cdot\vec b_2=0The line angle is a right angle
Parallel directionsb⃗1×b⃗2=0⃗\vec b_1\times\vec b_2=\vec0The nonzero direction vectors are proportional
General nonparallel directionsb⃗1×b⃗2≠0⃗\vec b_1\times\vec b_2\ne\vec0A common perpendicular direction can be formed

These are direction tests. To establish that two particular lines intersect, their locations must also be considered. In space, a right angle between directions does not by itself supply a common point.

How is the shortest distance between skew lines found?

Skew lines are neither parallel nor intersecting, and are not contained in one common plane. Their shortest joining segment is perpendicular to both lines. This common perpendicular supplies the direction along which a connecting vector must be projected.

Write the line equations as r⃗=a⃗1+λb⃗1\vec r=\vec a_1+\lambda\vec b_1 and r⃗=a⃗2+μb⃗2\vec r=\vec a_2+\mu\vec b_2. The vectors a⃗1\vec a_1 and a⃗2\vec a_2 locate chosen points on the first and second lines. The vectors b⃗1\vec b_1 and b⃗2\vec b_2 specify their directions.

Derivation: Projection onto the common perpendicular

Let n^\hat n be a unit vector perpendicular to both directions, and let dd denote the shortest distance.

  1. Form a vector perpendicular to both lines: b⃗1×b⃗2.\vec b_1\times\vec b_2.
  2. Normalise it, using the fact that the directions are not parallel: n^=b⃗1×b⃗2∣b⃗1×b⃗2∣.\hat n=\frac{\vec b_1\times\vec b_2}{|\vec b_1\times\vec b_2|}.
  3. The vector joining the chosen fixed points is a⃗2−a⃗1\vec a_2-\vec a_1. Take the magnitude of its scalar projection: d=∣(a⃗2−a⃗1)⋅n^∣.d=|(\vec a_2-\vec a_1)\cdot\hat n|.
  4. Substitute the unit normal to obtain d=∣(a⃗2−a⃗1)⋅(b⃗1×b⃗2)∣∣b⃗1×b⃗2∣.d=\frac{|(\vec a_2-\vec a_1)\cdot(\vec b_1\times\vec b_2)|}{|\vec b_1\times\vec b_2|}.

Absolute value is necessary because a distance cannot be negative. Reversing a cross-product order reverses its direction but leaves the final distance unchanged when the magnitude and absolute scalar projection are used consistently.

What the figure shows

The common perpendicular

Points SS and PP lie on the first line, while TT and QQ lie on the second. The segment joining PP to QQ is perpendicular to both lines, with a right-angle mark drawn at PP; another segment connects the chosen points SS and TT.

See Fig. 11.6 in your NCERT textbook

Worked example 8. Find the shortest distance between r⃗=i^+j^+λ(2i^−j^+k^)\vec r=\hat i+\hat j+\lambda(2\hat i-\hat j+\hat k) and r⃗=2i^+j^−k^+μ(3i^−5j^+2k^)\vec r=2\hat i+\hat j-\hat k+\mu(3\hat i-5\hat j+2\hat k).

Answer:

  1. Read the fixed points and directions: a⃗1=(1,1,0)\vec a_1=(1,1,0), a⃗2=(2,1,−1)\vec a_2=(2,1,-1), b⃗1=(2,−1,1)\vec b_1=(2,-1,1), and b⃗2=(3,−5,2)\vec b_2=(3,-5,2).
  2. Subtract the fixed position vectors: a⃗2−a⃗1=(1,0,−1)\vec a_2-\vec a_1=(1,0,-1).
  3. Calculate the cross product component by component: b⃗1×b⃗2=((−1)2−1(−5), 1(3)−2(2), 2(−5)−(−1)3)=(3,−1,−7).\vec b_1\times\vec b_2=((-1)2-1(-5),\ 1(3)-2(2),\ 2(-5)-(-1)3)=(3,-1,-7).
  4. Calculate its magnitude: ∣b⃗1×b⃗2∣=9+1+49=59|\vec b_1\times\vec b_2|=\sqrt{9+1+49}=\sqrt{59}.
  5. Calculate the scalar product: (1,0,−1)⋅(3,−1,−7)=3+0+7=10(1,0,-1)\cdot(3,-1,-7)=3+0+7=10.
  6. Divide the absolute numerator by the magnitude: d=1059d=\frac{10}{\sqrt{59}} units. The positive result and nonparallel directions confirm that the lines are skew.

How is the formula written directly in coordinates?

For fixed points (x1,y1,z1)(x_1,y_1,z_1), (x2,y2,z2)(x_2,y_2,z_2) and direction triples (a1,b1,c1)(a_1,b_1,c_1), (a2,b2,c2)(a_2,b_2,c_2), the numerator is the absolute value of a determinant, denoted by det⁡\det:

d=∣det⁡(x2−x1y2−y1z2−z1a1b1c1a2b2c2)∣(b1c2−c1b2)2+(c1a2−a1c2)2+(a1b2−b1a2)2.d=\frac{\left|\det\begin{pmatrix}x_2-x_1&y_2-y_1&z_2-z_1\\a_1&b_1&c_1\\a_2&b_2&c_2\end{pmatrix}\right|}{\sqrt{(b_1c_2-c_1b_2)^2+(c_1a_2-a_1c_2)^2+(a_1b_2-b_1a_2)^2}}.

The vector calculation and the determinant calculation express the same projection. The vector version often makes the common perpendicular easier to identify; the determinant version uses the fixed coordinates and direction ratios directly.

How does the distance formula change for parallel lines?

Parallel lines have a common direction and lie in a plane. Their shortest distance is the perpendicular distance from any point on one line to the other line. The skew-line formula cannot be used because its cross-product denominator would vanish.

Write the equations as r⃗=a⃗1+λb⃗\vec r=\vec a_1+\lambda\vec b and r⃗=a⃗2+μb⃗\vec r=\vec a_2+\mu\vec b, using one common nonzero direction vector b⃗\vec b. The fixed-point vectors retain the meanings given above.

Derivation: Perpendicular separation from a vector product

Let ϕ\phi be the angle between the common direction and the vector joining the chosen fixed points.

  1. The magnitude of the cross product is ∣b⃗×(a⃗2−a⃗1)∣=∣b⃗∣ ∣a⃗2−a⃗1∣sin⁡ϕ.|\vec b\times(\vec a_2-\vec a_1)|=|\vec b|\,|\vec a_2-\vec a_1|\sin\phi.
  2. The perpendicular separation is the height represented by d=∣a⃗2−a⃗1∣sin⁡ϕ.d=|\vec a_2-\vec a_1|\sin\phi.
  3. Combine these expressions: ∣b⃗×(a⃗2−a⃗1)∣=∣b⃗∣d.|\vec b\times(\vec a_2-\vec a_1)|=|\vec b|d.
  4. Divide by the nonzero common-direction magnitude: d=∣b⃗×(a⃗2−a⃗1)∣∣b⃗∣.d=\frac{|\vec b\times(\vec a_2-\vec a_1)|}{|\vec b|}.

Choose the formula first. Check proportionality of the directions before calculating a shortest distance. If the directions are parallel, use the formula above; if they are nonparallel, use the scalar projection onto their common normal.

Worked example 9. Find the distance between r⃗=i^+2j^−4k^+λ(2i^+3j^+6k^)\vec r=\hat i+2\hat j-4\hat k+\lambda(2\hat i+3\hat j+6\hat k) and r⃗=3i^+3j^−5k^+μ(2i^+3j^+6k^)\vec r=3\hat i+3\hat j-5\hat k+\mu(2\hat i+3\hat j+6\hat k).

Answer:

  1. Both lines have common direction b⃗=(2,3,6)\vec b=(2,3,6), so they are parallel.
  2. Subtract their fixed position vectors: a⃗2−a⃗1=(3−1,3−2,−5−(−4))=(2,1,−1)\vec a_2-\vec a_1=(3-1,3-2,-5-(-4))=(2,1,-1).
  3. Calculate the cross product: b⃗×(a⃗2−a⃗1)=(3(−1)−6(1), 6(2)−2(−1), 2(1)−3(2))=(−9,14,−4).\vec b\times(\vec a_2-\vec a_1)=(3(-1)-6(1),\ 6(2)-2(-1),\ 2(1)-3(2))=(-9,14,-4).
  4. Find its magnitude: (−9)2+142+(−4)2=81+196+16=293\sqrt{(-9)^2+14^2+(-4)^2}=\sqrt{81+196+16}=\sqrt{293}.
  5. Find the direction magnitude: ∣b⃗∣=22+32+62=49=7|\vec b|=\sqrt{2^2+3^2+6^2}=\sqrt{49}=7.
  6. Divide to obtain the separation: d=2937d=\frac{\sqrt{293}}7 units.

What the figure shows

Distance between parallel lines

Two horizontal lines carry points SS and TT, respectively. A perpendicular from TT meets the lower line at PP. The triangle formed by these points shows the perpendicular separation and the sloping joining segment.

See Fig. 11.7 in your NCERT textbook

If two lines intersect, their shortest distance is zero because their common point belongs to both lines. Keep this geometric meaning in view: distance measures the shortest joining segment, not the length between arbitrary chosen fixed points.

Glossary

  • Directed line — A line with a chosen orientation that fixes its direction angles and direction cosines.
  • Direction angles — Angles made by a directed line with the positive directions of the three coordinate axes.
  • Direction cosines — Cosines of the three direction angles, whose squares add to unity.
  • Direction ratios — Three numbers proportional to the direction cosines, specifying a line direction without requiring normalisation.
  • Position vector — A vector from the coordinate origin to a specified point in space.
  • Direction vector — A nonzero vector parallel to a line and used to describe its direction.
  • Parameter — A real variable whose changing value generates points along a line equation.
  • Collinear points — Points that all lie on one and the same straight line.
  • Skew lines — Nonparallel, nonintersecting lines in space that cannot lie in one common plane.
  • Common perpendicular — A joining segment perpendicular to both skew lines, giving their shortest distance.
  • Scalar projection — The scalar product with a unit direction vector, used to obtain a component along that direction.
  • Cartesian line equation — A coordinate description of a line formed by eliminating the common parameter from its component equations.

Common errors and misconceptions

  • Misconception: Direction ratios must have squared sum equal to unity. Correct: Direction cosines have this normalisation; direction ratios can be any common nonzero multiple.
  • Misconception: The three signs in normalisation can be chosen separately. Correct: One common sign is chosen for the complete triple, giving one of two opposite orientations.
  • Misconception: Coordinate subtraction order can change between components. Correct: Subtract the same starting point from the same ending point in all three coordinates.
  • Misconception: The fixed position vector in a line equation gives its direction. Correct: The coefficient vector of the parameter supplies the direction; the fixed vector locates a point.
  • Misconception: Parallel directions prove two arbitrary lines are the same. Correct: A common point is also needed to conclude that the lines coincide.
  • Misconception: Every nonintersecting pair of lines is parallel. Correct: In space, skew lines neither intersect nor have parallel directions.
  • Misconception: The skew-line distance formula also works for parallel lines. Correct: Its denominator vanishes for parallel directions, so use the separate parallel-line formula.
  • Misconception: A negative scalar triple product means a negative distance. Correct: Take its absolute value before dividing by the magnitude of the direction cross product.

Exam-style questions with model answers

Q1. Define direction cosines and state their squared-sum identity. [2 marks]
  1. Direction cosines are the cosines of the angles a directed line makes with the positive coordinate axes.
  2. If they are denoted by ll, mm and nn, they satisfy l2+m2+n2=1l^2+m^2+n^2=1.
Q2. Find direction cosines corresponding to direction ratios (2,−1,−2)(2,-1,-2), keeping the stated orientation. [3 marks]
  1. The given direction ratios form a nonzero direction vector. First calculate its squared magnitude: 22+(−1)2+(−2)2=4+1+4=92^2+(-1)^2+(-2)^2=4+1+4=9.
  2. Its positive magnitude is therefore 9=3\sqrt9=3. Divide every component by this same value to retain the stated orientation.
  3. The required direction cosines are (23,−13,−23)\left(\frac23,-\frac13,-\frac23\right). Their squared sum is 49+19+49=1\frac49+\frac19+\frac49=1, confirming the normalisation. The common positive divisor also preserves all the original component signs.
Q3. Show that A(2,3,−4)A(2,3,-4), B(1,−2,3)B(1,-2,3) and C(3,8,−11)C(3,8,-11) are collinear. [3 marks]
  1. Subtract the coordinates of the first point from the second: AB→=(1−2,−2−3,3−(−4))=(−1,−5,7)\overrightarrow{AB}=(1-2,-2-3,3-(-4))=(-1,-5,7).
  2. Next subtract the second point from the third: BC→=(3−1,8−(−2),−11−3)=(2,10,−14)\overrightarrow{BC}=(3-1,8-(-2),-11-3)=(2,10,-14).
  3. These vectors satisfy BC→=−2AB→\overrightarrow{BC}=-2\overrightarrow{AB}, so the joining lines have proportional directions. Since both contain the common point BB, they coincide. Hence all three given points are collinear. The negative multiplier changes orientation but does not change the supporting line.
Q4. Find vector and Cartesian equations of the line through (5,2,−4)(5,2,-4), parallel to 3i^+2j^−8k^3\hat i+2\hat j-8\hat k. [4 marks]
  1. The fixed position vector is a⃗=5i^+2j^−4k^\vec a=5\hat i+2\hat j-4\hat k. The given parallel vector supplies the direction b⃗=3i^+2j^−8k^\vec b=3\hat i+2\hat j-8\hat k.
  2. Using a real parameter λ\lambda, the vector equation is r⃗=5i^+2j^−4k^+λ(3i^+2j^−8k^)\vec r=5\hat i+2\hat j-4\hat k+\lambda(3\hat i+2\hat j-8\hat k).
  3. Equating corresponding components gives x=5+3λx=5+3\lambda, y=2+2λy=2+2\lambda and z=−4−8λz=-4-8\lambda.
  4. Eliminating the same parameter from these three equations gives x−53=y−22=z+4−8\frac{x-5}{3}=\frac{y-2}{2}=\frac{z+4}{-8}. The parameter value λ=0\lambda=0 verifies the given point.
Q5. Find the smaller angle between lines with direction vectors i^+2j^+2k^\hat i+2\hat j+2\hat k and 3i^+2j^+6k^3\hat i+2\hat j+6\hat k. [3 marks]
  1. Let θ\theta be the required angle. Only the directions are needed, so no fixed points on the lines are required. Parallel translation through the origin preserves the angle between these directions.
  2. The scalar product of the given direction vectors is 1(3)+2(2)+2(6)=191(3)+2(2)+2(6)=19. Their magnitudes are 1+4+4=3\sqrt{1+4+4}=3 and 9+4+36=7\sqrt{9+4+36}=7.
  3. Therefore cos⁡θ=∣19∣3⋅7=1921\cos\theta=\frac{|19|}{3\cdot7}=\frac{19}{21}, and the smaller angle is θ=cos⁡−1(1921)\theta=\cos^{-1}\left(\frac{19}{21}\right).
Q6. Find the shortest distance between r⃗=i^+j^+λ(2i^−j^+k^)\vec r=\hat i+\hat j+\lambda(2\hat i-\hat j+\hat k) and r⃗=2i^+j^−k^+μ(3i^−5j^+2k^)\vec r=2\hat i+\hat j-\hat k+\mu(3\hat i-5\hat j+2\hat k), for independent real parameters λ\lambda and μ\mu. [5 marks]
  1. The fixed position vectors are a⃗1=(1,1,0)\vec a_1=(1,1,0) and a⃗2=(2,1,−1)\vec a_2=(2,1,-1). Their difference, directed from the first fixed point to the second, is a⃗2−a⃗1=(1,0,−1)\vec a_2-\vec a_1=(1,0,-1).
  2. The direction vectors are b⃗1=(2,−1,1)\vec b_1=(2,-1,1) and b⃗2=(3,−5,2)\vec b_2=(3,-5,2). Their cross product is ((−1)2−1(−5),1(3)−2(2),2(−5)−(−1)3)=(3,−1,−7)((-1)2-1(-5),1(3)-2(2),2(-5)-(-1)3)=(3,-1,-7). It is nonzero, so the nonparallel-line distance formula applies.
  3. The magnitude of this normal vector is 32+(−1)2+(−7)2=59\sqrt{3^2+(-1)^2+(-7)^2}=\sqrt{59}.
  4. The scalar product with the fixed-point difference is (1,0,−1)⋅(3,−1,−7)=3+7=10(1,0,-1)\cdot(3,-1,-7)=3+7=10.
  5. Taking the absolute scalar projection gives d=∣10∣59=1059d=\frac{|10|}{\sqrt{59}}=\frac{10}{\sqrt{59}} units. This positive separation also shows that the two nonparallel lines do not intersect. The calculated cross product supplies a direction perpendicular to each line, so its scalar projection measures their shortest separation.
Q7. Find the distance between r⃗=i^+2j^−4k^+λ(2i^+3j^+6k^)\vec r=\hat i+2\hat j-4\hat k+\lambda(2\hat i+3\hat j+6\hat k) and r⃗=3i^+3j^−5k^+μ(2i^+3j^+6k^)\vec r=3\hat i+3\hat j-5\hat k+\mu(2\hat i+3\hat j+6\hat k), for independent real parameters. [5 marks]
  1. The two lines have the common nonzero direction vector b⃗=(2,3,6)\vec b=(2,3,6), so use the parallel-line distance formula. Their fixed-point difference is a⃗2−a⃗1=(3−1,3−2,−5−(−4))=(2,1,−1)\vec a_2-\vec a_1=(3-1,3-2,-5-(-4))=(2,1,-1).
  2. Calculate the vector product with this difference: b⃗×(a⃗2−a⃗1)=(3(−1)−6(1),6(2)−2(−1),2(1)−3(2))=(−9,14,−4)\vec b\times(\vec a_2-\vec a_1)=(3(-1)-6(1),6(2)-2(-1),2(1)-3(2))=(-9,14,-4).
  3. Its magnitude is 81+196+16=293\sqrt{81+196+16}=\sqrt{293}.
  4. The magnitude of the common direction vector is 4+9+36=49=7\sqrt{4+9+36}=\sqrt{49}=7.
  5. The required perpendicular separation is consequently d=2937d=\frac{\sqrt{293}}7 units. Dividing by the direction magnitude removes the scale of the direction vector. The shortest segment is perpendicular to the common direction, rather than simply joining the two arbitrary fixed points used in the equations.

Key takeaways

  • Direction cosines encode orientation through three direction angles; their squared sum is unity and reversing direction reverses every sign.
  • Direction ratios describe the same direction through proportional numbers; normalise the entire triple using one common magnitude.
  • Subtract coordinates consistently to obtain a joining vector, then divide by its length when direction cosines are required.
  • A line equation combines a fixed point with a nonzero direction vector and a freely varying real parameter.
  • The angle between lines depends on their direction vectors, while their fixed points determine where the lines lie.
  • Skew lines are nonparallel and nonintersecting; their shortest joining segment is perpendicular to both line directions.
  • Choose the distance formula after checking parallelism, and take magnitudes or absolute values wherever a length is required.
  • Every numerical solution should identify its vectors, show intermediate products, simplify carefully, and check the geometric meaning of the result.

Test yourself

What happens to direction cosines when orientation is reversed?

All three signs reverse together because each direction angle is replaced by its supplement.

Must direction ratios have squared sum equal to unity?

No. That normalisation belongs to direction cosines; direction ratios need only be proportional to them.

Which direction cosines describe the positive first coordinate axis?

The triple is (1,0,0)(1,0,0), because that axis makes a zero angle with itself and right angles with the other axes.

What provides the direction in a line equation through two distinct points?

The difference of their position vectors provides the direction, while either point can supply the fixed position.

How do you test two nonzero direction vectors for perpendicularity?

Calculate their scalar product. A zero result means their directions form a right angle.

Why cannot the skew-line distance formula be used for parallel lines?

The cross product of their direction vectors vanishes, making the denominator zero and requiring the parallel-line formula.

What is the shortest distance between intersecting lines?

It is zero, because their common point lies on both lines and gives zero separation.

What makes the shortest joining segment of skew lines special?

It is perpendicular to both line directions, so projection onto its direction gives the shortest distance.