Orthogonal Projections

Given a point off to the side of a wall, what is the closest point on the wall to it? This concrete question of shadows and closest approximations is answered algebraically by the orthogonal projection operator. In any inner product space equipped with a subspace, every vector splits uniquely into a piece lying in that subspace and a piece perpendicular to it. The projection operator extracts the first piece. This single idea powers an enormous amount of applied and pure mathematics: it is the mechanism behind least squares regression, Fourier series, Gram-Schmidt orthogonalization, and the spectral theorem. The reason orthogonal projections deserve their own careful treatment, rather than being folded into general linear operators, is that they carry exactly two algebraic fingerprints. These are idempotence (P2=PP^2 = P, applying the shadow-casting twice does nothing new) and self-adjointness (P∗=PP^* = P, the operator is symmetric with respect to the inner product). These two properties characterize orthogonal projections completely. They turn a geometric description ("drop a perpendicular") into a clean algebraic test. This test can be checked on any matrix. This article builds the projection operator from the ground up using the Orthogonal Complements decomposition V=U⊕U⊥V = U \oplus U^{\perp}. It derives its explicit formula from an orthonormal basis of UU via Bessel and Parseval Identities. It then proves the idempotent-self-adjoint characterization as the central theorem. Along the way we verify every claim with explicit computation. This way, the formula PU(v)=∑⟨v,ei⟩eiP_U(v) = \sum \langle v, e_i \rangle e_i is never a mystery. Instead, it is a fully justified consequence of orthogonal decomposition. By the end, the reader will be equipped for the next natural questions. These include why PU(v)P_U(v) is the closest point in UU to vv (foreshadowing the Minimum Distance Property). They also include how this closest-point idea becomes the engine of least squares approximation in data fitting.

Key takeaways
  • Every finite-dimensional subspace UU of an inner product space VV gives an orthogonal decomposition V=U⊕U⊥V = U \oplus U^{\perp}.
  • The orthogonal projection PU:V→VP_U : V \to V sends v=u+wv = u + w (with u∈Uu \in U, w∈U⊥w \in U^{\perp}) to uu.
  • If e1,…,eke_1, \dots, e_k is an orthonormal basis of UU, then PU(v)=∑i=1k⟨v,ei⟩eiP_U(v) = \sum_{i=1}^k \langle v, e_i\rangle e_i.
  • PUP_U is linear, idempotent (PU2=PUP_U^2 = P_U), and self-adjoint (PU∗=PUP_U^* = P_U).
  • Conversely, any linear operator that is idempotent and self-adjoint is the orthogonal projection onto its range.
  • Key idea: orthogonal projection is the unique linear operator that reproduces vectors already in UU and annihilates everything orthogonal to UU.

Where this lives today

Orthogonal projections are the computational core of least squares regression in statistics and machine learning: fitting a line or hyperplane to noisy data amounts to projecting the observation vector onto the column space of the design matrix, foreshadowing the least squares approximation techniques built directly on this article's theorem. In numerical linear algebra, the QR decomposition and the Gram–Schmidt process are literally iterated orthogonal projections, subtracting off components along previously found directions; this underlies stable algorithms for solving linear systems and computing eigenvalues. In signal processing and Fourier analysis, truncating a Fourier series to finitely many terms is precisely an orthogonal projection onto the span of finitely many sinusoids, and the error bound from Bessel's inequality quantifies how much signal energy is lost by truncation. In quantum mechanics, orthogonal projections onto eigenspaces of self-adjoint (Hermitian) operators represent the "collapse" of a quantum state upon measurement; the idempotent self-adjoint characterization proved here is exactly the mathematical definition of a quantum-mechanical measurement projector. In computer graphics and robotics, projecting a 3D vector onto a 2D plane (e.g. a screen or a constraint surface) uses the exact matrix formula PU=∑eieiTP_U = \sum e_ie_i^T derived above.

Ask the tutor: Why is PU(v)P_U(v) always the closest point of UU to vv, and how does that fact drive least squares approximation?

DefinitionOrthogonal Projection

Let VV be an inner product space over F∈{R,C}\mathbb{F} \in \{\mathbb{R}, \mathbb{C}\}, and let U⊆VU \subseteq V be a finite-dimensional subspace. By the orthogonal decomposition theorem for Orthogonal Complements, every v∈Vv \in V can be written uniquely as

v=u+w,u∈U,w∈U⊥.v = u + w, \qquad u \in U, \quad w \in U^{\perp}.

The orthogonal projection onto UU is the map

PU:V→V,PU(v)=u,P_U : V \to V, \qquad P_U(v) = u,

i.e. PU(v)P_U(v) is the unique vector in UU such that v−PU(v)∈U⊥v - P_U(v) \in U^{\perp}.

Intuition

Picture V=R3V = \mathbb{R}^3 and UU a plane through the origin. Every vector vv in space can be split into a part lying flat in the plane and a part sticking straight up out of it, and these two parts are perpendicular to each other. The projection PU(v)P_U(v) is exactly the "flat" part — the shadow that vv casts onto the plane when light shines perpendicular to it. This is why the map is called orthogonal: the leftover piece v−PU(v)v - P_U(v) is orthogonal to the entire subspace UU, not merely to UU's boundary or to one chosen vector in it. The formula PU(v)=∑i⟨v,ei⟩eiP_U(v) = \sum_i \langle v, e_i\rangle e_i says something very concrete: to find the shadow of vv on UU, pick any orthonormal "grid" e1,…,eke_1, \dots, e_k for UU, measure how much of vv points along each grid direction (that's the inner product ⟨v,ei⟩\langle v, e_i\rangle, a Fourier coefficient), and reassemble those amounts along the same directions. This is precisely the computation behind Bessel and Parseval Identities: Bessel's inequality says the reassembled piece can never be longer than vv itself, and here we see why — it is a genuine geometric projection, a shortening (or equal-length) operation, never a stretching one.

Figure
Orthogonal projection of a vector onto a line through the origin in R2\mathbb{R}^2
U v P⁘U⁙(v) w = v − P⁘U⁙(v) O
TheoremExistence, Formula, and Algebraic Characterization of Orthogonal Projections

Let VV be an inner product space over F∈{R,C}\mathbb{F} \in \{\mathbb{R}, \mathbb{C}\} and let U⊆VU \subseteq V be a finite-dimensional subspace with orthonormal basis e1,…,eke_1, \dots, e_k.

(1) (Existence and formula.) The orthogonal projection PUP_U of Definition exists, is well-defined, is linear, and satisfies

PU(v)=∑i=1k⟨v,ei⟩ eifor all v∈V.P_U(v) = \sum_{i=1}^{k} \langle v, e_i \rangle\, e_i \qquad \text{for all } v \in V.

(2) (Basic algebraic properties.) PUP_U satisfies: (a) range⁡(PU)=U\operatorname{range}(P_U) = U and ker⁡(PU)=U⊥\ker(P_U) = U^{\perp}; (b) PU2=PUP_U^2 = P_U (idempotence); (c) PU∗=PUP_U^* = P_U (self-adjointness), provided VV is finite-dimensional or PUP_U is otherwise known to have an adjoint; (d) I−PU=PU⊥I - P_U = P_{U^{\perp}}.

(3) (Converse characterization.) Suppose VV is finite-dimensional. If Q:V→VQ : V \to V is a linear operator with Q2=QQ^2 = Q and Q∗=QQ^* = Q, then Q=PWQ = P_W where W=range⁡(Q)W = \operatorname{range}(Q). Thus the idempotent self-adjoint operators on VV are exactly the orthogonal projections onto subspaces of VV.

Proof

We prove each part in order, using only the orthogonal decomposition V=U⊕U⊥V = U \oplus U^{\perp} (from Orthogonal Complements) and standard inner product axioms. The technique throughout is direct algebraic verification from the defining decomposition, plus a basis computation using orthonormal expansion (as in Bessel and Parseval Identities).

Part (1): Existence, well-definedness, formula, linearity. Existence and uniqueness of the decomposition is exactly the content of the Orthogonal Complements theorem for the finite-dimensional subspace UU: since UU is finite-dimensional, V=U⊕U⊥V = U \oplus U^{\perp}, meaning every v∈Vv \in V has a representation v=u+wv = u + w with u∈U,w∈U⊥u \in U, w \in U^{\perp}, and this representation is unique because U∩U⊥={0}U \cap U^{\perp} = \{0\} (if x∈U∩U⊥x \in U \cap U^{\perp} then ⟨x,x⟩=0\langle x, x\rangle = 0 so x=0x = 0 by positive-definiteness of the inner product). Hence PU(v):=uP_U(v) := u is a well-defined function V→VV \to V. Formula. Let e1,…,eke_1, \dots, e_k be an orthonormal basis of UU (which exists by Gram-Schmidt, applicable since UU is finite-dimensional). Define

u0:=∑i=1k⟨v,ei⟩ei∈U,w0:=v−u0.u_0 := \sum_{i=1}^k \langle v, e_i\rangle e_i \in U, \qquad w_0 := v - u_0.

We check w0∈U⊥w_0 \in U^{\perp}: for each j=1,…,kj = 1, \dots, k,

⟨w0,ej⟩=⟨v,ej⟩−∑i=1k⟨v,ei⟩⟨ei,ej⟩=⟨v,ej⟩−⟨v,ej⟩⋅1=0,\langle w_0, e_j \rangle = \langle v, e_j\rangle - \sum_{i=1}^k \langle v, e_i\rangle \langle e_i, e_j\rangle = \langle v, e_j \rangle - \langle v, e_j\rangle \cdot 1 = 0,

using orthonormality ⟨ei,ej⟩=δij\langle e_i, e_j\rangle = \delta_{ij} and linearity/conjugate-linearity of the inner product in the appropriate slot. Since w0w_0 is orthogonal to every basis vector of UU, and every element of UU is a linear combination of e1,…,eke_1,\dots,e_k, conjugate-linearity (or linearity, depending on convention) in the second slot gives ⟨w0,x⟩=0\langle w_0, x\rangle = 0 for all x∈Ux \in U, i.e. w0∈U⊥w_0 \in U^{\perp}. Thus v=u0+w0v = u_0 + w_0 is a decomposition with u0∈Uu_0 \in U, w0∈U⊥w_0 \in U^{\perp}. By the uniqueness established above, u0u_0 must equal the unique uu from the definition of PU(v)P_U(v). Hence

PU(v)=u0=∑i=1k⟨v,ei⟩ei.P_U(v) = u_0 = \sum_{i=1}^k \langle v, e_i\rangle e_i.

Linearity. For v,v′∈Vv, v' \in V and scalars α,β∈F\alpha, \beta \in \mathbb{F}, linearity of the inner product in its first slot gives

PU(αv+βv′)=∑i=1k⟨αv+βv′,ei⟩ei=α∑i=1k⟨v,ei⟩ei+β∑i=1k⟨v′,ei⟩ei=αPU(v)+βPU(v′).P_U(\alpha v + \beta v') = \sum_{i=1}^k \langle \alpha v + \beta v', e_i\rangle e_i = \alpha \sum_{i=1}^k \langle v, e_i\rangle e_i + \beta \sum_{i=1}^k \langle v', e_i\rangle e_i = \alpha P_U(v) + \beta P_U(v').

So PUP_U is a linear operator on VV.

Part (2): Basic properties. (a) Range. By the formula, PU(v)∈span⁡(e1,…,ek)=UP_U(v) \in \operatorname{span}(e_1,\dots,e_k) = U for every vv, so range⁡(PU)⊆U\operatorname{range}(P_U) \subseteq U. Conversely, if u∈Uu \in U, decompose u=u+0u = u + 0 with u∈Uu \in U, 0∈U⊥0 \in U^{\perp}; by uniqueness of decomposition, PU(u)=uP_U(u) = u. Hence U⊆range⁡(PU)U \subseteq \operatorname{range}(P_U), and so range⁡(PU)=U\operatorname{range}(P_U) = U. Kernel. If v∈U⊥v \in U^{\perp}, then v=0+vv = 0 + v is the decomposition with 0∈U0 \in U and v∈U⊥v \in U^{\perp}, so PU(v)=0P_U(v) = 0, i.e. U⊥⊆ker⁡(PU)U^{\perp} \subseteq \ker(P_U). Conversely, suppose PU(v)=0P_U(v) = 0. Writing v=PU(v)+(v−PU(v))=0+(v−PU(v))v = P_U(v) + (v - P_U(v)) = 0 + (v - P_U(v)), and since v−PU(v)∈U⊥v - P_U(v) \in U^{\perp} by construction, we get v=v−PU(v)∈U⊥v = v - P_U(v) \in U^{\perp}. Hence ker⁡(PU)⊆U⊥\ker(P_U) \subseteq U^{\perp}, and so ker⁡(PU)=U⊥\ker(P_U) = U^{\perp}. (b) Idempotence. Let v∈Vv \in V with decomposition v=u+wv = u + w, u∈U,w∈U⊥u\in U, w \in U^\perp, so PU(v)=uP_U(v) = u. Since u∈Uu \in U, part (a) gives PU(u)=uP_U(u) = u. Therefore

PU2(v)=PU(PU(v))=PU(u)=u=PU(v).P_U^2(v) = P_U(P_U(v)) = P_U(u) = u = P_U(v).

As vv was arbitrary, PU2=PUP_U^2 = P_U. (c) Self-adjointness. Assume VV is finite-dimensional (so the adjoint PU∗P_U^* is guaranteed to exist as a linear operator satisfying ⟨PU(v),x⟩=⟨v,PU∗(x)⟩\langle P_U(v), x\rangle = \langle v, P_U^*(x)\rangle for all v,x∈Vv, x \in V). Take any v,x∈Vv, x \in V with decompositions v=uv+wvv = u_v + w_v and x=ux+wxx = u_x + w_x (uv,ux∈Uu_v, u_x \in U; wv,wx∈U⊥w_v, w_x \in U^{\perp}). Then

⟨PU(v),x⟩=⟨uv, ux+wx⟩=⟨uv,ux⟩+⟨uv,wx⟩=⟨uv,ux⟩,\langle P_U(v), x\rangle = \langle u_v,\, u_x + w_x\rangle = \langle u_v, u_x\rangle + \langle u_v, w_x\rangle = \langle u_v, u_x \rangle,

since uv∈Uu_v \in U and wx∈U⊥w_x \in U^\perp forces ⟨uv,wx⟩=0\langle u_v, w_x \rangle = 0. By the same reasoning applied symmetrically,

⟨v,PU(x)⟩=⟨uv+wv, ux⟩=⟨uv,ux⟩+⟨wv,ux⟩=⟨uv,ux⟩.\langle v, P_U(x)\rangle = \langle u_v + w_v,\, u_x\rangle = \langle u_v, u_x\rangle + \langle w_v, u_x \rangle = \langle u_v, u_x\rangle.

Hence ⟨PU(v),x⟩=⟨v,PU(x)⟩\langle P_U(v), x \rangle = \langle v, P_U(x)\rangle for all v,x∈Vv, x \in V. By uniqueness of the adjoint operator, PU∗=PUP_U^* = P_U. (d) Complement identity. For v=u+wv = u + w as above, v−PU(v)=w∈U⊥v - P_U(v) = w \in U^{\perp}, and this is by definition PU⊥(v)P_{U^{\perp}}(v) (note (U⊥)⊥⊇U(U^{\perp})^{\perp} \supseteq U suffices to check ww is the U⊥U^\perp-component; more directly, w=0+ww = 0 + w is already the decomposition of ww relative to U⊥⊕(U⊥)⊥U^\perp \oplus (U^\perp)^\perp restricted appropriately, and one checks directly from the definition that the unique vector in U⊥U^\perp with remainder in (U⊥)⊥(U^\perp)^\perp orthogonal complement is ww itself, since u∈U⊆(U⊥)⊥u \in U \subseteq (U^\perp)^\perp). Concretely: v=w+uv = w + u is a valid decomposition of vv as (element of U⊥U^\perp) + (element orthogonal to U⊥U^\perp, since u∈Uu \in U and U⊆(U⊥)⊥U \subseteq (U^{\perp})^{\perp}), so by uniqueness PU⊥(v)=w=v−PU(v)=(I−PU)(v)P_{U^\perp}(v) = w = v - P_U(v) = (I - P_U)(v). Hence I−PU=PU⊥I - P_U = P_{U^{\perp}}.

Part (3): Converse characterization. Assume VV is finite-dimensional and Q:V→VQ: V \to V is linear with Q2=QQ^2 = Q and Q∗=QQ^* = Q. Let W=range⁡(Q)W = \operatorname{range}(Q); we show Q=PWQ = P_W. Step 1: Q(w)=wQ(w) = w for all w∈Ww \in W. If w∈Ww \in W, then w=Q(v)w = Q(v) for some v∈Vv \in V, so

Q(w)=Q(Q(v))=Q2(v)=Q(v)=w.Q(w) = Q(Q(v)) = Q^2(v) = Q(v) = w.

Step 2: ker⁡(Q)=W⊥\ker(Q) = W^{\perp}. First show ker⁡(Q)⊆W⊥\ker(Q) \subseteq W^{\perp}: let x∈ker⁡(Q)x \in \ker(Q) and w∈Ww \in W; write w=Q(v)w = Q(v). Then, using Q∗=QQ^* = Q,

⟨x,w⟩=⟨x,Q(v)⟩=⟨Q∗(x),v⟩=⟨Q(x),v⟩=⟨0,v⟩=0.\langle x, w \rangle = \langle x, Q(v) \rangle = \langle Q^*(x), v\rangle = \langle Q(x), v \rangle = \langle 0, v \rangle = 0.

So x⊥wx \perp w for every w∈Ww \in W, i.e. x∈W⊥x \in W^{\perp}. Conversely show W⊥⊆ker⁡(Q)W^{\perp} \subseteq \ker(Q): let x∈W⊥x \in W^{\perp}. Since Q(x)∈W=range⁡(Q)Q(x) \in W = \operatorname{range}(Q), we have ⟨Q(x),Q(x)⟩\langle Q(x), Q(x)\rangle computed as follows. Using Q∗=QQ^* = Q and Q2=QQ^2=Q,

⟨Q(x),Q(x)⟩=⟨Q∗Q(x),x⟩=⟨Q(Q(x)),x⟩=⟨Q(x),x⟩.\langle Q(x), Q(x)\rangle = \langle Q^*Q(x), x\rangle = \langle Q(Q(x)), x\rangle =\langle Q(x), x \rangle.

But Q(x)∈WQ(x) \in W and x∈W⊥x \in W^{\perp} means ⟨Q(x),x⟩=0\langle Q(x), x\rangle = 0 by definition of orthogonal complement (every vector of WW is orthogonal to every vector of W⊥W^\perp). Hence ⟨Q(x),Q(x)⟩=0\langle Q(x), Q(x) \rangle = 0, so by positive-definiteness Q(x)=0Q(x) = 0, i.e. x∈ker⁡(Q)x \in \ker(Q). Combining both inclusions, ker⁡(Q)=W⊥\ker(Q) = W^{\perp}. Step 3: Conclude Q=PWQ = P_W. Since VV is finite-dimensional, WW is finite-dimensional and V=W⊕W⊥V = W \oplus W^{\perp} by Orthogonal Complements. Take any v∈Vv \in V and write v=w+xv = w + x with w∈Ww \in W, x∈W⊥=ker⁡(Q)x \in W^{\perp} = \ker(Q). Then by linearity of QQ and Steps 1–2,

Q(v)=Q(w)+Q(x)=w+0=w=PW(v),Q(v) = Q(w) + Q(x) = w + 0 = w = P_W(v),

where the last equality is the definition of PW(v)P_W(v) as the WW-component of vv in the orthogonal decomposition. Since vv was arbitrary, Q=PWQ = P_W. This completes the proof of all three parts. ■\blacksquare

∎

Worked examples

Example 1 (a genuinely 2-dimensional subspace of R4\mathbb{R}^4, asymmetric data). Let V=R4V = \mathbb{R}^4 with the standard dot product, and let

U=span⁡{a1,a2},a1=(1,1,0,1),a2=(0,1,1,−1).U = \operatorname{span}\{ a_1, a_2\}, \qquad a_1 = (1, 1, 0, 1), \quad a_2 = (0, 1, 1, -1).

We compute PU(v)P_U(v) for v=(2,−1,3,0)v = (2, -1, 3, 0). Step 1: Orthonormalize. First, ∥a1∥2=1+1+0+1=3\|a_1\|^2 = 1+1+0+1 = 3, so e1=13(1,1,0,1)e_1 = \frac{1}{\sqrt 3}(1,1,0,1). Next, subtract the component of a2a_2 along e1e_1:

⟨a2,e1⟩=13(0⋅1+1⋅1+1⋅0+(−1)⋅1)=13(1−1)=0.\langle a_2, e_1\rangle = \frac{1}{\sqrt3}(0\cdot1 + 1\cdot1 + 1\cdot0 + (-1)\cdot1) = \frac{1}{\sqrt 3}(1 - 1) = 0.

Since ⟨a2,e1⟩=0\langle a_2, e_1 \rangle = 0, remarkably a2a_2 is already orthogonal to a1a_1 (check directly: a1⋅a2=0+1+0−1=0a_1 \cdot a_2 = 0 + 1 + 0 -1 = 0, confirmed). So no subtraction is needed:

∥a2∥2=0+1+1+1=3,e2=13(0,1,1,−1).\|a_2\|^2 = 0 + 1 + 1 + 1 = 3, \qquad e_2 = \frac{1}{\sqrt{3}}(0,1,1,-1).

Now {e1,e2}\{e_1, e_2\} is an orthonormal basis of UU. Step 2: Compute Fourier coefficients of vv.

⟨v,e1⟩=13(2⋅1+(−1)⋅1+3⋅0+0⋅1)=13(2−1)=13.\langle v, e_1 \rangle = \frac{1}{\sqrt3}(2\cdot 1 + (-1)\cdot 1 + 3\cdot 0 + 0 \cdot 1) = \frac{1}{\sqrt3}(2 - 1) = \frac{1}{\sqrt 3}.
⟨v,e2⟩=13(2⋅0+(−1)⋅1+3⋅1+0⋅(−1))=13(−1+3)=23.\langle v, e_2\rangle = \frac{1}{\sqrt3}(2\cdot 0 + (-1)\cdot1 + 3\cdot 1 + 0\cdot(-1)) = \frac{1}{\sqrt3}(-1+3) = \frac{2}{\sqrt3}.

Step 3: Assemble.

PU(v)=⟨v,e1⟩e1+⟨v,e2⟩e2=13⋅13(1,1,0,1)+23⋅13(0,1,1,−1)P_U(v) = \langle v, e_1\rangle e_1 + \langle v, e_2\rangle e_2 = \frac{1}{\sqrt3}\cdot\frac{1}{\sqrt3}(1,1,0,1) + \frac{2}{\sqrt3}\cdot\frac{1}{\sqrt3}(0,1,1,-1)
=13(1,1,0,1)+23(0,1,1,−1)=(13, 13+23, 23, 13−23)=(13, 1, 23, −13).= \frac13(1,1,0,1) + \frac23(0,1,1,-1) = \left(\frac13,\ \frac13+\frac23,\ \frac23,\ \frac13-\frac23\right) = \left(\frac13,\ 1,\ \frac23,\ -\frac13\right).

Verification of orthogonality of the residual. Let $w = v - P_U(v) = \left(2 - \frac13,\ -1

  • 1,\ 3 - \frac23,\ 0 + \frac13\right) = \left(\frac53, -2, \frac73, \frac13\right)$. Check

w⋅a1=53−2+0+13=53+13−2=2−2=0w \cdot a_1 = \frac53 - 2 + 0 + \frac13 = \frac53+\frac13 - 2 = 2 - 2 = 0 ✓, and w⋅a2=0−2+73−13=−2+2=0w \cdot a_2 = 0 - 2 + \frac73 - \frac13 = -2 + 2 = 0 ✓. Both dot products vanish, confirming w∈U⊥w \in U^{\perp} as the theorem guarantees.

Example 2 (projection as a matrix, verifying idempotence and self-adjointness directly). Let V=R3V = \mathbb{R}^3 and let U=span⁡{(2,1,2)}U = \operatorname{span}\{(2,1,2)\}, a line (1-dimensional subspace). Normalize: ∥(2,1,2)∥=4+1+4=3\|(2,1,2)\| = \sqrt{4+1+4} = 3, so e=13(2,1,2)e = \frac13(2,1,2). The projection formula with a single basis vector gives PU(v)=⟨v,e⟩eP_U(v) = \langle v, e\rangle e for all vv, and in matrix form,

PU=eeT=19(212)(212)=19(424212424).P_U = e e^T = \frac19\begin{pmatrix} 2\\1\\2\end{pmatrix}\begin{pmatrix}2&1&2\end{pmatrix} = \frac19\begin{pmatrix} 4 & 2 & 4\\ 2 & 1 & 2 \\ 4 & 2 & 4\end{pmatrix}.

Check self-adjointness (symmetry). The matrix above is visibly symmetric: entry (1,2)=2/9(1,2) = 2/9 equals entry (2,1)=2/9(2,1) = 2/9, entry (1,3)=4/9(1,3) = 4/9 equals entry (3,1)=4/9(3,1) = 4/9, entry (2,3)=2/9(2,3) = 2/9 equals entry (3,2)=2/9(3,2) = 2/9. So PUT=PUP_U^T = P_U, confirming self-adjointness with respect to the standard dot product. Check idempotence directly by matrix multiplication. Compute PU2P_U^2: since PU=eeTP_U = ee^T and eTe=∥e∥2=1e^Te = \|e\|^2 = 1 (as ee is a unit vector),

PU2=(eeT)(eeT)=e(eTe)eT=e⋅1⋅eT=eeT=PU.P_U^2 = (ee^T)(ee^T) = e(e^Te)e^T = e \cdot 1 \cdot e^T = ee^T = P_U.

As an explicit numerical spot-check, take the (1,1)(1,1) entry of PU2P_U^2:

(PU2)11=49⋅49+29⋅29+49⋅49=1681+481+1681=3681=49=(PU)11.✓(P_U^2)_{11} = \frac{4}{9}\cdot\frac49 + \frac29\cdot\frac29 + \frac49\cdot\frac49 = \frac{16}{81} + \frac{4}{81} + \frac{16}{81} = \frac{36}{81} = \frac49 = (P_U)_{11}. \checkmark

Sanity check on a specific vector. Let v=(1,0,−1)v = (1, 0, -1). Then ⟨v,e⟩=13(2⋅1+1⋅0+2⋅(−1))=13(2−2)=0\langle v, e\rangle = \frac13(2\cdot1 + 1\cdot0 + 2\cdot(-1)) = \frac13(2 - 2) = 0, so PU(v)=0P_U(v) = 0; indeed vv is orthogonal to the direction (2,1,2)(2,1,2) (dot product 2+0−2=02+0-2=0), so its shadow on the line UU is the zero vector, exactly as geometric intuition predicts for a vector perpendicular to the line.

CounterexampleDropping finite-dimensionality of UU breaks existence

The theorem requires UU to be finite-dimensional (or at least complete, in the infinite- dimensional setting) so that the orthogonal decomposition V=U⊕U⊥V = U \oplus U^{\perp} from Orthogonal Complements is available. If UU is an infinite-dimensional, non-closed subspace, the projection can fail to exist at all. Let V=ℓ2(N)V = \ell^2(\mathbb{N}), the space of square-summable real sequences with the standard inner product ⟨x,y⟩=∑nxnyn\langle x, y \rangle = \sum_n x_n y_n, and let

U={x∈ℓ2:xn=0 for all but finitely many n},U = \{ x \in \ell^2 : x_n = 0 \text{ for all but finitely many } n \},

the subspace of finitely supported sequences. This UU is a genuine subspace of ℓ2\ell^2, but it is not closed: its closure is all of ℓ2\ell^2. Claim: U⊥={0}U^{\perp} = \{0\}. If y∈ℓ2y \in \ell^2 is orthogonal to every finitely supported sequence, then in particular yy is orthogonal to each standard basis vector en\mathbf{e}_n (which has a 11 in slot nn and 00 elsewhere), so ⟨y,en⟩=yn=0\langle y, \mathbf{e}_n \rangle = y_n = 0 for every nn. Hence y=0y = 0. Now try to project the sequence v=(1,12,14,18,… )∈ℓ2v = \left(1, \tfrac12, \tfrac14, \tfrac18, \dots\right) \in \ell^2 (which is genuinely in ℓ2\ell^2 since ∑4−n<∞\sum 4^{-n} < \infty) onto UU. If a projection PU(v)=u0∈UP_U(v) = u_0 \in U existed with v−u0∈U⊥={0}v - u_0 \in U^{\perp} = \{0\}, we would need v=u0∈Uv = u_0 \in U. But vv has infinitely many nonzero entries, so v∉Uv \notin U — contradiction. Hence no decomposition v=u+wv = u + w with u∈Uu \in U, w∈U⊥w \in U^{\perp} exists, and the orthogonal projection PUP_U is simply undefined on this vv. The failure traces precisely to the missing hypothesis: UU is not finite-dimensional (nor closed), so U⊕U⊥U \oplus U^{\perp} does not exhaust VV, and U⊥U^{\perp} collapses to {0}\{0\} even though U≠VU \ne V. This is exactly why the theorem restricts to finite-dimensional UU (or, more generally in advanced treatments, to closed subspaces of complete inner product spaces).

Scope, edge cases & common traps

SituationWhat happensWhy
U={0}U = \{0\}PU=0P_U = 0, the zero operatorEmpty orthonormal basis; every vv decomposes as 0+v0 + v
U=VU = VPU=IP_U = I, the identityU⊥={0}U^{\perp} = \{0\}; every vv is already in UU
UU infinite-dimensional, non-closedPUP_U may not exist for some vvOrthogonal decomposition theorem requires completeness/finite dimension; see counterexample
VV infinite-dimensional but UU finite-dimensionalPUP_U still exists and formula holdsOnly UU's finite-dimensionality (for the Gram–Schmidt basis) and U∩U⊥={0}U \cap U^\perp = \{0\} are used
Non-orthonormal spanning set used in formulaFormula ∑⟨v,ei⟩ei\sum \langle v,e_i\rangle e_i gives wrong answerThe formula requires an orthonormal basis of UU, not an arbitrary basis
Complex inner product spaceEverything holds verbatimProof only used sesquilinearity/conjugate symmetry axioms, not realness

The mathematician behind it

Origins · 1 minDavid Hilbert and how this was discovered
DH
David Hilbert
1862–1943 · Göttingen, foundations of analysis and functional analysis

Hilbert's investigations into integral equations and infinite systems of linear equations in the early 1900s led him to study spaces of square-summable sequences and functions equipped with an inner product — what we now call Hilbert spaces. The orthogonal projection theorem, in its full generality for closed subspaces of possibly infinite-dimensional complete inner product spaces, is one of the cornerstones of this theory, later formalized rigorously by John von Neumann and others in the 1920s–1930s.

History
- 1862: David Hilbert born in Königsberg, Prussia.
- 1904–1910: Hilbert develops the theory of integral equations, introducing what becomes the modern notion of an infinite-dimensional inner product (Hilbert) space.
- 1907: Erhard Schmidt, Hilbert's student, formalizes orthogonal projection and completeness arguments in his dissertation on integral equations, alongside the process now called Gram–Schmidt.
- 1920s–1930s: John von Neumann axiomatizes Hilbert space theory rigorously, cementing the projection theorem as foundational to functional analysis and quantum mechanics.
- 1943: David Hilbert dies in Göttingen, Germany.
Is the orthogonal projection the same as any old projection (idempotent operator)?

No. Any operator QQ with Q2=QQ^2 = Q is called a projection (or idempotent), and it always satisfies V=range⁡(Q)⊕ker⁡(Q)V = \operatorname{range}(Q) \oplus \ker(Q), but the complementary subspaces need not be orthogonal. An orthogonal projection additionally requires self-adjointness Q∗=QQ^* = Q, which is exactly the extra condition forcing ker⁡(Q)=range⁡(Q)⊥\ker(Q) = \operatorname{range}(Q)^{\perp}, as proved in the converse direction of the central theorem above. Without self-adjointness, a general idempotent operator is called an "oblique" or "skew" projection, and it can distort lengths and angles in ways that orthogonal projections never do.

Does the projection formula change if the inner product is complex (Hermitian) rather than real?

No, the formula and all proofs go through verbatim, because the proof only used linearity in one slot, conjugate-symmetry ⟨x,y⟩=⟨y,x⟩‾\langle x,y\rangle = \overline{\langle y,x\rangle}, and positive-definiteness — properties shared by real and complex inner products alike. The only notational change is that inner products are no longer symmetric but conjugate-symmetric, so one must be careful about which slot is linear versus conjugate-linear, but no step of the argument requires realness.

Why is ∥PU(v)∥≤∥v∥\|P_U(v)\| \le \|v\| always true?

Because v=PU(v)+(v−PU(v))v = P_U(v) + (v - P_U(v)) decomposes vv into two orthogonal pieces, the Pythagorean theorem gives ∥v∥2=∥PU(v)∥2+∥v−PU(v)∥2≥∥PU(v)∥2\|v\|^2 = \|P_U(v)\|^2 + \|v - P_U(v)\|^2 \ge \|P_U(v)\|^2, with equality exactly when v∈Uv \in U. This is precisely Bessel's inequality specialized to a finite orthonormal set, confirming that projecting never increases length — a hallmark of genuine "shadow-casting" as opposed to arbitrary idempotent operators.

How do I compute PUP_U if I only have a non-orthogonal basis for UU?

Either Gram–Schmidt the basis first to get an orthonormal one and apply the formula directly, or use the general normal equations formula: if AA is the matrix whose columns form a (not necessarily orthonormal) basis for UU, then PU=A(ATA)−1ATP_U = A(A^TA)^{-1}A^T (real case) or A(A∗A)−1A∗A(A^*A)^{-1}A^* (complex case). This reduces to AATAA^T when the columns are already orthonormal, since then ATA=IA^TA = I, recovering eeTee^T-type formulas from the worked examples.

What is the relationship between orthogonal projections and the Minimum Distance Property?

The orthogonal projection PU(v)P_U(v) turns out to be the unique closest point in UU to vv, in the sense that ∥v−PU(v)∥≤∥v−u∥\|v - P_U(v)\| \le \|v - u\| for every u∈Uu \in U, with equality only when u=PU(v)u = P_U(v). This "best approximation" fact is not proved in this article but follows quickly from the Pythagorean decomposition above; it is exactly what makes projections useful for approximation problems, and it is the subject of the Minimum Distance Property.

Can a projection matrix have eigenvalues other than 0 and 1?

No. If Pv=λvPv = \lambda v for some nonzero vv, then applying P2=PP^2 = P gives P(Pv)=PvP(Pv) = Pv, so λ2v=λv\lambda^2 v = \lambda v, forcing λ2=λ\lambda^2 = \lambda since v≠0v \ne 0, i.e. λ∈{0,1}\lambda \in \{0, 1\}. Geometrically, vectors in UU are fixed (λ=1\lambda = 1) and vectors in U⊥U^{\perp} are annihilated (λ=0\lambda = 0); self-adjointness further guarantees these eigenspaces are genuinely orthogonal to each other, matching the spectral theorem for self-adjoint operators.

Why does the theorem state the converse direction only for finite-dimensional VV?

The proof of the converse uses that W=range⁡(Q)W = \operatorname{range}(Q) is automatically finite-dimensional (since it's a subspace of the finite-dimensional VV) so that V=W⊕W⊥V = W \oplus W^{\perp} is guaranteed by the orthogonal decomposition theorem. In infinite dimensions, one needs WW to be closed for this decomposition to hold, and an idempotent self-adjoint bounded operator does have closed range, so the converse still holds there with extra topological care — but that refinement belongs to functional analysis rather than this article's scope.

Before this

Where this leads