A = (0, 0, 0), d = (0, 0, 1), P = (3, 4, 0)
AP × d
(4, −3, 0).
The distance from a point to the line through with direction is .
This page is easier if you are comfortable with:
The magnitude of the cross product is the area of the parallelogram on those two vectors. Dividing by the base length gives the height, which is the shortest distance from to the line.
In two dimensions the same distance comes from the point-to-line formula. The vector method works in any dimension where the cross product is defined, and the line is given as in its vector equation.
Another way is to find the foot of the perpendicular by setting the scalar product of (to a general point on the line) with equal to zero.
The shortest distance from a point to a line in space is measured along the perpendicular. The cross product gives it without finding the foot of the perpendicular.
The shortest distance from P to the line is along the segment that meets the line at a right angle.
These examples are worked by hand, step by step, so you can compare your own working.
Find the distance from to the line through the origin in direction .
Find the distance from to the line through in direction .
Find the distance from to the line through the origin with direction .
A few situations come up again and again. Knowing them saves time and helps you spot answers that cannot be right.
AP × d
(4, −3, 0).
|AP × d|
5.
distance = 5/|d|
5.
|AP × d|/|d| = 10/2
5.
Distance from P to the line through A with direction d is |AP × d|/|d|.
AP = (3, 4, 0), d = (0, 0, 1).
√(16 + 9).
|d| = 1.
d = (0, 0, 2): 10 ÷ 2.
|AP × d| ✗
divide by |d| ✓
Normalise.
AP·d ✗
AP × d ✓
Cross product.
distance to A ✗
perpendicular distance ✓
Shortest.
PA ✗
either works up to sign ✓
Magnitude.
Try each one on paper, then open the answer. Use the solver above to see the full working.
5
10
5
2
1
0.7071
Unlimited fresh questions with instant marking. Choose a level, work it out on paper, then type your answer.
Solve: …
|AP × d|/|d|.
|AP × d| is the parallelogram area; divide by the base |d| for the height.
No.
The point is on the line.
shortest distance between skew lines.
vector equation of a line.
More in Vectors and matrices and the formula sheets.