EZ Tuitions Logo
EZ Tuitions
Back to Blog

Shortest Distance Between Skew Lines, Class 12

5 min read• 12/5/2026• By Ananya Sharma, Academic Content Lead, EZ Tuitions• Exam Prep

Class 12 shortest distance between skew lines: vector and Cartesian formula, a skew test, and parallel lines, with three worked problems and checks.

Triangular transparent set square, two pencils and a closed black notebook on a worn wooden desk, with a black office chair behind
Key facts about this article
TopicExam Prep
FocusMathematics
Read time5 min
Words986
Published5 Dec 2026
Best forStudents & parents (exam prep)

Two lines in space can do three things: meet, run parallel, or do neither. The third case is the interesting one. Such lines are called skew, and the shortest distance between them is measured along the one segment that is perpendicular to both.

This guide follows NCERT Class 12 Mathematics, Chapter 11, section 11.5, and solves three original problems. Each one ends with a check, so you can see the answer is right and not just the formula.

The formula and the skew test

Take the lines r = a₁ + λb₁ and r = a₂ + μb₂. If they are not parallel, the shortest distance is d = |(b₁ × b₂) · (a₂ − a₁)| divided by |b₁ × b₂|. In words: take the vector joining one point on each line, and find how much of it points along the common perpendicular.

The same number tells you whether the lines are skew. If the top of that fraction is zero, the lines are coplanar and meet, so the distance is zero. If it is not zero, the lines are skew. In Cartesian form the top is a 3 by 3 determinant, with the rows (x₂ − x₁, y₂ − y₁, z₂ − z₁), then (a₁, b₁, c₁), then (a₂, b₂, c₂). If the lines are parallel, b₁ × b₂ is the zero vector, so use the parallel formula in Problem 3. Brush up on the cross product with the cross product magnitude check if needed.

Problem 1: lines in vector form

Problem 1. Find the shortest distance between r = (1, 2, −1) + λ(2, −1, 1) and r = (3, 0, 2) + μ(1, 2, −2).

First b₁ × b₂. With b₁ = (2, −1, 1) and b₂ = (1, 2, −2), the components are ((−1)(−2) − (1)(2), (1)(1) − (2)(−2), (2)(2) − (−1)(1)) = (0, 5, 5). Its magnitude is 5√2. Next a₂ − a₁ = (2, −2, 3), and the dot product with (0, 5, 5) is −10 + 15 = 5.

So d = 5 / (5√2) = 1/√2, which is about 0.707 units. Check: the feet of the common perpendicular come at λ = 1.3 and μ = 0.6, giving P = (3.6, 0.7, 0.3) and Q = (3.6, 1.2, 0.8). Then PQ = (0, 0.5, 0.5), which has length 0.707 and is perpendicular to both direction vectors.

Problem 2: lines in Cartesian form

Problem 2. Show that the lines (x − 1)/1 = (y + 1)/2 = (z − 2)/3 and x/2 = (y − 3)/1 = (z − 1)/(−1) are skew, and find the distance between them.

Read off the points (1, −1, 2) and (0, 3, 1), and the directions (1, 2, 3) and (2, 1, −1). The joining vector is (−1, 4, −1). The cross product of the directions is (2(−1) − 3(1), 3(2) − 1(−1), 1(1) − 2(2)) = (−5, 7, −3).

Dot the joining vector with it: 5 + 28 + 3 = 36. That is not zero, so the lines are skew. The magnitude of the cross product is √(25 + 49 + 9) = √83, so d = 36/√83, about 3.95 units. Check: a direct minimisation of the squared distance gives the same 3.9515.

Problem 3: parallel lines

Problem 3. Find the distance between r = (1, 0, 2) + λ(2, 1, 2) and r = (3, 3, 1) + μ(2, 1, 2).

The directions are the same, so the lines are parallel and the skew formula would divide by zero. Use d = |(a₂ − a₁) × b| / |b|. Here a₂ − a₁ = (2, 3, −1) and b = (2, 1, 2). The cross product is (3(2) − (−1)(1), (−1)(2) − 2(2), 2(1) − 3(2)) = (7, −6, −4), with magnitude √101. Also |b| = 3.

So d = √101/3, about 3.35 units. Check: the point of the first line closest to (3, 3, 1) comes at λ = 5/9, and the distance from there to (3, 3, 1) is also 3.350.

Where marks are lost

The first slip is using the skew formula on parallel lines, where the cross product vanishes. Always check whether the directions are proportional before you start. The second is taking the joining vector from the wrong pair of points, or mixing up the order in the cross product, which only changes the sign. That is why the formula has the modulus. The third is forgetting to divide by the magnitude of the cross product, and quoting the dot product itself.

For direction ratios and angles between lines, the vector algebra chapter page is the place to revise the basics.

Frequently asked questions

What makes two lines skew?

They are not parallel and they never meet. Skew lines do not lie in one plane, which is why the determinant of the joining vector and the two directions is not zero.

Why is the shortest distance along the common perpendicular?

Any other segment joining the two lines is slanted against that perpendicular, so it is longer. The shortest distance is the length of the one segment that is perpendicular to both lines.

Does the order of the lines change the answer?

No. Swapping the lines flips the sign of the dot product, but the formula takes the modulus, so the distance is the same positive number either way.

What if the dot product on top comes out as zero?

Then the lines are coplanar and, if they are not parallel, they intersect, so the shortest distance is zero. Check the arithmetic once, then state that the lines meet.

Method and photo sources

Method checked against NCERT Class 12 Mathematics, Chapter 11, section 11.5. The lines and answers in the three problems are our own, each checked by a direct numerical calculation.

Photo: set square, pencils and notebook on a wooden table on Pexels, under the Pexels licence, cropped to 16:9 and compressed.

Explore related tuition services: maths tuition · home tuition · online tuition