Orthogonality & Orthonormal Bases
1607 words
8 min read
Visual companion
Python
Type and operator map
Python Week 1: the first filter for runtime behavior
View
Revision summary
What this note is really saying
Short form
# Orthogonality & Orthonormal Bases ## ๐ฏ Learning Objectives After this topic you will be able to: - Determine whether vectors are orthogonal - Define orthogonal complements and find them - Compute the orthogonal projection of a vector onto a subspace - Explain why orthonormal bases are convenient - Express a vecto...

Orthogonality & Orthonormal Bases
๐ฏ Learning Objectives
After this topic you will be able to:
- Determine whether vectors are orthogonal
- Define orthogonal complements and find them
- Compute the orthogonal projection of a vector onto a subspace
- Explain why orthonormal bases are convenient
- Express a vector in an orthonormal basis easily via inner products
๐ Prerequisites
- Inner Products & Norms (Week 7) โ inner products, angles
- Subspaces (Week 3) โ linear subspaces
- Orthogonality is the geometric heart of linear algebra
1. Intuition: Right Angles Everywhere
Two vectors are orthogonal if they meet at a right angle (dot product = 0). In an inner product space:
Why is orthogonality so powerful?
- Orthogonal vectors are automatically linearly independent
- Coordinates in an orthonormal basis are computed with simple inner products (no solving equations!)
- Projections onto orthogonal subspaces are easy (Diagram)
2. Orthogonal Vectors and Sets
2.1 Orthogonal Set
โจc1โv1โ+โฏ+ckโvkโ,viโโฉ=ciโโจviโ,viโโฉ=0Definition (Orthogonal Set). A set of vectors {v1โ,โฆ,vkโ} is orthogonal if โจviโ,vjโโฉ=0 for all i๎ =j. Theorem. An orthogonal set of non-zero vectors is linearly independent. Proof: Suppose c1โv1โ+โฏ+ckโvkโ=0. Take inner product with viโ:
Since โจviโ,viโโฉ๎ =0 (non-zero vector), ciโ=0 for all i. โ
2.2 Orthonormal Set
>โจviโ,vjโโฉ={10โi=ji๎ =jโ>Definition (Orthonormal Set). An orthonormal set is an orthogonal set where each vector has norm 1:
Example 1: Orthogonal and orthonormal sets{(1,2,โ3),(3,0,1),(1,โ5,โ3)} is orthogonal (check dot products = 0). Normalising gives an orthonormal set.
2.3 Orthonormal Basis
v=โจv,e1โโฉe1โ+โจv,e2โโฉe2โ+โฏ+โจv,enโโฉenโDefinition (Orthonormal Basis). An orthonormal basis of V is a basis that is also an orthonormal set. The beauty of orthonormal bases: If {e1โ,โฆ,enโ} is orthonormal, then for any vโV:
The coordinates are just inner products โ no system of equations to solve!
Example 2: Coordinates in orthonormal basisStandard basis of R2 is orthonormal. For v=(3,4): โจv,e1โโฉ=3, โจv,e2โโฉ=4. So v=3e1โ+4e2โ โ we read coordinates directly. Example 3: A non-standard orthonormal basisB={(2โ1โ,2โ1โ),(โ2โ1โ,2โ1โ)} is orthonormal.For v=(3,1): โจv,b1โโฉ=2โ3+1โ=2โ4โ=22โ โจv,b2โโฉ=2โโ3+1โ=2โโ2โ=โ2โCheck: 22โ(2โ1โ,2โ1โ)+(โ2โ)(โ2โ1โ,2โ1โ)=(2,2)+(1,โ1)=(3,1) โ
3. Orthogonal Complements
>Wโฅ={vโVโฃโจv,wโฉ=0ย forย allย wโW}>Definition (Orthogonal Complement). For a subspace WโV, the orthogonal complement is:
Properties:
- Wโฅ is a subspace of V
- WโฉWโฅ={0}
- dim(W)+dim(Wโฅ)=dim(V)
- (Wโฅ)โฅ=W
Example 4: Orthogonal complement in โยฒW=span{(1,2)} (a line). Wโฅ={(x,y)โฃx+2y=0} (the perpendicular line). Basis for Wโฅ: {(โ2,1)}. Example 5: Orthogonal complement in โยณW=xy-plane {(x,y,0)}. Wโฅ={(0,0,z)} (the z-axis).
4. Orthogonal Projections
>projWโ(v)=i=1โkโโจv,eiโโฉeiโ>Definition (Orthogonal Projection). For a subspace WโV with orthonormal basis {e1โ,โฆ,ekโ}, the orthogonal projection of v onto W is:
The component of v orthogonal to W is vโprojWโ(v), which lies in Wโฅ.
Example 6: Projection onto a lineProject v=(3,4) onto the line W=span{(1,2)}.Normalise: e=5โ(1,2)โ. โจv,eโฉ=5โ3+8โ=5โ11โ. projWโ(v)=5โ11โโ 5โ(1,2)โ=511โ(1,2)=(2.2,4.4).Check: vโproj=(0.8,โ0.4), which is orthogonal to (1,2): 0.8(1)+(โ0.4)(2)=0 โ
5. Edge Cases & Gotchas
| Situation | What Happens |
|---|---|
| Zero vector | Orthogonal to everything; cannot be in an orthonormal set |
| ** vโW ** | projWโ(v)=v |
| ** vโฅW ** | projWโ(v)=0 |
6. Common Pitfalls
โ Pitfall 1: Thinking orthogonal = independent but not vice versa
Independence does NOT imply orthogonality. (1,0) and (1,1) are independent but not orthogonal.
โ Pitfall 2: Normalising before checking orthogonality
Normalise after building orthogonal vectors, not before.
โ Pitfall 3: Forgetting to normalise basis vectors for projection formula
The formula projWโ(v)=โโจv,eiโโฉeiโ requires an orthonormal basis, not just orthogonal.
7. Formula Summary Table
| Concept | Formula |
|---|---|
| Orthogonal vectors | โจu,vโฉ=0 |
| Orthonormal set | Orthogonal + each has norm 1 |
| Coordinates in orthonormal basis | ciโ=โจv,eiโโฉ |
| Orthogonal complement | Wโฅ={vโฃโจv,wโฉ=0ย โwโW} |
| **Projection onto W ** | projWโ(v)=โโจv,eiโโฉeiโ |
8. ๐ Practice Questions
Q1: Orthogonal set?Is {(1,1,1),(1,โ1,0),(1,1,โ2)} orthogonal?Solution: (1,1,1)โ (1,โ1,0)=1โ1+0=0 โ (1,1,1)โ (1,1,โ2)=1+1โ2=0 โ (1,โ1,0)โ (1,1,โ2)=1โ1+0=0 โYes, orthogonal. Q2: Orthonormal from orthogonalNormalise the orthogonal set from Q1.Solution: โฅ(1,1,1)โฅ=3โ, so e1โ=(3โ1โ,3โ1โ,3โ1โ). โฅ(1,โ1,0)โฅ=2โ, so e2โ=(2โ1โ,โ2โ1โ,0). โฅ(1,1,โ2)โฅ=6โ, so e3โ=(6โ1โ,6โ1โ,โ6โ2โ). Q3: Coordinates in orthonormal basisExpress (2,5,3) in the orthonormal basis from Q2.Solution: c1โ=โจ(2,5,3),e1โโฉ=3โ2+5+3โ=3โ10โ c2โ=โจ(2,5,3),e2โโฉ=2โ2โ5+0โ=โ2โ3โ c3โ=โจ(2,5,3),e3โโฉ=6โ2+5โ6โ=6โ1โSo (2,5,3)=3โ10โe1โโ2โ3โe2โ+6โ1โe3โ. Q4: Orthogonal complementFind Wโฅ where W=span{(1,1,1),(1,0,โ1)}.Solution: Solve wโฅboth: (x,y,z)โ (1,1,1)=x+y+z=0 (x,y,z)โ (1,0,โ1)=xโz=0โx=z. Then x+y+x=2x+y=0โy=โ2x.Wโฅ=span{(1,โ2,1)}. Q5: Projection onto a lineProject (2,1) onto the line through (1,1).Solution: e=2โ(1,1)โ. โจ(2,1),eโฉ=2โ2+1โ=2โ3โ. proj=2โ3โโ 2โ(1,1)โ=23โ(1,1)=(1.5,1.5). Q6: Projection onto a planeProject (1,2,3) onto the plane x+y+z=0 (with orthonormal basis from Q2's e2โ,e3โ).Solution: c2โ=โจ(1,2,3),e2โโฉ=2โ1โ2+0โ=โ2โ1โ. c3โ=โจ(1,2,3),e3โโฉ=6โ1+2โ6โ=โ6โ3โ=โ23โโ.proj=โ2โ1โe2โโ23โโe3โ.Simplify: e2โ+3โe3โ=(2โ1โ+3โ6โ1โ,โ2โ1โ+3โ6โ1โ,0+3โ(โ6โ2โ)) =(2โ1โ+2โ1โ,โ2โ1โ+2โ1โ,โ6โ23โโ)=(2โ,0,โ2โ).So proj=2โโ1โ(2โ,0,โ2โ)=(โ1,0,1).Check: (โ1,0,1) is in the plane x+y+z=0 โ. And (1,2,3)โ(โ1,0,1)=(2,2,2) is along (1,1,1), perpendicular to the plane โ. Q7: Orthogonal decompositionDecompose (4,7) into components parallel and perpendicular to (2,3).Solution: Project onto (2,3): projuโv=โฅuโฅ2vโ uโu=4+98+21โ(2,3)=1329โ(2,3)=(1358โ,1387โ). vโฅโ=(4,7)โ(1358โ,1387โ)=(1352โ58โ,1391โ87โ)=(โ136โ,134โ). Q8: Orthogonal projection formula checkIf {e1โ,โฆ,ekโ} is orthonormal, show โฅprojWโ(v)โฅ2=โi=1kโโจv,eiโโฉ2.Proof: โฅprojโฅ2=โจโโจv,eiโโฉeiโ,โโจv,ejโโฉejโโฉ=โiโโjโโจv,eiโโฉโจv,ejโโฉโจeiโ,ejโโฉ. Since โจeiโ,ejโโฉ=0 for i๎ =j and =1 for i=j: โฅprojโฅ2=โi=1kโโจv,eiโโฉ2. โ Q9: Orthogonal complement of a sumShow (W1โ+W2โ)โฅ=W1โฅโโฉW2โฅโ.Proof: vโ(W1โ+W2โ)โฅ iff โจv,w1โ+w2โโฉ=0 for all w1โโW1โ,w2โโW2โ. This holds iff โจv,w1โโฉ=0 for all w1โ and โจv,w2โโฉ=0 for all w2โ, i.e., vโW1โฅโโฉW2โฅโ. โ Q10: Best approximationShow that projWโ(v) is the closest vector in W to v โ i.e., for any wโW: โฅvโprojWโ(v)โฅโคโฅvโwโฅ.Proof: Write vโw=(vโproj)+(projโw). Since projโwโW and vโprojโWโฅ, they're orthogonal. By Pythagoras: โฅvโwโฅ2=โฅvโprojโฅ2+โฅprojโwโฅ2โฅโฅvโprojโฅ2. โ
๐ Cross-References
- Next topic: Gram-Schmidt & QR Decomposition
- Week 8 (Gram-Schmidt): Builds orthonormal bases from any basis
- Week 12 (Eigenvalues): Spectral theorem โ symmetric matrices have orthogonal eigenvectors
- BSCS2004 (ML Foundations): Orthogonal features, PCA Join Discord Previous7.3 Inner Products & NormsNext8.2 Gram-Schmidt & QR