In two dimensions a straight line has an equation like y = mx + c. In three dimensions things change. A line needs a point and a direction, and a flat surface, called a plane, needs a point and a direction at right angles to it. With vectors, both are easy to write down. This lesson shows how to find equations of lines and planes in 3D, where they meet, and the angles and distances between them.
In this lesson you will learn
- The vector and Cartesian equations of a line in 3D
- The equation of a plane from a point and a normal vector
- How to find a plane through three points
- How to find where a line meets a plane
- Angles between lines and planes, and the distance from a point to a plane
You should know vectors and 3D vectors, the dot product and the cross product.
The Equation of a Line
A line through the point with position vector a, in the direction d, has vector equation
Line
r = a + td, where t is any real number
Each value of t gives one point on the line.
Line through A(1, 2, 3) and B(3, −1, 4)
d = B − A = (2, −3, 1)
r = (1, 2, 3) + t(2, −3, 1)
t = 0 gives A, t = 1 gives B, t = 2 gives (5, −4, 5)
Cartesian form: (x − 1)/2 = (y − 2)/(−3) = (z − 3)/1
The Equation of a Plane
A vector n at right angles to a plane is called a normal. If A is a point on the plane, then for any point R on it, the vector from A to R lies in the plane, so it is perpendicular to n. That gives n · (r − a) = 0.
Plane
n · r = n · a, which in Cartesian form is ax + by + cz = d, where n = (a, b, c)
Plane through (1, 0, 2) with normal n = (2, −1, 3)
2x − y + 3z = 2(1) − 1(0) + 3(2) = 8
Plane: 2x − y + 3z = 8
Read the normal straight from the coefficients: the plane 2x − y + 3z = 8 has normal (2, −1, 3).
A Plane Through Three Points
Two vectors in the plane give a normal through the cross product.
A(1, 0, 0), B(0, 2, 0), C(0, 0, 3)
AB = (−1, 2, 0), AC = (−1, 0, 3)
n = AB × AC = (6, 3, 2)
6x + 3y + 2z = 6(1) + 0 + 0 = 6
Check B: 0 + 6 + 0 = 6 ✓ Check C: 0 + 0 + 6 = 6 ✓
Where a Line Meets a Plane
Write the line’s x, y and z in terms of t, put them into the plane’s equation, and solve for t.
Line r = (1, 2, 3) + t(2, −3, 1)
Plane 2x − y + 3z = 8
2(1 + 2t) − (2 − 3t) + 3(3 + t) = 8
2 + 4t − 2 + 3t + 9 + 3t = 8
10t + 9 = 8, t = −0.1
Point: (1 − 0.2, 2 + 0.3, 3 − 0.1) = (0.8, 2.3, 2.9)
If t disappears and you get something false, like 9 = 8, the line is parallel to the plane and never meets it. If you get something always true, the line lies inside the plane.
Angles and Distances
| Quantity | Formula |
|---|---|
| Angle θ between line (direction d) and plane (normal n) | sin θ = |d · n| / (|d||n|) |
| Angle θ between two planes | cos θ = |n₁ · n₂| / (|n₁||n₂|) |
| Distance from point (x₁, y₁, z₁) to plane ax + by + cz = d | |ax₁ + by₁ + cz₁ − d| / √(a² + b² + c²) |
The line-plane formula uses sine, not cosine. The dot product gives the angle between the line and the normal, and the angle with the plane is 90° minus that.
1) Angle between r = (1, 2, 3) + t(2, −3, 1) and 2x − y + 3z = 8
d · n = 4 + 3 + 3 = 10, |d| = |n| = √14
sin θ = 10/14, θ = 45.6°
2) Angle between 2x − y + 3z = 8 and x + y + z = 2
n₁ · n₂ = 2 − 1 + 3 = 4
cos θ = 4 / (√14 × √3) = 0.617, θ = 51.9°
3) Distance from (4, 1, 3) to 2x − y + 3z = 8
|8 − 1 + 9 − 8| / √14 = 8/√14 ≈ 2.14
Common Mistakes
- Using cosine for the line-plane angle. The dot product gives the angle with the normal; use sine for the angle with the plane.
- Using a point as the direction. The direction of the line through A and B is B − A, not B.
- Forgetting the modulus in the distance formula. A distance is never negative.
- Not checking the plane. Put each given point back into your equation.
Practice Exercises
Exercise 1. Find the equation of the plane through (2, 1, −1) with normal (1, 4, 2).
Show answer
x + 4y + 2z = 2 + 4 − 2 = 4.
Exercise 2. Find the direction of the line where the planes 2x − y + 3z = 8 and x + y + z = 2 meet.
Show answer
The line lies in both planes, so it is perpendicular to both normals. Its direction is n₁ × n₂ = (2, −1, 3) × (1, 1, 1) = (−4, 1, 3).
Frequently Asked Questions
Why is there no single equation like y = mx + c for a 3D line?
One equation in x, y and z describes a plane, not a line. A line in 3D needs two conditions at once, which is why its Cartesian form has two equals signs.
Can two lines in 3D miss each other without being parallel?
Yes. Such lines are called skew lines. Think of a road on a bridge and a railway running underneath in a different direction: they never meet and are not parallel.
Summary
- A line is r = a + td: a point plus multiples of a direction.
- A plane is n · r = n · a, or ax + by + cz = d with normal (a, b, c).
- Substitute a line into a plane and solve for t to find where they meet.
- Use sine for line-plane angles, cosine for plane-plane angles.
