Quiz 2

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    uv\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 iji \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=civi,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,vi0\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=j0ij>> \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 vV\mathbf{v} \in V:
v=v,e1e1+v,e2e2++v,enen\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 WVW \subseteq V, the orthogonal complement is:
>W={vVv,w=0 for all wW}>> W^\perp = \{\mathbf{v} \in V \mid \langle \mathbf{v}, \mathbf{w} \rangle = 0 \text{ for all } \mathbf{w} \in W\} >
Properties:
  • WW^\perp is a subspace of VV
  • WW={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 WW^\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 WVW \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=1kv,eiei>> \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 vprojW(v)\mathbf{v} - \text{proj}_W(\mathbf{v}), which lies in WW^\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: vproj=(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
** vW\mathbf{v} \in W **projW(v)=v\text{proj}_W(\mathbf{v}) = \mathbf{v}
** vW\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,eiei\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 vectorsu,v=0\langle \mathbf{u}, \mathbf{v} \rangle = 0
Orthonormal setOrthogonal + each has norm 1
Coordinates in orthonormal basisci=v,eic_i = \langle \mathbf{v}, \mathbf{e}_i \rangle
Orthogonal complementW={vv,w=0 wW}W^\perp = \{\mathbf{v} \mid \langle \mathbf{v}, \mathbf{w} \rangle = 0 \ \forall \mathbf{w} \in W\}
**Projection onto WW **projW(v)=v,eiei\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)=11+0=0(1,1,1) \cdot (1,-1,0) = 1-1+0 = 0(1,1,1)(1,1,2)=1+12=0(1,1,1) \cdot (1,1,-2) = 1+1-2 = 0(1,1,0)(1,1,2)=11+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=25+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+566=16c_3 = \langle (2,5,3), \mathbf{e}_3 \rangle = \frac{2+5-6}{\sqrt{6}} = \frac{1}{\sqrt{6}}
So (2,5,3)=103e132e2+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 WW^\perp where W=span{(1,1,1),(1,0,1)}W = \text{span}\{(1,1,1), (1,0,-1)\}.
Solution: Solve wboth\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)=xz=0x=z(x,y,z) \cdot (1,0,-1) = x - z = 0 \Rightarrow x = z. Then x+y+x=2x+y=0y=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=12+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+266=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=12e232e3\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=vuu2u=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)=(525813,918713)=(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=1kv,ei2\|\text{proj}_W(\mathbf{v})\|^2 = \sum_{i=1}^k \langle \mathbf{v}, \mathbf{e}_i \rangle^2.
Proof: proj2=v,eiei,v,ejej=ijv,eiv,ejei,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 iji \neq j and =1=1 for i=ji=j: proj2=i=1kv,ei2\|\text{proj}\|^2 = \sum_{i=1}^k \langle \mathbf{v}, \mathbf{e}_i \rangle^2. ✓ Q9: Orthogonal complement of a sum
Show (W1+W2)=W1W2(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 w1W1,w2W2\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., vW1W2\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 wW\mathbf{w} \in W: vprojW(v)vw\|\mathbf{v} - \text{proj}_W(\mathbf{v})\| \leq \|\mathbf{v} - \mathbf{w}\|.
Proof: Write vw=(vproj)+(projw)\mathbf{v} - \mathbf{w} = (\mathbf{v} - \text{proj}) + (\text{proj} - \mathbf{w}). Since projwW\text{proj} - \mathbf{w} \in W and vprojW\mathbf{v} - \text{proj} \in W^\perp, they're orthogonal. By Pythagoras: vw2=vproj2+projw2vproj2\|\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
System Normal // Awaiting Context

Intelligence Hub

Navigate the knowledge graph to generate context. The Hub adapts dynamically to surface backlinks, related notes, and metadata insights.