Orthogonality & Orthonormal Bases

1607 words
8 min read
Python Week 1: the first filter for runtime behavior
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:
โŸจu,vโŸฉ=0โ€…โ€ŠโŸบโ€…โ€ŠuโŠฅv\langle \mathbf{u}, \mathbf{v} \rangle = 0 \iff \mathbf{u} \perp \mathbf{v}
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

Definition (Orthogonal Set). A set of vectors {v1,โ€ฆ,vk}\{\mathbf{v}_1, \dots, \mathbf{v}_k\} is orthogonal if โŸจvi,vjโŸฉ=0\langle \mathbf{v}_i, \mathbf{v}_j \rangle = 0 for all iโ‰ ji \neq j. Theorem. An orthogonal set of non-zero vectors is linearly independent. Proof: Suppose c1v1+โ‹ฏ+ckvk=0c_1\mathbf{v}_1 + \cdots + c_k\mathbf{v}_k = \mathbf{0}. Take inner product with vi\mathbf{v}_i:
โŸจc1v1+โ‹ฏ+ckvk,viโŸฉ=ciโŸจvi,viโŸฉ=0\langle c_1\mathbf{v}_1 + \cdots + c_k\mathbf{v}_k, \mathbf{v}_i \rangle = c_i \langle \mathbf{v}_i, \mathbf{v}_i \rangle = 0
Since โŸจvi,viโŸฉโ‰ 0\langle \mathbf{v}_i, \mathbf{v}_i \rangle \neq 0 (non-zero vector), ci=0c_i = 0 for all ii. โˆŽ

2.2 Orthonormal Set

Definition (Orthonormal Set). An orthonormal set is an orthogonal set where each vector has norm 1:
>โŸจvi,vjโŸฉ={1i=j0iโ‰ j>> \langle \mathbf{v}_i, \mathbf{v}_j \rangle = \begin{cases} 1 & i = j \\ 0 & i \neq j \end{cases} >
Example 1: Orthogonal and orthonormal sets
{(1,2,โˆ’3),(3,0,1),(1,โˆ’5,โˆ’3)}\{(1,2,-3), (3,0,1), (1,-5,-3)\} is orthogonal (check dot products = 0). Normalising gives an orthonormal set.

2.3 Orthonormal Basis

Definition (Orthonormal Basis). An orthonormal basis of VV is a basis that is also an orthonormal set. The beauty of orthonormal bases: If {e1,โ€ฆ,en}\{\mathbf{e}_1, \dots, \mathbf{e}_n\} is orthonormal, then for any vโˆˆV\mathbf{v} \in V:
v=โŸจv,e1โŸฉe1+โŸจv,e2โŸฉe2+โ‹ฏ+โŸจv,enโŸฉen\mathbf{v} = \langle \mathbf{v}, \mathbf{e}_1 \rangle \mathbf{e}_1 + \langle \mathbf{v}, \mathbf{e}_2 \rangle \mathbf{e}_2 + \cdots + \langle \mathbf{v}, \mathbf{e}_n \rangle \mathbf{e}_n
The coordinates are just inner products โ€” no system of equations to solve!
Example 2: Coordinates in orthonormal basis
Standard basis of R2\mathbb{R}^2 is orthonormal. For v=(3,4)\mathbf{v} = (3,4): โŸจv,e1โŸฉ=3\langle \mathbf{v}, \mathbf{e}_1 \rangle = 3, โŸจv,e2โŸฉ=4\langle \mathbf{v}, \mathbf{e}_2 \rangle = 4. So v=3e1+4e2\mathbf{v} = 3\mathbf{e}_1 + 4\mathbf{e}_2 โ€” we read coordinates directly. Example 3: A non-standard orthonormal basis
B={(12,12),(โˆ’12,12)}B = \left\{\left(\frac{1}{\sqrt{2}}, \frac{1}{\sqrt{2}}\right), \left(-\frac{1}{\sqrt{2}}, \frac{1}{\sqrt{2}}\right)\right\} is orthonormal.
For v=(3,1)\mathbf{v} = (3,1): โŸจv,b1โŸฉ=3+12=42=22\langle \mathbf{v}, \mathbf{b}_1 \rangle = \frac{3+1}{\sqrt{2}} = \frac{4}{\sqrt{2}} = 2\sqrt{2} โŸจv,b2โŸฉ=โˆ’3+12=โˆ’22=โˆ’2\langle \mathbf{v}, \mathbf{b}_2 \rangle = \frac{-3+1}{\sqrt{2}} = \frac{-2}{\sqrt{2}} = -\sqrt{2}
Check: 22(12,12)+(โˆ’2)(โˆ’12,12)=(2,2)+(1,โˆ’1)=(3,1)2\sqrt{2}\left(\frac{1}{\sqrt{2}}, \frac{1}{\sqrt{2}}\right) + (-\sqrt{2})\left(-\frac{1}{\sqrt{2}}, \frac{1}{\sqrt{2}}\right) = (2,2) + (1,-1) = (3,1) โœ“

3. Orthogonal Complements

Definition (Orthogonal Complement). For a subspace WโІVW \subseteq V, the orthogonal complement is:
>WโŠฅ={vโˆˆVโˆฃโŸจv,wโŸฉ=0ย forย allย wโˆˆW}>> W^\perp = \{\mathbf{v} \in V \mid \langle \mathbf{v}, \mathbf{w} \rangle = 0 \text{ for all } \mathbf{w} \in W\} >
Properties:
  • WโŠฅW^\perp is a subspace of VV
  • WโˆฉWโŠฅ={0}W \cap W^\perp = \{\mathbf{0}\}
  • dimโก(W)+dimโก(WโŠฅ)=dimโก(V)\dim(W) + \dim(W^\perp) = \dim(V)
  • (WโŠฅ)โŠฅ=W(W^\perp)^\perp = W
Example 4: Orthogonal complement in โ„ยฒ
W=span{(1,2)}W = \text{span}\{(1,2)\} (a line). WโŠฅ={(x,y)โˆฃx+2y=0}W^\perp = \{(x,y) \mid x + 2y = 0\} (the perpendicular line). Basis for WโŠฅW^\perp: {(โˆ’2,1)}\{(-2,1)\}. Example 5: Orthogonal complement in โ„ยณ
W=xyW = xy-plane {(x,y,0)}\{(x,y,0)\}. WโŠฅ={(0,0,z)}W^\perp = \{(0,0,z)\} (the zz-axis).

4. Orthogonal Projections

Definition (Orthogonal Projection). For a subspace WโІVW \subseteq V with orthonormal basis {e1,โ€ฆ,ek}\{\mathbf{e}_1, \dots, \mathbf{e}_k\}, the orthogonal projection of v\mathbf{v} onto WW is:
>projW(v)=โˆ‘i=1kโŸจv,eiโŸฉei>> \text{proj}_W(\mathbf{v}) = \sum_{i=1}^k \langle \mathbf{v}, \mathbf{e}_i \rangle \mathbf{e}_i >
The component of v\mathbf{v} orthogonal to WW is vโˆ’projW(v)\mathbf{v} - \text{proj}_W(\mathbf{v}), which lies in WโŠฅW^\perp.
Example 6: Projection onto a line
Project v=(3,4)\mathbf{v} = (3,4) onto the line W=span{(1,2)}W = \text{span}\{(1,2)\}.
Normalise: e=(1,2)5\mathbf{e} = \frac{(1,2)}{\sqrt{5}}. โŸจv,eโŸฉ=3+85=115\langle \mathbf{v}, \mathbf{e} \rangle = \frac{3+8}{\sqrt{5}} = \frac{11}{\sqrt{5}}. projW(v)=115โ‹…(1,2)5=115(1,2)=(2.2,4.4)\text{proj}_W(\mathbf{v}) = \frac{11}{\sqrt{5}} \cdot \frac{(1,2)}{\sqrt{5}} = \frac{11}{5}(1,2) = (2.2, 4.4).
Check: vโˆ’proj=(0.8,โˆ’0.4)\mathbf{v} - \text{proj} = (0.8, -0.4), which is orthogonal to (1,2)(1,2): 0.8(1)+(โˆ’0.4)(2)=00.8(1) + (-0.4)(2) = 0 โœ“

5. Edge Cases & Gotchas

SituationWhat Happens
Zero vectorOrthogonal to everything; cannot be in an orthonormal set
** vโˆˆW\mathbf{v} \in W **projW(v)=v\text{proj}_W(\mathbf{v}) = \mathbf{v}
** vโŠฅW\mathbf{v} \perp W **projW(v)=0\text{proj}_W(\mathbf{v}) = \mathbf{0}

6. Common Pitfalls

โŒ Pitfall 1: Thinking orthogonal = independent but not vice versa

Independence does NOT imply orthogonality. (1,0)(1,0) and (1,1)(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\text{proj}_W(\mathbf{v}) = \sum \langle \mathbf{v}, \mathbf{e}_i \rangle \mathbf{e}_i requires an orthonormal basis, not just orthogonal.

7. Formula Summary Table

ConceptFormula
Orthogonal vectorsโŸจu,vโŸฉ=0\langle \mathbf{u}, \mathbf{v} \rangle = 0
Orthonormal setOrthogonal + each has norm 1
Coordinates in orthonormal basisci=โŸจv,eiโŸฉc_i = \langle \mathbf{v}, \mathbf{e}_i \rangle
Orthogonal complementWโŠฅ={vโˆฃโŸจv,wโŸฉ=0ย โˆ€wโˆˆW}W^\perp = \{\mathbf{v} \mid \langle \mathbf{v}, \mathbf{w} \rangle = 0 \ \forall \mathbf{w} \in W\}
**Projection onto WW **projW(v)=โˆ‘โŸจv,eiโŸฉei\text{proj}_W(\mathbf{v}) = \sum \langle \mathbf{v}, \mathbf{e}_i \rangle \mathbf{e}_i

8. ๐Ÿ“ Practice Questions

Q1: Orthogonal set?
Is {(1,1,1),(1,โˆ’1,0),(1,1,โˆ’2)}\{(1,1,1), (1,-1,0), (1,1,-2)\} orthogonal?
Solution: (1,1,1)โ‹…(1,โˆ’1,0)=1โˆ’1+0=0(1,1,1) \cdot (1,-1,0) = 1-1+0 = 0 โœ“ (1,1,1)โ‹…(1,1,โˆ’2)=1+1โˆ’2=0(1,1,1) \cdot (1,1,-2) = 1+1-2 = 0 โœ“ (1,โˆ’1,0)โ‹…(1,1,โˆ’2)=1โˆ’1+0=0(1,-1,0) \cdot (1,1,-2) = 1-1+0 = 0 โœ“
Yes, orthogonal. Q2: Orthonormal from orthogonal
Normalise the orthogonal set from Q1.
Solution: โˆฅ(1,1,1)โˆฅ=3\|(1,1,1)\| = \sqrt{3}, so e1=(13,13,13)\mathbf{e}_1 = \left(\frac{1}{\sqrt{3}}, \frac{1}{\sqrt{3}}, \frac{1}{\sqrt{3}}\right). โˆฅ(1,โˆ’1,0)โˆฅ=2\|(1,-1,0)\| = \sqrt{2}, so e2=(12,โˆ’12,0)\mathbf{e}_2 = \left(\frac{1}{\sqrt{2}}, -\frac{1}{\sqrt{2}}, 0\right). โˆฅ(1,1,โˆ’2)โˆฅ=6\|(1,1,-2)\| = \sqrt{6}, so e3=(16,16,โˆ’26)\mathbf{e}_3 = \left(\frac{1}{\sqrt{6}}, \frac{1}{\sqrt{6}}, -\frac{2}{\sqrt{6}}\right). Q3: Coordinates in orthonormal basis
Express (2,5,3)(2,5,3) in the orthonormal basis from Q2.
Solution: c1=โŸจ(2,5,3),e1โŸฉ=2+5+33=103c_1 = \langle (2,5,3), \mathbf{e}_1 \rangle = \frac{2+5+3}{\sqrt{3}} = \frac{10}{\sqrt{3}} c2=โŸจ(2,5,3),e2โŸฉ=2โˆ’5+02=โˆ’32c_2 = \langle (2,5,3), \mathbf{e}_2 \rangle = \frac{2-5+0}{\sqrt{2}} = -\frac{3}{\sqrt{2}} c3=โŸจ(2,5,3),e3โŸฉ=2+5โˆ’66=16c_3 = \langle (2,5,3), \mathbf{e}_3 \rangle = \frac{2+5-6}{\sqrt{6}} = \frac{1}{\sqrt{6}}
So (2,5,3)=103e1โˆ’32e2+16e3(2,5,3) = \frac{10}{\sqrt{3}}\mathbf{e}_1 - \frac{3}{\sqrt{2}}\mathbf{e}_2 + \frac{1}{\sqrt{6}}\mathbf{e}_3. Q4: Orthogonal complement
Find WโŠฅW^\perp where W=span{(1,1,1),(1,0,โˆ’1)}W = \text{span}\{(1,1,1), (1,0,-1)\}.
Solution: Solve wโŠฅboth\mathbf{w} \perp \text{both}: (x,y,z)โ‹…(1,1,1)=x+y+z=0(x,y,z) \cdot (1,1,1) = x+y+z = 0 (x,y,z)โ‹…(1,0,โˆ’1)=xโˆ’z=0โ‡’x=z(x,y,z) \cdot (1,0,-1) = x - z = 0 \Rightarrow x = z. Then x+y+x=2x+y=0โ‡’y=โˆ’2xx+y+x = 2x + y = 0 \Rightarrow y = -2x.
WโŠฅ=span{(1,โˆ’2,1)}W^\perp = \text{span}\{(1,-2,1)\}. Q5: Projection onto a line
Project (2,1)(2,1) onto the line through (1,1)(1,1).
Solution: e=(1,1)2\mathbf{e} = \frac{(1,1)}{\sqrt{2}}. โŸจ(2,1),eโŸฉ=2+12=32\langle (2,1), \mathbf{e} \rangle = \frac{2+1}{\sqrt{2}} = \frac{3}{\sqrt{2}}. proj=32โ‹…(1,1)2=32(1,1)=(1.5,1.5)\text{proj} = \frac{3}{\sqrt{2}} \cdot \frac{(1,1)}{\sqrt{2}} = \frac{3}{2}(1,1) = (1.5, 1.5). Q6: Projection onto a plane
Project (1,2,3)(1,2,3) onto the plane x+y+z=0x + y + z = 0 (with orthonormal basis from Q2's e2,e3\mathbf{e}_2, \mathbf{e}_3).
Solution: c2=โŸจ(1,2,3),e2โŸฉ=1โˆ’2+02=โˆ’12c_2 = \langle (1,2,3), \mathbf{e}_2 \rangle = \frac{1-2+0}{\sqrt{2}} = -\frac{1}{\sqrt{2}}. c3=โŸจ(1,2,3),e3โŸฉ=1+2โˆ’66=โˆ’36=โˆ’32c_3 = \langle (1,2,3), \mathbf{e}_3 \rangle = \frac{1+2-6}{\sqrt{6}} = -\frac{3}{\sqrt{6}} = -\sqrt{\frac{3}{2}}.
proj=โˆ’12e2โˆ’32e3\text{proj} = -\frac{1}{\sqrt{2}}\mathbf{e}_2 - \sqrt{\frac{3}{2}}\mathbf{e}_3.
Simplify: e2+3e3=(12+316,โˆ’12+316,0+3(โˆ’26))\mathbf{e}_2 + \sqrt{3}\mathbf{e}_3 = \left(\frac{1}{\sqrt{2}}+\sqrt{3}\frac{1}{\sqrt{6}}, -\frac{1}{\sqrt{2}}+\sqrt{3}\frac{1}{\sqrt{6}}, 0+\sqrt{3}\left(-\frac{2}{\sqrt{6}}\right)\right) =(12+12,โˆ’12+12,โˆ’236)=(2,0,โˆ’2)= \left(\frac{1}{\sqrt{2}}+\frac{1}{\sqrt{2}}, -\frac{1}{\sqrt{2}}+\frac{1}{\sqrt{2}}, -\frac{2\sqrt{3}}{\sqrt{6}}\right) = (\sqrt{2}, 0, -\sqrt{2}).
So proj=โˆ’12(2,0,โˆ’2)=(โˆ’1,0,1)\text{proj} = \frac{-1}{\sqrt{2}}(\sqrt{2}, 0, -\sqrt{2}) = (-1, 0, 1).
Check: (โˆ’1,0,1)(-1,0,1) is in the plane x+y+z=0x+y+z=0 โœ“. And (1,2,3)โˆ’(โˆ’1,0,1)=(2,2,2)(1,2,3) - (-1,0,1) = (2,2,2) is along (1,1,1)(1,1,1), perpendicular to the plane โœ“. Q7: Orthogonal decomposition
Decompose (4,7)(4,7) into components parallel and perpendicular to (2,3)(2,3).
Solution: Project onto (2,3)(2,3): projuv=vโ‹…uโˆฅuโˆฅ2u=8+214+9(2,3)=2913(2,3)=(5813,8713)\text{proj}_{\mathbf{u}} \mathbf{v} = \frac{\mathbf{v}\cdot\mathbf{u}}{\|\mathbf{u}\|^2}\mathbf{u} = \frac{8+21}{4+9}(2,3) = \frac{29}{13}(2,3) = \left(\frac{58}{13}, \frac{87}{13}\right). vโŠฅ=(4,7)โˆ’(5813,8713)=(52โˆ’5813,91โˆ’8713)=(โˆ’613,413)\mathbf{v}_\perp = (4,7) - \left(\frac{58}{13}, \frac{87}{13}\right) = \left(\frac{52-58}{13}, \frac{91-87}{13}\right) = \left(-\frac{6}{13}, \frac{4}{13}\right). Q8: Orthogonal projection formula check
If {e1,โ€ฆ,ek}\{\mathbf{e}_1, \dots, \mathbf{e}_k\} is orthonormal, show โˆฅprojW(v)โˆฅ2=โˆ‘i=1kโŸจv,eiโŸฉ2\|\text{proj}_W(\mathbf{v})\|^2 = \sum_{i=1}^k \langle \mathbf{v}, \mathbf{e}_i \rangle^2.
Proof: โˆฅprojโˆฅ2=โŸจโˆ‘โŸจv,eiโŸฉei,โˆ‘โŸจv,ejโŸฉejโŸฉ=โˆ‘iโˆ‘jโŸจv,eiโŸฉโŸจv,ejโŸฉโŸจei,ejโŸฉ\|\text{proj}\|^2 = \langle \sum \langle \mathbf{v}, \mathbf{e}_i \rangle \mathbf{e}_i, \sum \langle \mathbf{v}, \mathbf{e}_j \rangle \mathbf{e}_j \rangle = \sum_i \sum_j \langle \mathbf{v}, \mathbf{e}_i \rangle \langle \mathbf{v}, \mathbf{e}_j \rangle \langle \mathbf{e}_i, \mathbf{e}_j \rangle. Since โŸจei,ejโŸฉ=0\langle \mathbf{e}_i, \mathbf{e}_j \rangle = 0 for iโ‰ ji \neq j and =1=1 for i=ji=j: โˆฅprojโˆฅ2=โˆ‘i=1kโŸจv,eiโŸฉ2\|\text{proj}\|^2 = \sum_{i=1}^k \langle \mathbf{v}, \mathbf{e}_i \rangle^2. โœ“ Q9: Orthogonal complement of a sum
Show (W1+W2)โŠฅ=W1โŠฅโˆฉW2โŠฅ(W_1 + W_2)^\perp = W_1^\perp \cap W_2^\perp.
Proof: vโˆˆ(W1+W2)โŠฅ\mathbf{v} \in (W_1 + W_2)^\perp iff โŸจv,w1+w2โŸฉ=0\langle \mathbf{v}, \mathbf{w}_1 + \mathbf{w}_2 \rangle = 0 for all w1โˆˆW1,w2โˆˆW2\mathbf{w}_1 \in W_1, \mathbf{w}_2 \in W_2. This holds iff โŸจv,w1โŸฉ=0\langle \mathbf{v}, \mathbf{w}_1 \rangle = 0 for all w1\mathbf{w}_1 and โŸจv,w2โŸฉ=0\langle \mathbf{v}, \mathbf{w}_2 \rangle = 0 for all w2\mathbf{w}_2, i.e., vโˆˆW1โŠฅโˆฉW2โŠฅ\mathbf{v} \in W_1^\perp \cap W_2^\perp. โœ“ Q10: Best approximation
Show that projW(v)\text{proj}_W(\mathbf{v}) is the closest vector in WW to v\mathbf{v} โ€” i.e., for any wโˆˆW\mathbf{w} \in W: โˆฅvโˆ’projW(v)โˆฅโ‰คโˆฅvโˆ’wโˆฅ\|\mathbf{v} - \text{proj}_W(\mathbf{v})\| \leq \|\mathbf{v} - \mathbf{w}\|.
Proof: Write vโˆ’w=(vโˆ’proj)+(projโˆ’w)\mathbf{v} - \mathbf{w} = (\mathbf{v} - \text{proj}) + (\text{proj} - \mathbf{w}). Since projโˆ’wโˆˆW\text{proj} - \mathbf{w} \in W and vโˆ’projโˆˆWโŠฅ\mathbf{v} - \text{proj} \in W^\perp, they're orthogonal. By Pythagoras: โˆฅvโˆ’wโˆฅ2=โˆฅvโˆ’projโˆฅ2+โˆฅprojโˆ’wโˆฅ2โ‰ฅโˆฅvโˆ’projโˆฅ2\|\mathbf{v} - \mathbf{w}\|^2 = \|\mathbf{v} - \text{proj}\|^2 + \|\text{proj} - \mathbf{w}\|^2 \geq \|\mathbf{v} - \text{proj}\|^2. โœ“

๐Ÿ”— Cross-References

Document outline

Keep your place and jump directly to a heading.

Table of contents

No note selected

Open a chapter to see its outline, backlinks, and sources here.