Skip to content
Tutorials Center
My learning

Topics

Lesson 7 of 39 · Vectors and Curves in Space

Lines and Planes in Space

Write equations of lines and planes in three-dimensional space, find intersections and distances from a point to a plane, with worked examples and Python checks.

Lines and planes are the simplest objects in space, and tangent lines and tangent planes will approximate every smooth curve and surface we study later. In this lesson you learn their equations, how to decide whether they meet, and how to measure distances.

Lines

A line through the point P₀(x₀, y₀, z₀) in the direction of a nonzero vector d = ⟨a, b, c⟩ consists of all points r(t) = r₀ + t d, where t is any real number. In components these are the parametric equations:

Text
x = x₀ + a t,   y = y₀ + b t,   z = z₀ + c t

If a, b, c are all nonzero, eliminating t gives the symmetric equations (x - x₀)/a = (y - y₀)/b = (z - z₀)/c.

Worked example: the line through A(1, 2, 3) and B(4, 0, 6). The direction is AB = ⟨3, -2, 3⟩, so x = 1 + 3t, y = 2 - 2t, z = 3 + 3t. At t = 0 we get A, at t = 1 we get B.

Two lines in space can be parallel (directions are multiples), intersecting (one common point), or skew (not parallel and never meeting). Skew lines do not exist in a plane.

Worked example: L₁: r = ⟨1, 0, 0⟩ + t⟨1, 1, 0⟩ and L₂: r = ⟨0, 1, 1⟩ + s⟨0, 1, 1⟩. Setting the points equal component by component: the x equation 1 + t = 0 gives t = -1; the y equation t = 1 + s gives s = -2; the z equation 0 = 1 + s would need s = -1, a contradiction. The directions are not parallel, so the lines are skew.

Python Do two lines intersect?

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Planes

A plane is determined by a point P₀(x₀, y₀, z₀) and a normal vector n = ⟨a, b, c⟩ perpendicular to the plane. A point P(x, y, z) is on the plane exactly when P₀P ⟂ n:

Text
a(x - x₀) + b(y - y₀) + c(z - z₀) = 0     (point-normal form)
a x + b y + c z = d                        (scalar form, d = a x₀ + b y₀ + c z₀)

Worked example: the plane through P(1, 2, 3), Q(2, 0, 4), R(0, 1, 1). Two vectors in the plane: PQ = ⟨1, -2, 1⟩, PR = ⟨-1, -1, -2⟩. A normal is PQ × PR = ⟨(-2)(-2) - 1(-1), 1(-1) - 1(-2), 1(-1) - (-2)(-1)⟩ = ⟨5, 1, -3⟩. So 5x + y - 3z = d; using P: 5 + 2 - 9 = -2. The plane is 5x + y - 3z = -2. Check Q: 10 + 0 - 12 = -2. Check R: 0 + 1 - 3 = -2.

Python Plane through three points

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Angles, intersections, distances

  • Angle between planes: the angle between their normals (acute version if you want the dihedral angle).
  • Line of intersection of two planes: its direction is n₁ × n₂; then find one common point.
  • Line meets plane: substitute x(t), y(t), z(t) into the plane equation and solve for t.
  • Distance from a point P₁(x₁, y₁, z₁) to the plane ax + by + cz = d:
Text
D = |a x₁ + b y₁ + c z₁ - d| / √(a² + b² + c²)

This is the length of the projection of P₀P₁ onto n.

Worked example: the distance from (2, 1, 4) to x + 2y + 2z = 3: numerator |2 + 2 + 8 - 3| = 9, denominator √(1 + 4 + 4) = 3, so D = 3.

Worked example (line meets plane): the line x = 1 + t, y = 2t, z = 3 - t and the plane x + y + z = 7. Substituting: (1 + t) + 2t + (3 - t) = 4 + 2t = 7, so t = 1.5 and the point is (2.5, 3, 1.5).

Python Distance to a plane and a line-plane intersection

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The equation ax + by + cz = d describes a plane only in three-dimensional space. In the xy-plane, ax + by = d is a line, and in space the same equation (with c = 0) is a plane parallel to the z axis.

A picture

Python Plot a plane and a line piercing it

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. Which vector is a direction of the line through (1, 2, 3) and (4, 0, 6)?

    Subtract the first point from the second: ⟨4 - 1, 0 - 2, 6 - 3⟩.
  2. 2. A normal vector to the plane 2x - y + 5z = 10 is

    The coefficients of x, y, z in the scalar form give a normal.
  3. 3. Two lines in space that are not parallel and never meet are called

    Skew lines do not lie in one plane.
  4. 4. The distance from the origin to the plane 3x + 4y = 10 (in space) is

    |0 - 10| / √(9 + 16) = 10 / 5 = 2.

Summary

  • A line is r = r₀ + t d; a plane is n · (r - r₀) = 0, i.e. ax + by + cz = d.
  • A normal to a plane through three points is a cross product of two edge vectors.
  • Lines in space may be parallel, intersecting or skew.
  • Distance from a point to a plane is |ax₁ + by₁ + cz₁ - d| / |n|.

Next: Vector Functions and Space Curves