3.6.12 · D13D Geometry

Foundations — Skew lines — shortest distance

2,419 words11 min readBack to topic

Before you can read the shortest-distance formula, you must be able to read every mark inside it. We will build them one at a time, each on top of the last. Nothing is used before it is drawn.


1. A point and an arrow (vector) in 3D

Why do we need this? Because a line has to start somewhere. In the parent topic, and are just "a known point I picked on each wire."

Figure s01 shows the arrow : the burnt-orange arrow runs from the origin to the teal point, and the three dotted helper legs spell out the walk " East, then South (that is North), then Up." Read the arrow as "the recipe to reach that point."

Figure — Skew lines — shortest distance

The little hat, as in , means a unit arrow (length exactly ) pointing along the East, North, and Up axes. So and say the same thing — one uses commas, the other names each axis explicitly.


2. A direction vector — "which way does the wire point?"

A position vector answers where; a direction vector answers which way. The parent uses for the two wires' directions. See Equation of a Line in 3D for how a point plus a direction is a whole line.

Figure s02 draws this: the orange point is (the setting ), the small orange arrow is one step of , and the plum and dark dots mark and . Notice every dot lands on the same teal line — turning the dial just slides you along it.

Figure — Skew lines — shortest distance

3. Length of a vector:

Why the square root of squares? It is the Pythagoras theorem in 3D: the arrow is the long diagonal of a box with sides . The final shortest distance is a length, so it must come out of a .


4. The gap vector — the arrow between the two lines

This is the arrow the rest of the page keeps calling "the gap." Our job will be to keep only the part of it that points straight across both wires.


5. The dot product: "how much of one arrow points along another"

Why does the topic need it? To measure how much of the gap vector points in a chosen direction — that projected amount will become the shortest distance once the chosen direction is the both-perpendicular one. The key fact:

Figure s03 shows a plum arrow and a teal arrow . Drop a dotted vertical line from the tip of onto : the orange arrow is 's shadow on . The dot product multiplies that shadow's length by — so it literally measures "how much of lies along ."

Figure — Skew lines — shortest distance

Here is why picking any points is safe: sliding along a wire adds a multiple of to the gap, and (once we meet ) that added piece is , so its dot with is and the shadow length does not change.


6. The cross product: "give me an arrow perpendicular to both"

Why does the topic need this and not something else? The whole point of "shortest stick" is that it points perpendicular to both wires — and the cross product is the only standard tool that manufactures a both-perpendicular direction directly. See Vector Cross Product for the full determinant recipe.


7. The unit vector — a direction with the length stripped off

That is the entire reason the main formula has in the denominator: it is the "divide by its length" step that converts into the unit direction .


8. The scalar triple product: dot-of-a-cross

Why the topic loves it: the numerator of the main formula, , is a triple product . And a box has zero volume exactly when its three edges lie flat in one plane — so:


9. Skew, parallel, intersecting — the three fates of two lines

The idea of the single connecting stick living perpendicular to both is what Plane containing a line and the parent both lean on.


Prerequisite map

The diagram below shows how each foundation feeds into the final shortest-distance formula. Read arrows as "is needed for". A point plus a direction build a line. The length bars and the cross product together build the unit vector . The dot product turns into a projection, and dot-plus-cross builds the scalar triple product. Those two strands — projection and triple product — join at the bottom into the shortest-distance result.

Point and position vector a

Line = point plus direction

Direction vector b

Gap vector a2 minus a1

Projection onto n-hat

Length bars gives distance

Unit vector n-hat

Dot product measures overlap

Cross product gives both-perpendicular arrow

Scalar triple product

Shortest distance between skew lines


Equipment checklist

Test yourself — you are ready when each answer comes instantly.

What does tell you to do from the origin?
Walk 2 East, 1 South (i.e. North), 3 Up to reach the point.
In , what does turning the dial do?
Slides the tip along the whole straight line; sits at .
How do you compute the length of ?
(3D Pythagoras).
What is the gap vector between two lines, and how do you build it?
The arrow from a point on line 1 to a point on line 2 (subtract component by component).
What number does give, and when is it ?
; it is exactly when the arrows are perpendicular.
What is the length of the shadow of along a unit vector ?
The plain dot number (and the shadow arrow is ).
What kind of object is and what fixes its direction?
A vector perpendicular to both; the right-hand rule sets which way it points.
When is ?
When and are parallel ().
How do you turn into the unit vector ?
Divide by its own length: .
What does the scalar triple product measure, and does its ordering matter?
Signed box volume; cyclic order keeps the value, swapping two entries flips the sign, and means coplanar.
What are the three possible relationships between two lines in 3D?
Intersecting, parallel, or skew.
Which case makes the main shortest-distance formula divide by zero?
Parallel lines, because .