Orthogonal Transformations & Rotations
1650 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
# Orthogonal Transformations & Rotations ## 🎯 Learning Objectives After this topic you will be able to: - Identify orthogonal matrices ($Q^T Q = I$) - Prove that orthogonal transformations preserve lengths and dot products - Recognise rotation and reflection matrices - Compute with orthogonal matrices including $Q^...

Orthogonal Transformations & Rotations
🎯 Learning Objectives
After this topic you will be able to:
- Identify orthogonal matrices (QTQ=I)
- Prove that orthogonal transformations preserve lengths and dot products
- Recognise rotation and reflection matrices
- Compute with orthogonal matrices including Q−1=QT
- Understand the determinant of orthogonal matrices (±1)
📋 Prerequisites
- Orthogonality (Week 8) — orthonormal bases
- Matrix Multiplication (Week 1) — matrix operations
- Orthogonal transformations are the rigid motions of linear algebra
1. Intuition: Rigid Motions
An orthogonal transformation is a linear map that preserves lengths and angles. In R2 and R3, these are exactly rotations and reflections — the transformations that don't stretch or squish space.
Imagine a rigid object (like a book) in space. You can rotate it or flip it over, but you can't stretch it. Those operations are orthogonal transformations.
2. Orthogonal Matrices
2.1 Definition
>QTQ=QQT=In>Definition (Orthogonal Matrix). A square n×n matrix Q is orthogonal if:
Equivalently, Q−1=QT. Key properties:
- Columns of Q form an orthonormal basis of Rn
- Rows of Q also form an orthonormal basis
- det(Q)=±1
- ∥Qx∥=∥x∥ for all x (preserves length)
- ⟨Qx,Qy⟩=⟨x,y⟩ (preserves dot product)
>Q=[cosθsinθ−sinθcosθ]>Example 1: 2×2 Rotation Matrix
>QTQ=[cosθ−sinθsinθcosθ][cosθsinθ−sinθcosθ]=[1001]>Check:
>Q=[100−1]>✓ det(Q)=cos2θ+sin2θ=1 Example 2: 2×2 Reflection MatrixReflection across x-axis:
QTQ=I ✓, det(Q)=−1
2.2 Determinant = ±1
If Q is orthogonal, QTQ=I, so:
Therefore det(Q)=±1.
- det(Q)=1: Proper rotation (orientation-preserving)
- det(Q)=−1: Reflection or rotation + reflection (orientation-reversing)
3. Geometry of Orthogonal Transformations
3.1 Rotations in R2
R(θ)=[cosθsinθ−sinθcosθ]Rotates vectors counterclockwise by θ.
3.2 Rotations in R3
Rotation around x-axis by θ:
Rotation around y-axis by θ:
Rotation around z-axis by θ:
3.3 Reflections
Reflection across a line through origin with unit direction u:
This is called a Householder reflection.
>H=I−2uuT=[1001]−2[1/2−1/2−1/21/2]=[0110]>Example 3: Reflection across line y = xu=(21,−21) (unit normal to line y=x).
.Check: H(1,2)=(2,1) ✓ (swaps coordinates, reflecting across y=x).
4. Properties
| Property | Formula |
|---|---|
| Inverse | Q−1=QT |
| Preserves norm | $\ |
| Preserves dot product | ⟨Qx,Qy⟩=⟨x,y⟩ |
| Preserves angles | Angle between Qx and Qy = angle between x and y |
| Determinant | det(Q)=±1 |
| Eigenvalues | $ |
| Product | Product of orthogonal matrices is orthogonal |
5. Edge Cases & Gotchas
| Situation | What Happens |
|---|---|
| ** Q=I ** | Orthogonal (identity is a rotation by 0°) |
| ** Q=−I ** | Orthogonal (rotation by 180° in R2 ) |
| Permutation matrices | Orthogonal — they just reorder coordinates |
| Non-square matrices with orthonormal columns | Called semi-orthogonal; QTQ=I but QQT=I |
6. Common Pitfalls
❌ Pitfall 1: Thinking "orthogonal" means entries are orthogonal
An orthogonal matrix has orthonormal columns, not necessarily orthogonal entries.
❌ Pitfall 2: Confusing orthogonal with diagonalisable
Orthogonal matrices are diagonalisable over C (eigenvalues have ∣λ∣=1) but may not be diagonalisable over R (rotation matrices have complex eigenvalues).
❌ Pitfall 3: Assuming QT=Q−1 for non-square matrices
For non-square matrices with orthonormal columns, QTQ=I but QQT=I, so QT=Q−1.
7. Formula Summary Table
| Concept | Formula |
|---|---|
| Definition | QTQ=I |
| Inverse | Q−1=QT |
| Norm preservation | $\ |
| **Rotation in R2 ** | [cosθsinθ−sinθcosθ] |
| Householder reflection | H=I−2uuT |
| Determinant | det(Q)=±1 |
8. 📝 Practice Questions
>Q=312−2121−2122>Q1: Orthogonal checkIs
>QTQ=91221−2121−222−2121−2122>orthogonal?Solution: Compute QTQ (should be I).
>Q=[0−110]>. Entry (1,1): 91(4+4+1)=1. (1,2): 91(4−2−2)=0. (1,3): 91(2+4+2)=98=0.Not orthogonal. Wait — let me recheck. 2(1)+(−2)(2)+1(2)=2−4+2=0. So (1,3)=0 ✓. Let me recompute: 2(1)+(−2)(2)+1(2)=2−4+2=0 ✓. All off-diagonal should be 0. And diagonal entries = 1. Yes, it is orthogonal. det(Q)=271(2(2−(−4))−2(−4−2)+1(4−1))=271(12+12+3)=2727=1. So Q is orthogonal with det=1. Q2: Inverse of orthogonal matrixIf
>Q−1=QT=[01−10]>, find Q−1.Solution: For orthogonal matrices,
>QQT=[0−110][01−10]=[1001]>. Check:
>R(4π)=[2/22/2−2/22/2]>✓. Q3: Product of orthogonal matricesIf Q1 and Q2 are orthogonal, show Q1Q2 is orthogonal.Proof: (Q1Q2)T(Q1Q2)=Q2TQ1TQ1Q2=Q2TIQ2=Q2TQ2=I. ✓ Q4: Rotation by 45°Find the image of (1,0) under rotation by 45∘.Solution: cos45∘=sin45∘=22.
>H=I−2uuT=[1001]−2[1/21/21/21/2]=[0−1−10]>. R(1,0)=(22,22). Q5: Reflection matrixFind the matrix that reflects across the line y=−x.Solution: Unit normal to y=−x: u=(21,21).
>Rz(90∘)=010−100001>.Check: H(1,0)=(0,−1) which is (1,0) reflected across y=−x ✓. Q6: Determinant of orthogonal matrixIf Q is 5×5 orthogonal with det(Q)=−1, what does this tell us?Solution: det(Q)=−1 means Q reverses orientation. It's a reflection, or a rotation composed with a reflection (improper rotation). It must have an odd number of eigenvalues equal to −1. Q7: Orthogonal diagonalisationIf A is symmetric, it can be orthogonal diagonalised: A=QTDQ where Q is orthogonal and D is diagonal. Why is this useful?Solution: This is the Spectral Theorem. It means we can find an orthonormal basis of eigenvectors. Computing Ak=QTDkQ is easy. PCA, covariance matrices, and quadratic forms all use this. Q8: Norm preservation proofProve ∥Qx∥=∥x∥ for orthogonal Q.Proof: ∥Qx∥2=⟨Qx,Qx⟩=(Qx)T(Qx)=xTQTQx=xTIx=xTx=∥x∥2. Taking square roots gives the result. ✓ Q9: 3D rotationFind the matrix for rotation around the z-axis by 90∘.Solution: cos90∘=0, sin90∘=1.
>Q=10001000−1>. Check: Rz(1,0,0)=(0,1,0) ✓. Q10: Orthogonal matrix with det = -1Find a 3×3 orthogonal matrix with determinant −1.Solution: Reflection across xy-plane:
. QTQ=I ✓. det(Q)=−1 ✓.
🔗 Cross-References
- Next topic: Multivariable Functions
- Week 12 (Eigenvalues): Orthogonal matrices have eigenvalues with ∣λ∣=1
- BSCS3004 (Deep Learning): Orthogonal weight matrices prevent vanishing gradients
- BSCS2004 (ML Foundations): PCA uses orthogonal transformations Join Discord Previous8.2 Gram-Schmidt & QRNext9.1 Multivariable Functions