Learning Objectives
By the end of this section, you will be able to:
- Write the vector, parametric, and symmetric equations of a line in three-dimensional space
- Derive the scalar and vector equations of a plane using normal vectors and points
- Determine whether a line and plane are parallel, intersecting, or if the line lies within the plane
- Calculate distances from points to lines and planes using vector projections
- Find angles between lines, between planes, and between a line and a plane
- Apply these concepts to real-world problems in physics, computer graphics, and machine learning
The Big Picture: Geometry Meets Algebra
"Lines and planes are the simplest geometric objects—and yet they form the foundation for understanding everything from neural network decision boundaries to airplane navigation."
In two dimensions, we described lines using equations like . But in three dimensions, this familiar form breaks down. A single equation like no longer defines a line—it defines an entire plane (with no restriction on ).
To describe lines in 3D, we need a fundamentally different approach: we think of a line as a path traced by a moving point. This leads to parametric equations, where a single parameter generates every point on the line.
For planes, we use a different key insight: every plane can be uniquely determined by a point and a normal vector—a vector perpendicular to the plane. This connects directly to the dot product: every point on the plane satisfies .
Why This Matters
Understanding lines and planes in 3D is essential for:
- Computer Graphics: Ray tracing, collision detection, 3D rendering
- Robotics: Path planning, workspace analysis, obstacle avoidance
- Machine Learning: Linear classifiers, support vector machines, decision boundaries
- Physics: Light rays, electromagnetic waves, particle trajectories
Historical Context
The algebraic description of lines and planes evolved through centuries of mathematical development:
- René Descartes (1637) invented coordinate geometry, connecting algebra to geometry for the first time
- Leonhard Euler (1748) systematically developed equations for planes and their properties
- William Rowan Hamilton (1843) introduced quaternions, leading to modern vector notation
- Josiah Willard Gibbs (1880s) developed the modern vector algebra we use today, including dot and cross products
The parametric representation of curves was crucial for the development of calculus in multiple dimensions. Newton and Leibniz both used parametric descriptions when studying planetary orbits and other curves that couldn't be expressed as simple functions.
Lines in Three-Dimensional Space
A line in 3D space is uniquely determined by two pieces of information:
- A point on the line (let's call it )
- A direction vector indicating which way the line goes
Vector Equation of a Line
Starting from point and traveling in direction , we can reach any point on the line by adding a scalar multiple of :
Vector Equation of a Line
or equivalently:
Here, is a parameter that can take any real value:
- When , we're at
- When , we've moved in the direction of
- When , we've moved opposite to
Intuition: The Parameter t as Time
Think of as time. At , a particle is at . As time passes, it moves along the line at constant velocity . Each value of gives a unique position.
Parametric Equations
Breaking the vector equation into components, we get the parametric equations:
Parametric Equations
Example: Find parametric equations for the line through with direction .
Solution:
At : . At : .
Symmetric Equations
If we solve each parametric equation for and set them equal, we get the symmetric equations:
Symmetric Equations
(Valid when )
When a Direction Component is Zero
If one of is zero, we can't divide by it. Instead, we write the corresponding coordinate as a constant.
Example: If the line has direction through , the symmetric form is:
Interactive Line Explorer
Use this interactive visualization to explore lines in 3D space. Adjust the starting point and direction vector to see how the parametric equation generates points along the line:
Interactive 3D Line Explorer
Point P₀ (x₀, y₀, z₀)
Direction d⃗ (a, b, c)
Parameter t
Parametric Equations
Planes in Three-Dimensional Space
A plane in 3D is determined by a point and a normal vector. The normal vector is perpendicular to every vector lying in the plane.
Scalar Equation of a Plane
For any point on the plane, the vector from to must be perpendicular to . This gives:
Scalar Equation of a Plane
where
Derivation: If , then:
Reading the Normal from the Equation
Given a plane equation , the normal vector is simply —the coefficients of !
Vector Equation of a Plane
We can also express the plane equation in compact vector form:
Vector Equation of a Plane
or equivalently:
Example: Find the equation of the plane through with normal .
Solution:
Interactive Plane Explorer
Explore how the normal vector and constant d affect the position and orientation of a plane:
Interactive 3D Plane Explorer
Normal Vector n⃗ (a, b, c)
Constant d
Display Options
Plane Equation
Line-Plane Relationships
A line and a plane in 3D can relate in exactly three ways:
| Relationship | Geometric Meaning | Algebraic Condition |
|---|---|---|
| Intersecting | Line crosses plane at exactly one point | n⃗ · d⃗ ≠ 0 |
| Parallel | Line never touches plane | n⃗ · d⃗ = 0 and line point not on plane |
| Contained | Entire line lies in plane | n⃗ · d⃗ = 0 and line point on plane |
Finding the Intersection Point
To find where a line intersects a plane:
- Write the line in parametric form:
- Substitute into the plane equation:
- Solve for
- Plug back to get the intersection point
Formula for t: Given line and plane :
Example: Find where the line through with direction intersects the plane .
Solution:
Interactive Intersection Explorer
Experiment with different line and plane configurations to see how they intersect (or don't):
Line-Plane Intersection Explorer
Line Point P₀
Line Direction d⃗
Plane Normal n⃗
Plane Constant d
Result
Distance Formulas
Distance from a Point to a Plane
The distance from point to plane is:
Point-to-Plane Distance
Geometric interpretation: This formula computes the length of the projection of any vector from the plane to the point onto the unit normal. The numerator is the scalar projection; the denominator normalizes the normal vector.
Example: Distance from to plane :
Distance from a Point to a Line
For point and line through with direction :
Point-to-Line Distance
Geometric interpretation: The cross product has magnitude equal to the area of the parallelogram formed by these vectors. Dividing by the base length gives the height, which is the perpendicular distance.
Angles Between Lines and Planes
The relationships between angles and dot/cross products make computing angles straightforward:
| Objects | Angle Formula |
|---|---|
| Two lines (directions d₁, d₂) | cos θ = |d⃗₁ · d⃗₂| / (|d⃗₁| |d⃗₂|) |
| Two planes (normals n₁, n₂) | cos θ = |n⃗₁ · n⃗₂| / (|n⃗₁| |n⃗₂|) |
| Line and plane (d, n) | sin θ = |d⃗ · n⃗| / (|d⃗| |n⃗|) |
Why Absolute Values?
We use absolute values because we want the acute angle between lines or planes. The dot product could be negative depending on vector orientations, but the angle should be between 0° and 90°.
Special cases:
- Perpendicular lines:
- Parallel lines:
- Perpendicular planes:
- Parallel planes:
Real-World Applications
Computer Graphics: Ray Tracing
In ray tracing, we model light as rays (lines) and compute their intersections with surfaces. For polygonal surfaces (triangles, quads), this means:
- Find the plane containing the polygon
- Compute the ray-plane intersection
- Check if the intersection point lies within the polygon bounds
Application: Rendering a 3D scene
For each pixel in the image, cast a ray from the camera through that pixel. Find the nearest object the ray intersects. The line-plane intersection formula runs billions of times in a single rendered frame!
Robotics: Collision Detection
Robot arms move through 3D space along planned trajectories. To avoid collisions:
- Model the arm segments as cylinders or line segments
- Model obstacles as planes, boxes, or other primitives
- Compute distances between arm and obstacles
- Adjust trajectory if distance falls below safety threshold
Aviation: Flight Path Planning
Aircraft must maintain safe separations. Their flight paths are modeled as lines in 3D space (latitude, longitude, altitude). Finding the closest approach distance between two flight paths uses the line-to-line distance formula:
For lines and , the distance is:
Machine Learning Connection
Lines and planes appear throughout machine learning, often as decision boundaries:
Linear Classifiers
In a linear classifier, we separate data points using a hyperplane (a plane in higher dimensions). The decision rule is:
This is exactly the plane equation ! The weight vector is the normal to the decision boundary, and is the offset.
Support Vector Machines (SVM)
SVMs find the hyperplane that maximizes the margin—the distance to the nearest training points. The margin is exactly the point-to-plane distance formula:
Neural Network Visualization
Each neuron in a neural network computes . Before the activation function , this is a hyperplane in input space. The activation "bends" the hyperplane into a more complex decision surface.
Geometric Intuition for Deep Learning
Understanding lines and planes helps you visualize what neural networks are doing: each layer transforms the data, and linear layers create hyperplane cuts through the feature space. ReLU activations fold these hyperplanes. Deep networks compose many such transformations.
Python Implementation
Parametric Lines in 3D
Planes from Points and Normals
Line-Plane Intersection
Distance Calculations
Test Your Understanding
Lines and Planes Quiz
Question 1 of 8What is the direction vector of the line x = 2 + 3t, y = -1 + t, z = 4 - 2t?
Summary
Lines in 3D Space
| Form | Equation |
|---|---|
| Vector | r⃗(t) = r⃗₀ + td⃗ |
| Parametric | x = x₀ + at, y = y₀ + bt, z = z₀ + ct |
| Symmetric | (x-x₀)/a = (y-y₀)/b = (z-z₀)/c |
Planes in 3D Space
| Form | Equation |
|---|---|
| Scalar | ax + by + cz = d |
| Vector | n⃗ · (r⃗ - r⃗₀) = 0 |
| Normal from equation | n⃗ = ⟨a, b, c⟩ |
Key Formulas
| Quantity | Formula |
|---|---|
| Line-plane intersection t | t = (d - n⃗·P₀) / (n⃗·d⃗) |
| Point-to-plane distance | |ax₁ + by₁ + cz₁ - d| / √(a²+b²+c²) |
| Point-to-line distance | |QP⃗ × d⃗| / |d⃗| |
| Angle between planes | cos θ = |n⃗₁·n⃗₂| / (|n⃗₁||n⃗₂|) |
Key Takeaways
- Lines in 3D require two pieces of information: a point and a direction vector
- Planes are defined by a normal vector that points perpendicular to the plane
- The dot product determines when lines are parallel to planes ()
- The cross product is essential for computing distances and finding normals
- These concepts directly apply to machine learning(decision boundaries) and computer graphics (ray tracing)
Coming Next: In the next section, we'll explore Quadric Surfaces—the 3D generalizations of conic sections like ellipses, hyperbolas, and parabolas. These surfaces include spheres, cylinders, cones, and more exotic shapes like hyperboloids.