Back to courseLesson 3 of 13

Into the third dimension

What you'll learn

Extend coordinates, distance, and vectors from the plane to 3D space — the stage every surface lives on.

Everything so far lived on a flat page. But the surfaces this course is heading toward — landscapes with height, peaks, and passes — need a third number. Good news: nothing you've learned changes; it just grows one entry.

One more coordinate

A point in 3D is a triple (x, y, z): how far along each of three perpendicular axes. The classic mental picture is the corner of a room — two walls meeting the floor. Locating a point is a three-move walk:

xyzx = 2y = 2z = 1.6P (2, 2, 1.6)
Three numbers, three moves: walk x, walk y, climb z. Distance comes from Pythagoras used twice: |OP|² = x² + y² + z².

Everything upgrades by one entry

The beauty of the component notation is that dimension is just list length:

Concept2D3D
Vector(x, y)(x, y, z)
Additionentry-wiseentry-wise (same)
Length√(x² + y²)√(x² + y² + z²)
Dot productu₁v₁ + u₂v₂u₁v₁ + u₂v₂ + u₃v₃

The length formula is Pythagoras applied twice — once across the floor, once up the wall. And u · v = |u||v| cos θ still holds word for word: two vectors in space still span a flat plane between them, and θ lives there.

Flat things in space

Two kinds of "flat" live inside 3D, and both will matter:

  • A line: a point plus one direction — all of p + t·v as t runs over the numbers.
  • A plane: a flat sheet, pinned down by one perpendicular direction (its normal vector n). A point q is on the plane exactly when n · (q − p) = 0 — the dot product's zero-test doing real work.

Why this matters

3D is where functions of two variables live: the input (x, y) is a spot on the floor, the output z is a height, and the graph is a surface hanging in space. Before walking on surfaces, though, we take a detour through the machines that move space around — matrices.

Check your understanding

Question 1 of 2

The length of the 3D vector (2, 3, 6) is:

Next lesson