In 2D you have already seen this idea. The slope-intercept form
y=ax+b
encodes exactly two pieces of information:
The direction: the slope a=tanθ, where θ is the angle the line makes with the x-axis (see polar coordinates for the connection between slope and angle).
A point: the y-intercept (0,b), which fixes where the line passes through the y-axis.
Try the illustration below. The blue dot lives on the y-axis at (0,b) — drag it up or down to change the intercept while the slope stays fixed. The green dot sits on the line at x=3.5 — drag it up or down to rotate the line while the intercept stays fixed.
y = ax + b — drag to change intercept (blue) or slope (green)
y = 1x + 0b = 0a = 1 (slope = tan θ)
—— current line (y = ax + b)- - - parallel family (same slope, different b)
💡 Drag the blue dot to slide the intercept · drag the green dot to rotate the line.
Notice what happens when you drag only the blue dot: the line translates vertically — and the four dashed lines (same slope, different intercepts) show the entire parallel family that shares the same direction. Every one of them has slope a; they are all valid if you only know the direction. Adding b — fixing the y-intercept — singles out exactly one line from this parallel family.
Conversely, if you drag only the green dot, the line rotates around the fixed intercept (0,b): all lines through a single point but with different slopes. The point alone is not enough; you need the direction too.
Change either ingredient and you get a different line. These two pieces of data — a point and a direction — are the minimal recipe for a line in any dimension.
In 3D, a slope no longer makes sense as a single number, but a direction vectorv plays the same role. The y-intercept generalises to an arbitrary known point r0 on the line.
Vector equation of a line
Let r0 be the position vector of a known point on the line, and let v be the direction vector of the line. Every point on the line can be reached by starting at r0 and walking some multiple of v:
r(t)=r0+tv,t∈R.
t=0 gives r0 itself.
As t increases, we move in the direction v.
As t decreases, we move in the opposite direction.
The graph below shows r0 (blue arrow from the origin) and v (green arrow, starting from the tip of r0). The grey dashed line is the full line generated by the equation. Drag either handle to explore.
r(t) = r₀ + tv — drag r₀ (blue) and v (green)
r₀ = (1, 2)v = (3, 1)
r(t) = (1, 2) + t·(3, 1)
💡 Drag the blue circle (tip of r₀) or green circle (tip of v) to adjust.
Parametric form: eliminating the parameter
The equation r(t)=r0+tv is itself a parametric equation — it uses a parameter t to trace out a curve (see parametric curves for the general idea).
Writing r0=(x0,y0,z0) and v=(a,b,c), the vector equation expands component-wise to
⎩⎨⎧x=x0+aty=y0+btz=z0+ct.
These are the parametric equations of the line in 3D.
Symmetric equations (no parameter)
If a,b,c are all nonzero, we can solve each equation for t and set them equal:
ax−x0=by−y0=cz−z0.
These are the symmetric equations of the line. They eliminate the parameter t entirely.
Find the parametric and symmetric equations of the line through P0=(2,−1,3) with direction v=(4,1,−2).
Parametric equations:
x=2+4t,y=−1+t,z=3−2t.
Symmetric equations:
4x−2=1y+1=−2z−3.
Find the vector equation of the line through A=(1,0,2) and B=(3,4,−1).
Direction vector:v=B−A=(2,4,−3).
Vector equation:
r(t)=(1,0,2)+t(2,4,−3).
At t=0 we are at A; at t=1 we are at B.
Line segments as linear combinations
Definition
The line r(t)=a+t(b−a) can be rewritten as
r(t)=(1−t)a+tb.
This is a linear combination of a and b with weights (1−t) and t.
When t is restricted to [0,1], the weights are non-negative and sum to 1. The result is exactly the line segment from a to b.
Range of t
Location
t=0
at a
t=1
at b
0<t<1
betweena and b (the segment)
t<0
beyond a, away from b
t>1
beyond b, away from a
The interactive graph below shows both vectors a and b from the origin. The colored line illustrates the different regions. Drag either vector to explore.
r(t) = (1−t)a + tb — segment and extensions
a = (3, 1)b = (-1, 3)
r(t) = (1−t)·a + t·b
— t < 0— 0 ≤ t ≤ 1 (segment)— t > 1
💡 Drag the blue circle (a) or red circle (b) to adjust.
What value of t gives the midpoint of the segment from a to b?
Answer: At t=21:
r(21)=21a+21b=2a+b.
Show that Q=(2,1,0) lies on the segment from A=(0,0,0) to B=(4,2,0), and find the value of t.
Answer:r(t)=t(4,2,0)=(4t,2t,0). Setting equal to (2,1,0) gives t=21∈[0,1]. ✓
Planes in 3D
A point and a normal direction
Just as a line is determined by a point and a direction it runs along, a plane is determined by a point and a direction it is perpendicular to — the normal directionn.
The interactive graph below shows a plane (purple surface) together with its normal vector (red arrow). Adjust the inputs to see how changing the normal or the base point rotates and translates the plane.
A plane is determined by a point r₀ and a normal n
Equation of a plane
Let r0=(x0,y0,z0) be a known point on the plane and n=(a,b,c) be a normal vector. A point r=(x,y,z) lies on the plane if and only if the vector r−r0 is perpendicular to n:
n⋅(r−r0)=0.
Expanding to component form
a(x−x0)+b(y−y0)+c(z−z0)=0.
Expanding and collecting the constant:
ax+by+cz+d=0,
where d=−(ax0+by0+cz0).
The coefficients (a,b,c) of x,y,z in this equation are exactly the normal vector of the plane.
Find the equation of the plane through P0=(1,2,−1) with normal n=(3,−1,4).
3(x−1)+(−1)(y−2)+4(z+1)=0⟹3x−y+4z+3=0.
What is the normal vector of the plane 2x−5y+z=7?
Answer:n=(2,−5,1).
Finding the normal via cross product
When a plane is described by two vectors lying in it (e.g., by three points), the normal can be found using the cross product (see cross product):
n=u×v,
where u and v are two non-parallel vectors in the plane.
Procedure given three points A, B, C:
Compute u=B−A and v=C−A.
Compute n=u×v.
Use A as the base point: n⋅(r−A)=0.
Find the equation of the plane through A=(1,0,0), B=(0,1,0), C=(0,0,1).
Given a plane and a point P not on it, the distance from P to the plane is the length of the perpendicular segment from P to the plane.
The graph below illustrates this: the plane is fixed and the point P (blue) is draggable. The red dashed segment shows the perpendicular distance. Drag inside the graph to move P in the xy-direction; hold Shift to adjust the z-coordinate.
Distance from point P to the plane
Plane: 0x + 1y + 2z = 0
P = (2, 3, 1)distance = 2.24
💡 Drag inside the 3D graph to move point P (xy-plane). Hold Shift to adjust z.
Distance formula via projection
We use scalar projection (see dot product for the projection formula).
Let Q be any point on the plane and let b=P−Q. The distance from P to the plane is the component of b along the unit normal n^=n/∣n∣:
distance=∣b⋅n^∣=∣n∣∣b⋅n∣.
This equals ∣b∣cosθ — the perpendicular drop from P to the plane.
Formula for the plane ax+by+cz+d=0
The normal is n=(a,b,c). For any point Q on the plane, aQx+bQy+cQz+d=0, so