Linear Algebra, Interactive EditionXYZ Homework Edition

⇩ Download ▾

6.1 Projection onto a Plane

Section 0.7 did this for a line: it split a vector into the part running along a direction and the part running across it, then read the distance to the line off the second piece. What it did not do is argue that the foot of that perpendicular is the closest point — it took "the distance to a line is measured along the perpendicular" as given. This section asks the optimality question outright, of a plane, and answers it: the perpendicular is not merely a natural choice, it is provably the winner, and the proof is the same one dimension up or down.

The plane z=0.4x+0.2yz = 0.4x + 0.2y is a subspace of ℝ3\mathbb{R}^3 — flat, through the origin, closed under the usual operations. The vector 𝐛=(1,1,3)\mathbf{b} = (1, 1, 3) is not on it: the plane above the point (1,1)(1, 1) sits at height 0.4+0.2=0.60.4 + 0.2 = 0.6, far below 33. Chapter 2 would stop there — not reachable — but the useful question is quantitative: which point of the plane is closest to 𝐛\mathbf{b}?

The answer is found by dropping a perpendicular from 𝐛\mathbf{b} onto the plane. The figure shows the whole construction: the white point 𝐛\mathbf{b} floating above the plane, the red segment falling from it along the plane's normal direction, and the blue point (1.8,1.4,1)(1.8, 1.4, 1) where it lands — the orthogonal projection of 𝐛\mathbf{b}. Two segments from the origin trace 𝐛\mathbf{b} itself (gray) and its projection (blue).

A semi-transparent tilted plane through the origin with a white point floating above it. A red segment drops from the point at a slant, along the plane's normal direction rather than vertically, ending at a blue point on the plane. Two segments from the origin, one gray and one blue, show the original vector and its projection in the plane. There are no sliders.Explore in 3D (opens in a new tab)

A semi-transparent tilted plane through the origin with a white point floating above it. A red segment drops from the point at a slant, along the plane's normal direction rather than vertically, ending at a blue point on the plane. Two segments from the origin, one gray and one blue, show the original vector and its projection in the plane. There are no sliders.

The point 𝐛=(1,1,3)\mathbf{b} = (1, 1, 3) above the plane z=0.4x+0.2yz = 0.4x + 0.2y, with the red perpendicular dropping to its projection (1.8,1.4,1)(1.8, 1.4, 1), marked in blue. The gray and blue segments from the origin are 𝐛\mathbf{b} and its projection as vectors.

Explore the figure

  1. Orbit until you view the plane edge-on. The red segment meets it at a right angle — not a right angle on your screen from every viewpoint, but a true one in space, visible when the plane degenerates to a line in your view.
  2. A natural first guess for the closest point is "straight down": drop vertically from 𝐛\mathbf{b} to (1,1,0.6)(1, 1, 0.6). That vertical trip has length 3−0.6=2.43 - 0.6 = 2.4. The red route is visibly shorter and lands at a different point — closest is measured perpendicular to the plane, not perpendicular to the floor.
  3. Confirm by eye that the blue point actually lies in the plane, and that its coordinates are plausible: 0.4(1.8)+0.2(1.4)=0.72+0.28=10.4(1.8) + 0.2(1.4) = 0.72 + 0.28 = 1, exactly its height.
  4. Follow the triangle made by the gray segment, the blue segment, and the red drop: 𝐛\mathbf{b} splits into a piece inside the plane plus a piece perpendicular to it. Nothing overlaps and nothing is missing.

Computing the drop

Rewrite the plane as 0.4x+0.2y−z=00.4x + 0.2y - z = 0; its normal vector is 𝐧=(0.4,0.2,−1)\mathbf{n} = (0.4, 0.2, -1), and the perpendicular from 𝐛\mathbf{b} must travel along 𝐧\mathbf{n}. So the projection is 𝐩=𝐛−t𝐧\mathbf{p} = \mathbf{b} - t\,\mathbf{n} for the value of tt that lands on the plane, which works out to t=(𝐛·𝐧)/(𝐧·𝐧)t = (\mathbf{b} \cdot \mathbf{n})/(\mathbf{n} \cdot \mathbf{n}). Here 𝐛·𝐧=0.4+0.2−3=−2.4\mathbf{b} \cdot \mathbf{n} = 0.4 + 0.2 - 3 = -2.4 and 𝐧·𝐧=0.16+0.04+1=1.2\mathbf{n} \cdot \mathbf{n} = 0.16 + 0.04 + 1 = 1.2, so t=−2t = -2 and

𝐩 = 𝐛 + 2 𝐧 = ( 1 + 0.8 , 1 + 0.4 , 3 − 2 ) = ( 1.8 , 1.4 , 1 ) \mathbf{p} = \mathbf{b} + 2\mathbf{n} = (1 + 0.8, \; 1 + 0.4, \; 3 - 2) = (1.8, \; 1.4, \; 1)

The error vector is 𝐛−𝐩=(−0.8,−0.4,2)=−2𝐧\mathbf{b} - \mathbf{p} = (-0.8, -0.4, 2) = -2\mathbf{n}: a pure multiple of the normal, with length 0.64+0.16+4=4.8≈2.19\sqrt{0.64 + 0.16 + 4} = \sqrt{4.8} \approx 2.19 — beating the vertical guess of 2.42.4, as the figure promised. And perpendicularity is what makes 𝐩\mathbf{p} provably the winner: for any other point 𝐪\mathbf{q} of the plane, the segment from 𝐪\mathbf{q} to 𝐩\mathbf{p} lies in the plane, at right angles to 𝐛−𝐩\mathbf{b} - \mathbf{p}, so Pythagoras gives |𝐛−𝐪|2=|𝐛−𝐩|2+|𝐩−𝐪|2|\mathbf{b} - \mathbf{q}|^2 = |\mathbf{b} - \mathbf{p}|^2 + |\mathbf{p} - \mathbf{q}|^2, strictly larger. A perpendicular error is not one good option — it is a certificate that no better option exists.

−2-2
The drop parameter t, solved ✓ Computed · mojocas 0.1.0 ✓ Agrees with the text The drop parameter t, solved, computed exactly by mojocas 0.1.0, and confirmed to agree with the result stated in the text.

The landing condition (𝐛−t𝐧)·𝐧=0(\mathbf{b} - t\,\mathbf{n}) \cdot \mathbf{n} = 0 written out with the numbers of this example — 𝐛·𝐧=−2.4\mathbf{b} \cdot \mathbf{n} = -2.4 and 𝐧·𝐧=1.2\mathbf{n} \cdot \mathbf{n} = 1.2 — and solved by a computer algebra system: t=−2t = -2, the value that drops 𝐛\mathbf{b} exactly onto (1.8,1.4,1)(1.8, 1.4, 1).

An original work of XYZ Homework, built around interactive XYZ 3D figures. Chapters 1–6 follow the topic sequence of Interactive Linear Algebra (Margalit & Rabinoff, Georgia Tech, GNU FDL). Chapter 0's scope (its topics, their order, and the idea each figure shows) follows the Vectors chapter of Ximera's Linear Algebra: An Interactive Introduction. The prose, worked examples and figures were written for this book, which is not affiliated with or endorsed by the authors of either work. License: CC-BY-NC-SA-4.0.

These eBooks are a prerelease and are not yet certified conformant with WCAG 2.1 AA or any other accessibility standard. Every page is built against an automated accessibility gate, and our target for the published editions is WCAG 2.2 Level AA. If something is unusable, please tell us.