Grade by Grade
C. Geometry and Algebra of Vectors · Lines and Planes

Distances from a Point to a Line and to a Plane

C4.7About 70 minutes
Learning goals
  • I can explain why the shortest distance is measured along a perpendicular.
  • I can find the distance from a point to a plane using a projection onto the normal.
  • I can find the distance from a point to a line in three-space using a cross product, and the closest point on the line.
  • I can find the distance between parallel planes and between parallel lines.

Words to know

distance (point to line or plane)
The shortest distance, measured along the perpendicular.
scalar projection
The signed length of the shadow of a onto b: (a · b)/|b|.
foot of the perpendicular
The point on the line or plane closest to the given point.
parallel planes
Planes with parallel normals; the distance between them is the same everywhere.

How far is it, really?

A drone hovering over a sloped solar-panel roof: how far is it from the roof? A lamp hanging over a table: how far is it from the table's edge? "Distance" always means the shortest distance, and the shortest path from a point to a line or a plane is always the perpendicular one. In this lesson you will compute these distances with projections and cross products.

Remember from Grade 10: in Analytic Geometry you found the distance from a point to a line in two-space. Remember from Dot and Cross Products: the scalar projection of a onto b is (a · b)/|b|, and |a × b| is the area of the parallelogram formed by a and b.

Distance from a point to a plane

Let the plane be Ax + By + Cz + D = 0 with normal n = [A, B, C], and let P(x₀, y₀, z₀) be the point. Choose any point Q(x₁, y₁, z₁) on the plane. The distance is the length of the projection of QP onto n:

d = |QP · n| / |n| = |A(x₀ − x₁) + B(y₀ − y₁) + C(z₀ − z₁)| / |n|.

Because Q is on the plane, Ax₁ + By₁ + Cz₁ = −D. So

d = |Ax₀ + By₀ + Cz₀ + D| / √(A² + B² + C²).

The same idea in two-space gives d = |Ax₀ + By₀ + C| / √(A² + B²), a shortcut for the Grade 10 method (perpendicular line, point of intersection, then the length formula).

Distance between parallel planes: pick any point on one plane and find its distance to the other. If both are written with the same normal, Ax + By + Cz + D₁ = 0 and Ax + By + Cz + D₂ = 0, then d = |D₁ − D₂| / √(A² + B² + C²).

P(x₀, y₀, z₀)QfootnQPdd = |QP · n| / |n|= |Ax₀ + By₀ + Cz₀ + D| / √(A² + B² + C²)
The distance d from P to the plane is the length of the projection of QP onto the normal n, where Q is any point of the plane. The dashed segment from P to the foot is perpendicular to the plane.

Distance from a point to a line in three-space

For the line r = r₀ + tm through Q₀, and a point P:

d = |Q₀P × m| / |m|.

(See the parallelogram picture: area ÷ base = height.)

The foot of the perpendicular. The closest point F on the line has the form r₀ + tm, with FP perpendicular to m. Solve (r₀ + tm − p) · m = 0 for t. Then d = |FP|. This gives both the distance and the closest point.

Distance between parallel lines: take a point on one line and find its distance to the other.

PQ₀mQ₀Pdlinearea = |Q₀P × m|base = |m|height d = |Q₀P × m| / |m|
The vectors m and Q₀P span a parallelogram. Its area is |Q₀P × m| and its base is |m|, so its height, the distance from P to the line, is d = |Q₀P × m| / |m|.
Worked example

Example 1: Point to plane

Find the distance from P(2, −1, 3) to the plane 2x − y + 2z = 5.

  1. Write the plane as 2x − y + 2z − 5 = 0, so A = 2, B = −1, C = 2, D = −5.
  2. Numerator: |2(2) − (−1) + 2(3) − 5| = |4 + 1 + 6 − 5| = 6.
  3. Denominator: √(4 + 1 + 4) = 3.

d = 6/3 = 2.

Worked example

Example 2: A plane given in vector form

Find the distance from A(−5, 3, 7) to the plane r = [0, 0, 2] + s[−1, 1, 3] + t[2, 0, −3].

  1. From the lesson Intersection of a Line and a Plane, this plane is 3x − 3y + 2z − 4 = 0.
  2. Numerator: |3(−5) − 3(3) + 2(7) − 4| = |−15 − 9 + 14 − 4| = 14.
  3. Denominator: √(9 + 9 + 4) = √22.

d = 14/√22 = 7√22/11 ≈ 2.98, the same value we found there from the foot of the perpendicular.

Worked example

Example 3: Point to line, with the closest point

Find the distance from P(1, 2, 3) to the line r = [2, 0, 1] + t[1, 1, 0], and the closest point on the line.

  1. Q₀ = (2, 0, 1), so Q₀P = [−1, 2, 2]. m = [1, 1, 0].
  2. Q₀P × m = [(2)(0) − (2)(1), (2)(1) − (−1)(0), (−1)(1) − (2)(1)] = [−2, 2, −3], with magnitude √17.
  3. d = √17 / √2 = √8.5 ≈ 2.92.
  4. Closest point: F(t) − P = [1 + t, −2 + t, −2]. Set it · m = 0: (1 + t) + (−2 + t) = 0, so t = 1/2 and F = (2.5, 0.5, 1).
  5. Check: FP = [−1.5, 1.5, 2], |FP| = √(2.25 + 2.25 + 4) = √8.5 ✓.

d = √8.5 ≈ 2.92, at the closest point (2.5, 0.5, 1).

Worked example

Example 4: Parallel planes

Find the distance between 2x − 2y + z = 3 and 2x − 2y + z = −6.

  1. Same normal [2, −2, 1], so the planes are parallel. Write them as 2x − 2y + z − 3 = 0 and 2x − 2y + z + 6 = 0.
  2. d = |−3 − 6| / √(4 + 4 + 1) = 9/3 = 3.
  3. Check with a point: (0, 0, 3) is on the first plane. Its distance to the second is |0 + 0 + 3 + 6|/3 = 3 ✓.

The planes are 3 units apart.

Just for fun

The shortest distance from a point to a plane is along the normal. The shortest distance from a hungry teenager to the fridge is also along the normal: straight there, no detours.

Hands-on activity

Find the shortest path

You need: a tape measure, a table, a broom (or a long stick) and a coin.

  1. Point to plane. Hold the end of the tape measure at a corner of the tabletop. Stretch it to several different spots on the floor and record the readings. Which reading is smallest, and where is that spot?
  2. Compare the smallest reading with the table's height measured straight down.
  3. Point to line. Lay the broom on the floor. Put a coin on the floor about 40 cm from the handle. Measure from the coin to five points along the handle. Find the smallest reading. Check with a book corner (a right angle) that the shortest segment meets the handle at 90°.

What to look for: the shortest reading is always the perpendicular one: straight down to the floor in step 1, and at a right angle to the handle in step 3. Every other reading is longer, as the Pythagorean theorem predicts.

Your turn

1

Find the distance from (1, 1, 1) to x + 2y + 2z = 14.

2

Find the distance from the origin to 3x − 4y + 12z = 26.

3

Find the distance from (2, 3) to the line 5x − 12y + 4 = 0 in two-space.

4

Find the distance from P(3, 0, 4) to the z-axis.

5

Find the distance from P(1, 0, 2) to the line r = [0, 1, 0] + t[1, 0, 1].

6

Find the distance between x + y + z = 1 and x + y + z = 7.

7

Find the foot of the perpendicular from P(1, 2, 3) to x + y + z = 0, and the distance.

More practice: warm-up

1

How far is (0, 0, 5) from the xy-plane?

2

How far is (3, −2, 7) from the plane x = 0?

3

Find |n| for 2x − y + 2z = 1.

4

Find the distance from the origin to x + y + z = 3.

5

Find the distance from (0, 0) to the line x + y = 2.

More practice: on your own

1

Find the distance from P(4, −1, 2) to the plane r = [1, 0, 0] + s[1, 1, 0] + t[0, 1, 1].

2

Find the distance from P(2, 1, −1) to the line through A(0, 0, 0) and B(1, 2, 2).

3

Find the distance between 3x − 6y + 2z = 7 and 6x − 12y + 4z = 0.

4

Find the points on the z-axis that are 3 units from the plane x + 2y + 2z = 4.

5

Find the distance between the parallel lines r = [1, 0, 0] + t[1, 1, 1] and r = [0, 1, 1] + s[1, 1, 1].

Challenge

1

Derive the formula d = |Ax₀ + By₀ + Cz₀ + D| / √(A² + B² + C²).

2

Find the two planes parallel to 2x − y + 2z = 4 that are 3 units from it.

3

Find the point on the line r = [1, 1, 0] + t[1, 0, 1] closest to P(3, 3, 3), and the distance.

Check your understanding

Quiz

1.

What is the distance from (1, 2, 3) to the plane 2x + y − 2z + 7 = 0?

2.

Which formula gives the distance from P to the line r = r₀ + tm through Q₀?

3.

What is the distance between the planes 2x − y + 2z = 1 and 2x − y + 2z = 10?

4.

The shortest distance from a point to a plane is measured along:

5.

What is the distance from the origin to the plane 2x + 3y + 6z = 14?

6.

What is the distance from (3, 4) to the line 3x + 4y − 5 = 0 in two-space?

For parents and teachers

Big idea (C4.7): distance always means shortest distance, which is along a perpendicular. To a plane, project onto the normal: d = |Ax₀ + By₀ + Cz₀ + D|/|n|. To a line in three-space, use the parallelogram: d = |Q₀P × m|/|m|.

How to help: The tape-measure activity shows physically that the perpendicular path is the shortest. When your teen uses a formula, ask them to say why it works (projection or area ÷ base); that understanding prevents most mix-ups.

Common difficulties:

  • Forgetting to move everything to one side (Ax + By + Cz + D = 0) before using the formula, so D has the wrong sign.
  • Forgetting the absolute value (distances are never negative).
  • Using a dot product instead of a cross product for point-to-line distance.
  • For parallel planes, using |D₁ − D₂| without first making the normals identical.