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ฮธโ]=[10โ01โ]>Check:
>Q=[10โ0โ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=[10โ01โ]โ2[1/2โ1/2โโ1/21/2โ]=[01โ10โ]>Example 3: Reflection across line y = xu=(2โ1โ,โ2โ1โ) (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=31โโ2โ21โ21โ2โ122โโ>Q1: Orthogonal checkIs
>QTQ=91โโ221โโ212โ1โ22โโโ2โ21โ21โ2โ122โโ>orthogonal?Solution: Compute QTQ (should be I).
>Q=[0โ1โ10โ]>. 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โ1โ10โ][01โโ10โ]=[10โ01โ]>. Check:
>R(4ฯโ)=[2โ/22โ/2โโ2โ/22โ/2โ]>โ. Q3: Product of orthogonal matricesIf Q1โ and Q2โ are orthogonal, show Q1โQ2โ is orthogonal.Proof: (Q1โQ2โ)T(Q1โQ2โ)=Q2TโQ1TโQ1โQ2โ=Q2TโIQ2โ=Q2TโQ2โ=I. โ Q4: Rotation by 45ยฐFind the image of (1,0) under rotation by 45โ.Solution: cos45โ=sin45โ=22โโ.
>H=Iโ2uuT=[10โ01โ]โ2[1/21/2โ1/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=(2โ1โ,2โ1โ).
>Rzโ(90โ)=โ010โโ100โ001โโ>.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=โ100โ010โ00โ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