Source scope: §3.5.3. Worked numerical examples, experiments, and practice are teaching supplements unless identified as source results.
Separate what a line explains
Let S be the horizontal axis and v=(2,3). The component in S is (2,0); the remaining component is (0,3). Moving along the line cannot remove that vertical residual.
For any subset S of an inner product space V, define
S⊥={v∈V:⟨v,s⟩=0 for every s∈S}.
Even if S is not a subspace, S⊥ is: zero is orthogonal to everything, and inner-product linearity preserves the zero conditions under addition and scaling.
Proposition 1: unique orthogonal decomposition
Source statement. If S is a finite-dimensional subspace of V, every v∈V can be written uniquely as v=vS+v⊥, with vS∈S and v⊥∈S⊥.
Source proof, with steps expanded. Choose an orthonormal basis u1,…,um for S. Set
vS=i∑⟨v,ui⟩ui,v⊥=v−vS.
The first vector belongs to S by its span. For each basis vector,
Linearity extends orthogonality from the basis to all of S. For uniqueness, take another decomposition, including one constructed from a different orthonormal basis. Then vS−vS′=v⊥′−v⊥ lies in both spaces. Therefore
0=⟨vS−vS′,v⊥′−v⊥⟩=∥vS−vS′∥2.
Thus vS=vS′, and subtracting from v gives v⊥=v⊥′. Consequently V=S⊕S⊥ under the stated finite-dimensional-subspace assumption. The source follows its proposition with “whenever S is a subspace”; retain the finite-dimensional hypothesis here rather than extending that sentence to arbitrary infinite-dimensional subspaces.
Proposition 2: eight properties and their proofs
Define the orthogonal projectionP=PS:V→S by Pv=vS.
Basis formula:Pv=∑i⟨v,ui⟩ui for any orthonormal basis of S. This is the construction above; uniqueness makes it independent of basis.
Residual:v−Pv⊥S. This was proved by taking its inner product with every basis vector.
Linearity: Write x=xS+x⊥ and y=yS+y⊥. Their sum splits as (xS+yS)+(x⊥+y⊥) in the two subspaces; uniqueness gives P(x+y)=Px+Py. Likewise αx=αxS+αx⊥, giving P(αx)=αPx.
Identity on S: For s∈S, s=s+0 is its decomposition, so Ps=s.
Range and nullspace: The definition gives range(P)⊆S; property 4 gives the reverse inclusion by choosing input s. If Pv=0, its decomposition gives v=v⊥∈S⊥. Conversely v∈S⊥ has decomposition 0+v and maps to zero. Hence range(P)=S and null(P)=S⊥.
Idempotence:P2v=P(Pv)=Pv because Pv∈S and property 4 applies. Thus P2=P.
No length increase: Pythagoras gives ∥v∥2=∥Pv∥2+∥v−Pv∥2≥∥Pv∥2. Take nonnegative square roots.
Unique closest point: For s∈S, the residual is perpendicular to Pv−s∈S. Thus
Any linear map satisfying P2=P is called a projection. Orthogonal projections have the additional perpendicular-residual property; idempotence alone does not establish it. The experiment replaces the source’s closest-point sketch with the same point, subspace, foot, and residual, plus a movable candidate.
Write the projection as a matrix
For S⊆Rn and orthonormal columns ui assembled in U,
Hence PS=∑iuiuiT=UUT, using the sum-of-outer-products identity. Orthonormality matters; arbitrary basis columns do not give this formula.
Explore it yourself
Find the closest point on a line
Move the candidate along S. Can its distance beat the perpendicular foot?
Preparing interactive controls…
Explore in three dimensions
Explore it yourself
Drop a perpendicular to a plane
Tilt S or move the candidate point s. Which part of v cannot be removed by moving within S?
Preparing interactive controls…
Transfer
Project (2,0) onto the line spanned by (1,1).
Normalize the basis first
Use u=(1,1)/2. Then Pv=(vTu)u=(1,1) and the residual is (1,−1). Their dot product is zero. The closest distance is 2; the origin is farther away, at distance two.