4. Lines, planes, and surfaces in space
With both vector products in hand, three-dimensional geometry can be written down algebraically rather than sketched. This lesson builds the equation of a line from a direction vector, the equation of a plane from a normal vector (supplied by §9.2's cross product), and previews the curved surfaces that Module 10 spends an entire module studying.
Lines in space
A line is determined by one point P_0=(x_0,y_0,z_0) on it and one direction vector \vec v=\langle a,b,c\rangle parallel to it. Every point on the line is reached by starting at P_0 and moving some multiple of \vec v:
\vec r(t)=\vec r_0+t\vec v=\langle x_0+at,\ y_0+bt,\ z_0+ct\rangle
— a parametric equation, structurally identical to §6.0's parametric curves, just with a third component now. As t ranges over all real numbers, the point traces out the entire line. (This vector form is exactly §9.5's vector-valued functions, one lesson early — a line is the simplest possible space curve, one with constant "velocity" \vec v.)
Two lines are parallel exactly when their direction vectors are parallel (§9.2's cross-product-zero test); two lines intersect when some choice of parameters for each makes both parametrizations land on the same point simultaneously — solvable as an ordinary system of equations.
Planes in space
A plane is determined by one point P_0 on it and a normal vector \vec n=\langle a,b,c\rangle perpendicular to the entire plane. Any other point P=(x,y,z) lies on the plane exactly when \overrightarrow{P_0P} is perpendicular to \vec n — checkable with §9.1's dot product:
\vec n\cdot\overrightarrow{P_0P}=0\ \Longrightarrow\ a(x-x_0)+b(y-y_0)+c(z-z_0)=0
Expanding gives the familiar linear form ax+by+cz=d (where d=ax_0+by_0+cz_0) — the coefficients a,b,c of x,y,z in a plane's equation are exactly its normal vector's components, readable off directly without any computation.
Finding the plane through three non-collinear points A,B,C: form two vectors in the plane, \overrightarrow{AB} and \overrightarrow{AC}, and take their cross product (§9.2) to get a vector perpendicular to both — which is perpendicular to the whole plane they span:
\vec n=\overrightarrow{AB}\times\overrightarrow{AC}
Distance from a point to a plane
For a plane ax+by+cz=d with normal \vec n=\langle a,b,c\rangle, and a point Q not on it, the distance is the length of \overrightarrow{P_0Q}'s projection onto the unit normal — exactly §9.1's scalar projection, applied here:
\text{distance}=\frac{|\vec n\cdot\overrightarrow{P_0Q}|}{|\vec n|}
This measures the shortest path, because any component of \overrightarrow{P_0Q} within the plane contributes nothing to how far Q sits above or below it — only the perpendicular component matters, which projection isolates.
A first look at curved surfaces
A surface in space is the solution set of one equation in x,y,z. A plane, ax+by+cz=d, is the linear case; dropping linearity opens up curved surfaces — a sphere of radius r centered at (x_0,y_0,z_0):
(x-x_0)^2+(y-y_0)^2+(z-z_0)^2=r^2
— the direct three-dimensional analogue of a circle's equation, and a paraboloid:
z=x^2+y^2
— a bowl-shaped surface that Module 10 will study intensively (it's the graph of a two-variable function, f(x,y)=x^2+y^2, the central object of the entire next module). This lesson's job is only to introduce the vocabulary; §10.0 picks the thread back up properly.
Doing it in Python
Finding the plane through three points, using the cross-product method:
import sympy as sp
A = sp.Matrix([1, 0, 0])
B = sp.Matrix([0, 1, 0])
C = sp.Matrix([0, 0, 1])
n = (B - A).cross(C - A)
x, y, z = sp.symbols('x y z')
r = sp.Matrix([x, y, z])
plane_eq = sp.expand(n.dot(r - A))
print(f"normal vector = {n.T}")
print(f"plane equation: {plane_eq} = 0")
The distance from a point to that plane:
import sympy as sp
n = sp.Matrix([1, 1, 1])
P0 = sp.Matrix([1, 0, 0]) # a point known to be on the plane x+y+z=1
Q = sp.Matrix([0, 0, 0]) # the point whose distance we want
distance = sp.Abs(n.dot(Q - P0)) / sp.sqrt(n.dot(n))
print(f"distance from origin to the plane x+y+z=1 = {distance} = {float(distance):.4f}")
Checking whether two lines intersect, by solving for matching parameters:
import sympy as sp
t, s = sp.symbols('t s')
# line 1: (1,0,0) + t(1,1,0); line 2: (0,1,0) + s(1,-1,0)
line1 = sp.Matrix([1, 0, 0]) + t * sp.Matrix([1, 1, 0])
line2 = sp.Matrix([0, 1, 0]) + s * sp.Matrix([1, -1, 0])
solution = sp.solve([sp.Eq(line1[0], line2[0]), sp.Eq(line1[1], line2[1])], [t, s])
print(f"solving for matching t, s: {solution}")
if solution:
point = line1.subs(solution)
print(f"intersection point: {point.T}")
Worked example
Find the equation of the plane through A=(1,0,0), B=(0,1,0), C=(0,0,1), and the distance from the origin to that plane.
\overrightarrow{AB}=\langle-1,1,0\rangle,\qquad\overrightarrow{AC}=\langle-1,0,1\rangle
\vec n=\overrightarrow{AB}\times\overrightarrow{AC}=\langle(1)(1)-(0)(0),\,(0)(-1)-(-1)(1),\,(-1)(0)-(1)(-1)\rangle=\langle1,1,1\rangle
Using point A=(1,0,0):
1(x-1)+1(y-0)+1(z-0)=0\ \Longrightarrow\ \boxed{x+y+z=1}
Distance from the origin (0,0,0): using \overrightarrow{AQ}=(0,0,0)-(1,0,0)=\langle-1,0,0\rangle,
\text{distance}=\frac{|\vec n\cdot\overrightarrow{AQ}|}{|\vec n|}=\frac{|(1)(-1)+(1)(0)+(1)(0)|}{\sqrt{1^2+1^2+1^2}}=\frac1{\sqrt3}=\boxed{\frac{\sqrt3}3}
Sanity check. All three points A,B,C satisfy x+y+z=1 by construction (1+0+0=1, 0+1+0=1, 0+0+1=1) ✓. The origin is not on the plane (since 0+0+0=0\ne1), so a nonzero distance is expected, and \frac1{\sqrt3}\approx0.577 is a modest, plausible distance given how close the plane's intercepts are to the origin. ✓
Your turn
1. Find the parametric equation of the line through (2,1,-1) with direction vector \langle3,0,2\rangle.
2. Find the equation of the plane through (1,1,1) with normal vector \langle2,-1,3\rangle.
3. True or false: a plane's equation ax+by+cz=d can be found without ever using the cross product, if the normal vector is already known.
Solutions
1. \vec r(t)=\langle2+3t,\,1+0t,\,-1+2t\rangle=\boxed{\langle2+3t,\,1,\,-1+2t\rangle}
(Notice the y-coordinate never changes — the direction vector's y-component is 0, so this line moves entirely within a fixed y=1 plane.)
2. 2(x-1)-1(y-1)+3(z-1)=0\ \Longrightarrow\ 2x-y+3z=2-1+3=4
\boxed{2x-y+3z=4}
3. True. The cross product is only needed to find a normal vector from geometric data (like three points, none of which directly hands you a normal). If the normal vector is given outright — as in problem 2 — the plane's equation follows immediately from the dot-product definition, no cross product required at all. The cross product is a tool for a specific sub-problem (constructing a perpendicular vector), not a mandatory step in every plane equation.
Check yourself in code
Find the normal vector and equation of the plane through A=(1,0,0), B=(0,1,0), C=(0,0,1), and the distance from the origin to that plane.
Print exactly this:
normal = [1, 1, 1]
plane equation: x + y + z - 1 = 0
distance from origin = sqrt(3)/3
import sympy as sp
A = sp.Matrix([1, 0, 0])
B = sp.Matrix([0, 1, 0])
C = sp.Matrix([0, 0, 1])
x, y, z = sp.symbols('x y z')
n = (B - A).cross(C - A)
print("normal = ...")
r = sp.Matrix([x, y, z])
plane_eq = sp.expand(n.dot(r - A))
print("plane equation: ... = 0")
distance = sp.Abs(n.dot(sp.Matrix([0, 0, 0]) - A)) / sp.sqrt(n.dot(n))
print("distance from origin = ...")
import sympy as sp
A = sp.Matrix([1, 0, 0])
B = sp.Matrix([0, 1, 0])
C = sp.Matrix([0, 0, 1])
x, y, z = sp.symbols('x y z')
n = (B - A).cross(C - A)
print(f"normal = {list(n)}")
r = sp.Matrix([x, y, z])
plane_eq = sp.expand(n.dot(r - A))
print(f"plane equation: {plane_eq} = 0")
distance = sp.Abs(n.dot(sp.Matrix([0, 0, 0]) - A)) / sp.sqrt(n.dot(n))
print(f"distance from origin = {distance}")
A line's equation comes from a point plus a direction vector, the same parametric idea §6.0 used for curves; a plane's equation comes from a point plus a normal vector, with §9.1's dot product enforcing perpendicularity and §9.2's cross product supplying that normal whenever it isn't handed to you directly. Distance from a point to a plane is another direct application of §9.1's projection, isolating only the perpendicular component of a displacement. Curved surfaces — spheres, paraboloids, and beyond — extend this vocabulary one step further, setting up Module 10's central object of study.
Next: letting the point on a line move with time — vector-valued functions, where position, velocity, and acceleration all become vectors in their own right.