Distance between skew lines
Two lines in space that are not parallel usually cross — but only if they live in the same plane. Give them a little extra room, and they can pass each other at different "levels" without ever meeting: an overpass road crossing above a street it never touches. Such lines are called skew, and they are impossible to picture correctly in a flat two-dimensional sketch — a genuinely three-dimensional idea. This section covers the CBSE Class 12 syllabus point on skew lines within Three-Dimensional Geometry: recognising when two lines are skew (as opposed to parallel or intersecting), and computing the unique shortest distance between them using the scalar triple product. The same core formula, applied to this specific case, also builds the vector-algebra fluency — cross products, dot products, magnitudes — that the rest of the chapter leans on.
Skew lines are non-parallel, non-intersecting lines in three-dimensional space, and the shortest distance between them is the length of their unique common perpendicular, computed as .
The core idea
Two conditions define skew. Lines with direction vectors and are skew when they satisfy both of the following simultaneously: they are not parallel, and they do not intersect.
where: are the direction vectors of the two lines; a zero cross product means one direction is a scalar multiple of the other, so the lines are parallel and cannot be skew.
Why three dimensions matters. In a plane, any two distinct non-parallel lines are forced to intersect — there simply isn't room for them to avoid each other. A third dimension removes that constraint: two lines can point in different directions and still never cross, because they can sit at different "heights" relative to one another. This is why skew lines are, in a sense, the typical relationship between two random lines in space — intersecting or parallel are the special, coincidental cases, whereas skewness needs no special coincidence at all.
A quick screening check before computing anything. Before reaching for the distance formula it helps to test both skew conditions in one pass: form the scalar triple product . If the lines are parallel and this formula does not apply at all; if the triple product is zero while the cross product is nonzero, the lines are coplanar and intersecting, so the shortest distance is simply . Only when the cross product is nonzero and the triple product is nonzero are the lines genuinely skew, and only then does the formula below hand back a meaningful positive distance.
The common perpendicular gives the distance. Even though skew lines aren't parallel, there is still exactly one line segment perpendicular to both of them, and its length is the shortest distance between the two lines. The vector points along the direction of this unique common perpendicular, since it is perpendicular to both and by definition of the cross product.
The goal is to turn the geometric idea of "the length of the unique common perpendicular between two skew lines" into a formula built only from the two lines' position vectors and direction vectors, using nothing beyond the dot product, the cross product, and the idea of projecting one vector onto another — no calculus and no coordinate-by-coordinate minimisation is needed once the right perpendicular direction is identified.
Step 1. Set up the two lines as and , where are position vectors of one known point on each line and are their direction vectors. Since the lines are skew, , and this cross product is perpendicular to both and by the defining property of the cross product — so it points exactly along the one line segment that can meet both given lines at right angles.
Step 2. Take the connecting vector , which runs from the known point on line 1 to the known point on line 2. This vector generally does not lie along the common perpendicular itself, but it does span the same gap between the two lines, just measured along a different, slanted path.
Step 3. Project onto the direction . The scalar component of one vector along another is its dot product with a unit vector in that direction, so the length of the projection is . Because is perpendicular to both lines, this projection strips away the part of the connecting vector that runs along the lines' own directions and keeps only the part measured perpendicular to both — which is exactly the common-perpendicular length, independent of which particular points were chosen on the two lines.
Step 4. Write the result compactly as the shortest distance,
The absolute value bars matter: the scalar triple product in the numerator can come out negative depending on the orientation of the vectors chosen, but a distance is never negative.
Worked example
Problem. Show that and are skew, and find the shortest distance between them.
Step 1. Check the direction vectors are not proportional. and — there is no single scalar with , so the lines are not parallel.
Step 2. Compute the cross product, which will point along the common perpendicular:
where: each component comes from expanding the determinant along the top row, e.g. the component is .
Step 3. Compute the connecting vector between a point on each line, , and dot it with the cross product: .
Step 4. Since this scalar triple product is nonzero, the two points and do not lie in a common plane through both direction vectors, so the lines do not intersect. Combined with Step 1, both skew conditions hold — the lines are confirmed skew.
Step 5. Find the magnitude of the cross product: .
Step 6. Apply the shortest-distance formula: units. The shortest distance between the two skew lines is units.
Competitive stretch
For lines through with and through with , the same six steps give connecting vector , cross product , dot product , magnitude , and so units — notice the dot product and the squared magnitude coincided numerically here, which is a coincidence of these particular numbers, not a general shortcut.
Common traps
- Assuming "not parallel" means "skew." Two non-parallel lines can still intersect — the scalar triple product must also be checked and confirmed nonzero.
- Sign errors in the cross product, especially the negative sign on the component of the determinant expansion; one flipped sign changes the whole answer.
- Reporting a negative distance. The scalar triple product itself can be negative; distance is always its absolute value.
- Mixing up with . The connecting vector uses fixed points on each line, not the direction vectors.
Ask the tutor: Want to work through checking whether a given pair of lines is skew and then finding their shortest distance, step by step?
How is checking for skew lines different from checking for coplanar lines?
They are two sides of the same test. Two lines are coplanar exactly when the scalar triple product equals zero, which covers both the parallel case and the intersecting case. Skew lines are simply the non-coplanar case: not parallel (so ) and the scalar triple product nonzero. So proving skewness means combining a parallel check with a coplanarity check, and confirming both fail.
Why does dividing by the magnitude of b1 cross b2 give a distance and not just a number?
The dot product is a projection of the connecting vector onto the direction of the common perpendicular, scaled by the length of . Dividing by removes that scaling, leaving exactly the length of the projection — which, because is perpendicular to both lines, is precisely the length of the common perpendicular segment, i.e. the shortest distance.
What if I forget to check skewness and just apply the formula anyway?
The formula itself still gives a correct number, but that number can be misleading if you have not verified the lines are actually skew. If the lines are parallel, this particular formula does not apply at all (a different parallel-lines distance formula is needed). If the lines intersect, the scalar triple product comes out to zero and the formula correctly returns — a valid result, but it means the lines meet, not that they are skew. Always state the skew check explicitly before quoting a nonzero distance.