Survey of Mathematics

3.3 Orthogonal matrices, rotations and reflections

The matrices that never stretch anything are exactly those whose columns are orthonormal. In the plane they are rotations and reflections; in space every rotation turns about a fixed axis. Their inverse is free, which is why computers love them.

Apostol, not taughtBeyond the courseApostol 5.10Strang, Introduction to Linear Algebra, 4.4Axler 7C (isometries)

A general matrix stretches some directions and squashes others. This chapter studies the matrices that do neither: they move vectors around without changing any length or any angle. In the plane those are rotations and reflections. In space they include every way of turning a rigid object. They have one more property that makes them precious in computing: their inverse is their transpose, so undoing them costs nothing and loses no accuracy.

Before you start

Chapter 2.9 (orthonormal sets, norms) and 3.1 (where QQ in A=QΛQTA = Q\Lambda Q^{\mathsf T} already had orthonormal columns).

Quick checkFor orthonormal vectors q1,q2q_1, q_2, what is q1⋅q2q_1 \cdot q_2 and q1⋅q1q_1 \cdot q_1?
Quick checkWhat is det⁡(AB)\det(AB)?

The picture

Watch the orange unit square: under “Rotate 90°” and “Reflect” it stays a unit square, only turned or flipped. The grid stays square too. Now try “Shear” or “Stretch”: squares become parallelograms or rectangles, so lengths or angles change. The maps that keep the grid square are this chapter’s subject.

Where this came from· Rotations, from Euler to the Apollo guidance computer

Leonhard Euler presented a paper to the St. Petersburg Academy in 1775 (printed in 1776) showing that any turning of a rigid body about a fixed point is a rotation about a single axis: a ball turned any way keeps two opposite points where they were. He wanted a way to describe the motion of rigid bodies with a few numbers. In 1843 William Rowan Hamilton found the quaternions, which describe 3D rotations compactly. In 1846 Arthur Cayley published a formula that builds an orthogonal matrix from an antisymmetric one. The idea outlived them. The Apollo guidance computer stored the orientation of its inertial platform as a 3 by 3 matrix of this kind (called REFSMMAT), and Apollo documents describe an orthogonalization step when computing it. Any program that multiplies many rotation matrices must restore orthogonality now and then, because rounding errors slowly turn a rotation into a slight stretch.

Definitions and theorems

Definition A

Orthogonal matrix

A real n×nn \times n matrix QQ is orthogonal if its columns form an orthonormal basis of Rn\mathbb R^n. Equivalently, QTQ=IQ^{\mathsf T}Q = I, because entry (i,j)(i, j) of QTQQ^{\mathsf T}Q is the dot product of column ii with column jj. Then Q−1=QTQ^{-1} = Q^{\mathsf T}, and so also QQT=IQQ^{\mathsf T} = I: the rows are orthonormal too.

In one lineA square real matrix whose columns are orthonormal; equivalently QTQ=IQ^{\mathsf T}Q = I, so Q−1=QTQ^{-1} = Q^{\mathsf T}.

Why it existsThese are exactly the matrices that preserve length, and their inverse costs nothing to compute.

Watch out· The name is misleading

An “orthogonal matrix” has orthonormal columns, not only perpendicular ones. [2003]\begin{bmatrix}2&0\\0&3\end{bmatrix} has perpendicular columns but is not orthogonal. The name is historical and every textbook uses it.

Definition B

Isometry

A linear map Q:Rn→RnQ: \mathbb R^n \to \mathbb R^n is an isometry if ∥Qx∥=∥x∥\lVert Qx \rVert = \lVert x \rVert for every xx.

In one lineA linear map that preserves length: ∥Qx∥=∥x∥\lVert Qx \rVert = \lVert x \rVert for every xx.

Why it existsIt is the precise meaning of 'moves things without distorting them'.

Theorem A Apostol 5.10; Axler 7.42

Orthogonal means length-preserving

For a real n×nn \times n matrix QQ, the following are equivalent:

  1. QTQ=IQ^{\mathsf T}Q = I.
  2. (Qx)⋅(Qy)=x⋅y(Qx) \cdot (Qy) = x \cdot y for all x,yx, y (dot products, hence angles, are preserved).
  3. ∥Qx∥=∥x∥\lVert Qx \rVert = \lVert x \rVert for all xx (lengths are preserved).

In one lineFor a square real matrix Q, these are equivalent: QᵀQ = I; Q preserves dot products; Q preserves lengths.

Why it is trueDot products and lengths determine each other (polarization), and QᵀQ = I is exactly 'dot products survive'.

ProofAxler 7.42
The idea: 1 ⇒ 2 by moving Qᵀ across. 2 ⇒ 3 by taking x = y. 3 ⇒ 2 by the polarization identity, which recovers dot products from lengths. 2 ⇒ 1 by testing on standard basis vectors.
(1 ⇒ 2) If QTQ=IQ^{\mathsf T}Q = I then (Qx)⋅(Qy)=xTIy=x⋅y(Qx) \cdot (Qy) = x^{\mathsf T}Iy = x \cdot y.
(Qx)⋅(Qy)=(Qx)TQy=xTQTQy(Qx) \cdot (Qy) = (Qx)^{\mathsf T}Qy = x^{\mathsf T}Q^{\mathsf T}Qy.
(2 ⇒ 3) Take y=xy = x: ∥Qx∥2=∥x∥2\lVert Qx \rVert^2 = \lVert x \rVert^2.
A length is the square root of a dot product with itself.
(3 ⇒ 2) x⋅y=12(∥x+y∥2−∥x∥2−∥y∥2)x \cdot y = \frac12\big(\lVert x + y \rVert^2 - \lVert x \rVert^2 - \lVert y \rVert^2\big). Apply it to Qx,QyQx, Qy, use Q(x+y)=Qx+QyQ(x + y) = Qx + Qy, and each length on the right is unchanged by QQ.
Expand ∥x+y∥2=∥x∥2+2x⋅y+∥y∥2\lVert x + y \rVert^2 = \lVert x \rVert^2 + 2x \cdot y + \lVert y \rVert^2 and solve for x⋅yx \cdot y: the polarization identity.
(2 ⇒ 1) (QTQ)ij=(Qei)⋅(Qej)=ei⋅ej(Q^{\mathsf T}Q)_{ij} = (Qe_i)\cdot(Qe_j) = e_i \cdot e_j, which is 1 if i=ji = j and 0 otherwise. So QTQ=IQ^{\mathsf T}Q = I. ■\blacksquare
Entry (i,j)(i, j) of QTQQ^{\mathsf T}Q is (Qei)⋅(Qej)(Qe_i) \cdot (Qe_j), which by 2 equals ei⋅eje_i \cdot e_j.
Theorem A standard

Determinant of an orthogonal matrix

If QQ is orthogonal, det⁡Q=±1\det Q = \pm 1. Orthogonal matrices with det⁡Q=1\det Q = 1 are called rotations (or proper orthogonal); those with det⁡Q=−1\det Q = -1 reverse orientation.

In one lineAn orthogonal matrix has determinant +1 (a rotation) or −1 (it includes a reflection).

Why it is truedet(QᵀQ) = det(Q)² = det I = 1.

Proofstandard
The idea: Take determinants of QᵀQ = I.
1=det⁡I=det⁡(QTQ)=det⁡QTdet⁡Q=(det⁡Q)21 = \det I = \det(Q^{\mathsf T}Q) = \det Q^{\mathsf T}\det Q = (\det Q)^2.
Product rule (2.7), and det⁡QT=det⁡Q\det Q^{\mathsf T} = \det Q (2.7).
So det⁡Q=±1\det Q = \pm 1. ■\blacksquare In the picture: area is unchanged (∣det⁡∣=1|\det| = 1), and the sign says whether the square was flipped.
A real number whose square is 1.
Worked example
Prove: the product PQPQ of two orthogonal matrices is orthogonal, and so is Q−1Q^{-1}.

Solution.

  1. State what must be shown. We need (PQ)T(PQ)=I(PQ)^{\mathsf T}(PQ) = I. That is the definition of orthogonal.
  2. Reverse the transpose of a product. (PQ)T(PQ)=QTPTPQ(PQ)^{\mathsf T}(PQ) = Q^{\mathsf T}P^{\mathsf T}PQ. The transpose of a product reverses the order (2.5).
  3. Cancel from the middle. PTP=IP^{\mathsf T}P = I, so this is QTQ=IQ^{\mathsf T}Q = I. Both PP and QQ are orthogonal. The inner pair collapses first, then the outer pair.
  4. Inverse. Q−1=QTQ^{-1} = Q^{\mathsf T}, and (QT)TQT=QQT=I(Q^{\mathsf T})^{\mathsf T}Q^{\mathsf T} = QQ^{\mathsf T} = I. We showed QQT=IQQ^{\mathsf T} = I in the definition (rows are orthonormal too).

Answer. Both are orthogonal. ■\blacksquare Geometric meaning: two length-preserving moves in a row preserve length, and so does undoing one.

Worked example
Prove: an orthogonal QQ sends an orthonormal basis u1,…,unu_1, \dots, u_n to an orthonormal basis.

Solution.

  1. Compute the dot products of the images. (Qui)⋅(Quj)=ui⋅uj(Qu_i)\cdot(Qu_j) = u_i \cdot u_j. Orthogonal matrices preserve dot products (the theorem above).
  2. Read off. That equals 11 when i=ji = j and 00 when i≠ji \ne j. The uiu_i are orthonormal.
  3. Count. The nn vectors QuiQu_i are orthonormal, so independent (2.9), and nn independent vectors in Rn\mathbb R^n form a basis (2.2). Orthonormal sets are independent, and a basis needs exactly nn vectors.

Answer. Qu1,…,QunQu_1, \dots, Qu_n is an orthonormal basis. ■\blacksquare Example: the standard basis goes to the columns of QQ.

The plane: every orthogonal matrix is a rotation or a reflection

Definition A

Rotation matrix

The rotation matrix by angle θ\theta is Rθ=[cos⁡θ−sin⁡θsin⁡θcos⁡θ]R_\theta = \begin{bmatrix}\cos\theta & -\sin\theta\\ \sin\theta & \cos\theta\end{bmatrix}. Its first column is ı^\hat\imath turned by θ\theta, and its second is ȷ^\hat\jmath turned by θ\theta.

In one lineRθ=[cos⁡θ−sin⁡θsin⁡θcos⁡θ]R_\theta = \begin{bmatrix}\cos\theta & -\sin\theta\\ \sin\theta & \cos\theta\end{bmatrix} turns the plane counterclockwise by θ.

Why it existsIts columns are where the two axis arrows land after turning by θ.

Theorem A standard

Orthogonal 2 by 2 matrices

Every 2×22 \times 2 orthogonal matrix is either Rθ=[cos⁡θ−sin⁡θsin⁡θcos⁡θ]R_\theta = \begin{bmatrix}\cos\theta & -\sin\theta\\ \sin\theta & \cos\theta\end{bmatrix} (determinant 1) or [cos⁡θsin⁡θsin⁡θ−cos⁡θ]\begin{bmatrix}\cos\theta & \sin\theta\\ \sin\theta & -\cos\theta\end{bmatrix} (determinant −1-1), which reflects across the line at angle θ/2\theta/2.

In one lineEvery 2×2 orthogonal matrix is a rotation R_θ (det 1) or a reflection across a line (det −1).

Why it is trueThe first column is a unit vector at some angle θ; the second must be a unit vector perpendicular to it, and there are only two choices.

Proofstandard
The idea: Column 1 is a unit vector, so it is (cos θ, sin θ) for some θ. Column 2 is a unit vector perpendicular to it: only ±(−sin θ, cos θ).
The first column is (cos⁡θ,sin⁡θ)(\cos\theta, \sin\theta) for some θ\theta.
A unit vector in the plane lies on the unit circle, so it has this form for some angle θ\theta.
The second column is a unit vector perpendicular to it, so it is (−sin⁡θ,cos⁡θ)(-\sin\theta, \cos\theta) or (sin⁡θ,−cos⁡θ)(\sin\theta, -\cos\theta).
The vectors perpendicular to (a,b)(a, b) are the multiples of (−b,a)(-b, a); length 1 leaves two choices.
The first choice gives RθR_\theta with determinant cos⁡2θ+sin⁡2θ=1\cos^2\theta + \sin^2\theta = 1; the second gives determinant −1-1. ■\blacksquare
Compute the two determinants.
Worked example
Is Q=113[51212−5]Q = \frac1{13}\begin{bmatrix}5&12\\12&-5\end{bmatrix} orthogonal? If so, is it a rotation or a reflection, and across which line?

Solution.

  1. Test the columns. Column 1 is 113(5,12)\frac1{13}(5, 12) with squared length 25+144169=1\frac{25 + 144}{169} = 1. Column 2 is 113(12,−5)\frac1{13}(12, -5) with squared length 144+25169=1\frac{144 + 25}{169} = 1. Their dot product is 60−60169=0\frac{60 - 60}{169} = 0. Orthonormal columns are the definition. Unit length and perpendicular are two separate checks, and both are needed.
  2. Find the determinant. det⁡Q=−25−144169=−1\det Q = \frac{-25 - 144}{169} = -1. +1+1 means a rotation, −1-1 means a reflection (the plane theorem).
  3. Match the reflection form. cos⁡θ=513\cos\theta = \frac5{13} and sin⁡θ=1213\sin\theta = \frac{12}{13}, so θ≈67.4°\theta \approx 67.4°. Compare with [cos⁡θsin⁡θsin⁡θ−cos⁡θ]\begin{bmatrix}\cos\theta & \sin\theta\\ \sin\theta & -\cos\theta\end{bmatrix}.
  4. Find the mirror. It is the line at angle θ2≈33.7°\frac\theta2 \approx 33.7°, which has slope tan⁡θ2=sin⁡θ1+cos⁡θ=12/1318/13=23\tan\frac\theta2 = \frac{\sin\theta}{1 + \cos\theta} = \frac{12/13}{18/13} = \frac23, so direction (3,2)(3, 2). Check: Q(3,2)=113(15+24, 36−10)=(3,2)Q(3, 2) = \frac1{13}(15 + 24,\ 36 - 10) = (3, 2), so the mirror line is fixed.

Answer. Orthogonal, determinant −1-1: a reflection across the line through (3,2)(3, 2).

Worked example
Show RαRβ=Rα+βR_\alpha R_\beta = R_{\alpha + \beta}, and explain what that says about trigonometry.

Solution.

  1. Multiply. RαRβ=[cos⁡αcos⁡β−sin⁡αsin⁡β−(cos⁡αsin⁡β+sin⁡αcos⁡β)sin⁡αcos⁡β+cos⁡αsin⁡βcos⁡αcos⁡β−sin⁡αsin⁡β]R_\alpha R_\beta = \begin{bmatrix}\cos\alpha\cos\beta - \sin\alpha\sin\beta & -(\cos\alpha\sin\beta + \sin\alpha\cos\beta)\\ \sin\alpha\cos\beta + \cos\alpha\sin\beta & \cos\alpha\cos\beta - \sin\alpha\sin\beta\end{bmatrix}. Row-times-column multiplication (2.5).
  2. Compare with Rα+βR_{\alpha+\beta}. Turning by β\beta then by α\alpha is turning by α+β\alpha + \beta, so the product must equal [cos⁡(α+β)−sin⁡(α+β)sin⁡(α+β)cos⁡(α+β)]\begin{bmatrix}\cos(\alpha+\beta) & -\sin(\alpha+\beta)\\ \sin(\alpha+\beta) & \cos(\alpha+\beta)\end{bmatrix}. Composition of maps is multiplication of their matrices (2.5).
  3. Read off the entries. cos⁡(α+β)=cos⁡αcos⁡β−sin⁡αsin⁡β\cos(\alpha+\beta) = \cos\alpha\cos\beta - \sin\alpha\sin\beta and sin⁡(α+β)=sin⁡αcos⁡β+cos⁡αsin⁡β\sin(\alpha+\beta) = \sin\alpha\cos\beta + \cos\alpha\sin\beta. Equal matrices have equal entries.

Answer. The addition formulas you memorised in school are the statement “two rotations make a rotation”, read entry by entry. Rotations of the plane also commute: RαRβ=RβRαR_\alpha R_\beta = R_\beta R_\alpha.

Your answerRotate the vector (3,4)(3, 4) by 90°90° counterclockwise. What is the first coordinate of the result?
Worked example
Find the inverse of RθR_\theta, and compute R30°−1R_{30°}^{-1}.

Solution.

  1. Use the transpose. RθR_\theta is orthogonal, so Rθ−1=RθT=[cos⁡θsin⁡θ−sin⁡θcos⁡θ]R_\theta^{-1} = R_\theta^{\mathsf T} = \begin{bmatrix}\cos\theta & \sin\theta\\ -\sin\theta & \cos\theta\end{bmatrix}. For an orthogonal matrix the inverse is the transpose, with no elimination.
  2. Recognize it. Since cos⁡(−θ)=cos⁡θ\cos(-\theta) = \cos\theta and sin⁡(−θ)=−sin⁡θ\sin(-\theta) = -\sin\theta, this is R−θR_{-\theta}. Turning back by θ\theta undoes turning forward by θ\theta.
  3. Put in 30°30°. cos⁡30°=32\cos 30° = \frac{\sqrt3}2 and sin⁡30°=12\sin 30° = \frac12, so R30°−1=[3212−1232]R_{30°}^{-1} = \begin{bmatrix}\frac{\sqrt3}2 & \frac12\\ -\frac12 & \frac{\sqrt3}2\end{bmatrix}. Substitute in the formula of step 1.

Answer. Rθ−1=R−θ=RθTR_\theta^{-1} = R_{-\theta} = R_\theta^{\mathsf T}.

Worked example
Write the matrix of the reflection across the line through the origin at angle φ\varphi. Then find the reflection across y=xy = x.

Solution.

  1. Set up. Let u=(cos⁡φ,sin⁡φ)u = (\cos\varphi, \sin\varphi) be the unit vector along the mirror. A vector xx splits as the part along the mirror, (u⋅x)u(u \cdot x)u, plus the part across it, x−(u⋅x)ux - (u \cdot x)u. The first part is the projection onto the line (2.9).
  2. Flip the cross part. The reflection keeps the first part and negates the second: Fx=(u⋅x)u−(x−(u⋅x)u)=2(u⋅x)u−xFx = (u \cdot x)u - \big(x - (u \cdot x)u\big) = 2(u \cdot x)u - x. A mirror leaves points on it fixed and sends the perpendicular offset to its negative.
  3. Read off the matrix. Since (u⋅x)u=uuTx(u \cdot x)u = uu^{\mathsf T}x, we get F=2uuT−I=[2cos⁡2φ−12sin⁡φcos⁡φ2sin⁡φcos⁡φ2sin⁡2φ−1]=[cos⁡2φsin⁡2φsin⁡2φ−cos⁡2φ]F = 2uu^{\mathsf T} - I = \begin{bmatrix}2\cos^2\varphi - 1 & 2\sin\varphi\cos\varphi\\ 2\sin\varphi\cos\varphi & 2\sin^2\varphi - 1\end{bmatrix} = \begin{bmatrix}\cos 2\varphi & \sin 2\varphi\\ \sin 2\varphi & -\cos 2\varphi\end{bmatrix}. Double-angle formulas. This is the reflection form of the plane theorem with θ=2φ\theta = 2\varphi.
  4. Take y=xy = x. Here φ=45°\varphi = 45°, so 2φ=90°2\varphi = 90° and F=[0110]F = \begin{bmatrix}0&1\\1&0\end{bmatrix}. cos⁡90°=0\cos 90° = 0, sin⁡90°=1\sin 90° = 1. Check: it swaps xx and yy, which is what reflecting across y=xy = x does.

Answer. F=[cos⁡2φsin⁡2φsin⁡2φ−cos⁡2φ]F = \begin{bmatrix}\cos 2\varphi & \sin 2\varphi\\ \sin 2\varphi & -\cos 2\varphi\end{bmatrix}; for y=xy = x it is [0110]\begin{bmatrix}0&1\\1&0\end{bmatrix} with determinant −1-1.

Your answerReflect the point (2,5)(2, 5) across the line y=xy = x. What is the first coordinate of the result?
Quick checkIs [0.60.80.8−0.6]\begin{bmatrix}0.6 & 0.8\\ 0.8 & -0.6\end{bmatrix} a rotation or a reflection?

Space: every rotation has an axis

Theorem B Euler 1775; standard

Euler's rotation theorem

If QQ is a 3×33 \times 3 orthogonal matrix with det⁡Q=1\det Q = 1, then Qv=vQv = v for some v≠Ov \ne O. So QQ is a rotation about the axis through vv.

In one lineEvery 3×3 rotation (orthogonal, det 1) fixes a line through the origin: it is a turn about an axis.

Why it is truedet(Q − I) = 0 for a 3×3 rotation, so 1 is an eigenvalue; its eigenvector is the axis.

Proofstandard
The idea: Show det(Q − I) = 0 using QᵀQ = I, det Q = 1 and the fact that for 3×3 matrices det(−A) = −det A.
Q−I=Q−QQT=Q(I−QT)Q - I = Q - QQ^{\mathsf T} = Q(I - Q^{\mathsf T}).
Write I=QQTI = QQ^{\mathsf T} (rows of an orthogonal matrix are orthonormal too), then factor QQ out on the left.
det⁡(Q−I)=det⁡Q⋅det⁡(I−QT)=det⁡(I−Q)\det(Q - I) = \det Q \cdot \det(I - Q^{\mathsf T}) = \det(I - Q).
Product rule, det⁡Q=1\det Q = 1, and det⁡(I−QT)=det⁡((I−Q)T)=det⁡(I−Q)\det(I - Q^{\mathsf T}) = \det\big((I - Q)^{\mathsf T}\big) = \det(I - Q).
det⁡(I−Q)=det⁡(−(Q−I))=−det⁡(Q−I)\det(I - Q) = \det\big(-(Q - I)\big) = -\det(Q - I).
For a 3×33 \times 3 matrix, multiplying every row by −1-1 multiplies the determinant by (−1)3=−1(-1)^3 = -1.
So det⁡(Q−I)=−det⁡(Q−I)\det(Q - I) = -\det(Q - I), hence det⁡(Q−I)=0\det(Q - I) = 0.
A number equal to its own negative is 0.
There is v≠Ov \ne O with (Q−I)v=O(Q - I)v = O, that is, Qv=vQv = v. ■\blacksquare
Q−IQ - I is not invertible, so it has a non-zero null vector (2.6).
Proof workshopRebuild the proof of Euler's rotation theorem

Tap the lines in the order a proof would write them. Each line can only use what is already above it.

    Beyond the course: for understanding· Why only odd dimensions

    The proof used (−1)3=−1(-1)^3 = -1. In even dimensions it fails: R90°R_{90°} in the plane fixes no direction. In R4\mathbb R^4 a rotation can turn two perpendicular planes at once and fix nothing.

    Worked example Spagnolie Lecture 8
    Find the axis and angle of the rotation QQ that sends (x,y,z)(x, y, z) to (z,x,y)(z, x, y).

    Solution. Step through it below. The stages are: confirm it is a rotation, find the axis, find the angle from the trace, solve.

    Answer. A rotation by 120°120° about the line through (1,1,1)(1, 1, 1).

    Your answerA 3×33 \times 3 rotation matrix has trace 2. By what angle in degrees (between 0 and 180) does it turn?
    Worked example classic
    Let P=[010100001]P = \begin{bmatrix}0&1&0\\1&0&0\\0&0&1\end{bmatrix} (swap xx and yy). It has det⁡P=−1\det P = -1. Write it as a rotation followed by x↦−xx \mapsto -x, and find an eigenvalue −1-1 eigenvector.

    Solution.

    1. Check orthogonal. The columns are the standard basis vectors in a different order, so PTP=IP^{\mathsf T}P = I. Orthonormal columns.
    2. Negate it. −P-P is orthogonal too, and det⁡(−P)=(−1)3det⁡P=(−1)(−1)=1\det(-P) = (-1)^3\det P = (-1)(-1) = 1. Negating all three columns multiplies the determinant by (−1)3(-1)^3. Now −P-P is a rotation.
    3. Apply Euler. There is v≠Ov \ne O with (−P)v=v(-P)v = v. Solving, Pv=−vPv = -v gives v=(1,−1,0)v = (1, -1, 0): P(1,−1,0)=(−1,1,0)=−vP(1, -1, 0) = (-1, 1, 0) = -v. Euler’s theorem gives an axis for the rotation −P-P, and that axis is a −1-1-eigenvector of PP.
    4. Find the angle. tr⁡(−P)=−1=1+2cos⁡θ\operatorname{tr}(-P) = -1 = 1 + 2\cos\theta, so θ=180°\theta = 180°. Trace formula for rotations.

    Answer. P=−RP = -R where R=−PR = -P is a half-turn about (1,−1,0)(1, -1, 0), and −1-1 is an eigenvalue of PP with eigenvector (1,−1,0)(1, -1, 0). ■\blacksquare

    Complex version and eigenvalues

    Definition A

    Unitary matrix

    A complex n×nn \times n matrix UU is unitary if U∗U=IU^*U = I, where U∗=U‾TU^* = \overline{U}^{\mathsf T}. Real unitary matrices are exactly the orthogonal ones.

    In one lineA complex square matrix with U∗U=IU^*U = I (conjugate transpose); the complex version of orthogonal.

    Why it existsIt preserves complex lengths, and it is how quantum states evolve.

    Theorem A Apostol 5.10

    Eigenvalues of an orthogonal matrix

    If QQ is unitary (in particular real orthogonal) and Qv=λvQv = \lambda v with v≠Ov \ne O, then ∣λ∣=1|\lambda| = 1.

    In one lineEvery eigenvalue of an orthogonal (or unitary) matrix has absolute value 1.

    Why it is trueQ preserves length, so Qv = λv forces |λ| = 1.

    ProofApostol 5.10
    The idea: Length is preserved: ‖v‖ = ‖Qv‖ = ‖λv‖ = |λ|‖v‖.
    ∥v∥=∥Qv∥\lVert v \rVert = \lVert Qv \rVert.
    Unitary matrices preserve length: with the complex inner product of 3.1, ∥Uv∥2=(Uv,Uv)=(v,U∗Uv)=(v,v)\lVert Uv \rVert^2 = (Uv, Uv) = (v, U^*Uv) = (v, v) by the adjoint property and U∗U=IU^*U = I.
    ∥Qv∥=∥λv∥=∣λ∣ ∥v∥\lVert Qv \rVert = \lVert \lambda v \rVert = |\lambda|\,\lVert v \rVert.
    Qv=λvQv = \lambda v, and a scalar comes out of a length with its absolute value: ∥λv∥2=λλˉ (v,v)=∣λ∣2∥v∥2\lVert \lambda v \rVert^2 = \lambda\bar\lambda\,(v, v) = |\lambda|^2 \lVert v \rVert^2.
    ∣λ∣=1|\lambda| = 1. ■\blacksquare For RθR_\theta the eigenvalues are e±iθe^{\pm i\theta}, on the unit circle (0.6).
    Combining the two lines gives ∥v∥=∣λ∣ ∥v∥\lVert v \rVert = |\lambda|\,\lVert v \rVert, and ∥v∥≠0\lVert v \rVert \ne 0, so divide.
    Worked example
    Find the eigenvalues of RθR_\theta and check they have absolute value 1. For which θ\theta is an eigenvalue real?

    Solution.

    1. Characteristic polynomial. det⁡(Rθ−λI)=(cos⁡θ−λ)2+sin⁡2θ=λ2−2cos⁡θ λ+1\det(R_\theta - \lambda I) = (\cos\theta - \lambda)^2 + \sin^2\theta = \lambda^2 - 2\cos\theta\,\lambda + 1. Determinant of [cos⁡θ−λ−sin⁡θsin⁡θcos⁡θ−λ]\begin{bmatrix}\cos\theta - \lambda & -\sin\theta\\ \sin\theta & \cos\theta - \lambda\end{bmatrix}, using cos⁡2θ+sin⁡2θ=1\cos^2\theta + \sin^2\theta = 1.
    2. Solve. λ=cos⁡θ±cos⁡2θ−1=cos⁡θ±isin⁡θ=e±iθ\lambda = \cos\theta \pm \sqrt{\cos^2\theta - 1} = \cos\theta \pm i\sin\theta = e^{\pm i\theta}. Quadratic formula, and cos⁡2θ−1=−sin⁡2θ\cos^2\theta - 1 = -\sin^2\theta. Euler’s formula from 0.6.
    3. Absolute value. ∣cos⁡θ±isin⁡θ∣=cos⁡2θ+sin⁡2θ=1|\cos\theta \pm i\sin\theta| = \sqrt{\cos^2\theta + \sin^2\theta} = 1. Matches the theorem.
    4. Real cases. The eigenvalues are real only when sin⁡θ=0\sin\theta = 0: θ=0\theta = 0 gives 1,11, 1 and θ=π\theta = \pi gives −1,−1-1, -1. Otherwise no direction of the plane stays on its own line, as the picture at the top shows for 90°90°.

    Answer. λ=e±iθ\lambda = e^{\pm i\theta}, on the unit circle.

    Quick checkA 3×33 \times 3 matrix is orthogonal with determinant −1-1. Which is guaranteed?
    Quick checkWhich of these could be an eigenvalue of a real orthogonal matrix?
    Your answerWhat is the determinant of the reflection [cos⁡θsin⁡θsin⁡θ−cos⁡θ]\begin{bmatrix}\cos\theta & \sin\theta\\ \sin\theta & -\cos\theta\end{bmatrix}?
    Proof workshopRebuild: an orthogonal matrix preserves lengthsAxler 7.42

    Tap the lines in the order a proof would write them. Each line can only use what is already above it.

      Where it is used

      Used inside maths· Inside maths: the SVD and QR

      Chapter 3.4 writes every matrix as UΣVTU\Sigma V^{\mathsf T}: rotate, stretch along axes, rotate, with U,VU, V orthogonal. The QR factorisation A=QRA = QR (2.10) is Gram–Schmidt in matrix form, with QQ orthogonal.

      Used in the real world· Numerical computing: why orthogonal matrices are numerically safe

      Multiplying by an orthogonal matrix cannot magnify errors, because it preserves lengths: an error vector of size 10−1610^{-16} stays size 10−1610^{-16}. That is why reliable algorithms (QR for least squares, the eigenvalue algorithms inside NumPy and MATLAB) are built from sequences of rotations and reflections (Givens rotations and Householder reflections) rather than general row operations.

      Used in the real world· Graphics and robotics: orientation

      A robot arm’s pose is a chain of joint rotations, each a rotation matrix about the joint’s axis; multiplying them gives the hand’s orientation (forward kinematics). Game engines store orientations as quaternions and convert to rotation matrices for drawing; interpolating between two orientations smoothly (“slerp”) follows the shortest arc on the space of rotations. Because rounding slowly destroys orthogonality, a program that multiplies many rotations re-orthonormalises (for example with a Gram–Schmidt step) from time to time.

      Traps

      Watch out· Orthogonal columns are not enough

      The columns must also have length 1. Check QTQ=IQ^{\mathsf T}Q = I, not only that the columns are perpendicular.

      Watch out· 3D rotations do not commute

      RαRβ=RβRαR_\alpha R_\beta = R_\beta R_\alpha in the plane, but in space two quarter-turns about different axes give different results in different orders (Spagnolie’s Lecture 8, chapter 2.4).

      Problems

      check

      Is 15[3−443]\frac15\begin{bmatrix}3&-4\\4&3\end{bmatrix} orthogonal? A rotation or a reflection? By what angle?

      Solution

      Columns (35,45)(\frac35, \frac45) and (−45,35)(-\frac45, \frac35) are unit and perpendicular, so yes. Determinant 9+1625=1\frac{9 + 16}{25} = 1: a rotation, by θ\theta with cos⁡θ=35\cos\theta = \frac35, sin⁡θ=45\sin\theta = \frac45, about 53.13°53.13°.

      check

      What is the inverse of RθR_\theta? Check with RθTR_\theta^{\mathsf T}.

      Solution

      R−θR_{-\theta}, turning back. RθT=[cos⁡θsin⁡θ−sin⁡θcos⁡θ]=R−θR_\theta^{\mathsf T} = \begin{bmatrix}\cos\theta & \sin\theta\\ -\sin\theta & \cos\theta\end{bmatrix} = R_{-\theta}, using cos⁡(−θ)=cos⁡θ\cos(-\theta) = \cos\theta, sin⁡(−θ)=−sin⁡θ\sin(-\theta) = -\sin\theta.

      use

      Find the axis and angle of the rotation Q=[10000−1010]Q = \begin{bmatrix}1&0&0\\0&0&-1\\0&1&0\end{bmatrix} (Spagnolie’s TT from Lecture 8).

      Solution

      Q(1,0,0)=(1,0,0)Q(1,0,0) = (1,0,0), so the axis is the xx-axis. tr⁡Q=1=1+2cos⁡θ\operatorname{tr} Q = 1 = 1 + 2\cos\theta gives cos⁡θ=0\cos\theta = 0, θ=90°\theta = 90°.

      use

      Write the matrix of reflection across the line y=3 xy = \sqrt3\,x and check it fits the theorem on 2×22 \times 2 orthogonal matrices.

      Solution

      The line is at angle φ=60°\varphi = 60°, so θ=2φ=120°\theta = 2\varphi = 120° and the matrix is [cos⁡120°sin⁡120°sin⁡120°−cos⁡120°]=[−12323212]\begin{bmatrix}\cos 120° & \sin 120°\\ \sin 120° & -\cos 120°\end{bmatrix} = \begin{bmatrix}-\frac12 & \frac{\sqrt3}2\\ \frac{\sqrt3}2 & \frac12\end{bmatrix}. Determinant −14−34=−1-\frac14 - \frac34 = -1. Check: it fixes (1,3)(1, \sqrt3), since −12+32=1-\frac12 + \frac32 = 1 and 32+32=3\frac{\sqrt3}2 + \frac{\sqrt3}2 = \sqrt3.

      prove

      Prove that the product of two orthogonal matrices is orthogonal, and the inverse of an orthogonal matrix is orthogonal.

      Solution

      (PQ)T(PQ)=QTPTPQ=QTQ=I(PQ)^{\mathsf T}(PQ) = Q^{\mathsf T}P^{\mathsf T}PQ = Q^{\mathsf T}Q = I. For the inverse: Q−1=QTQ^{-1} = Q^{\mathsf T} and (QT)TQT=QQT=I(Q^{\mathsf T})^{\mathsf T}Q^{\mathsf T} = QQ^{\mathsf T} = I. (So the orthogonal matrices are closed under products and inverses, and contain II: they form a group.)

      prove

      Prove that an orthogonal matrix maps an orthonormal basis to an orthonormal basis.

      Solution

      If (ui)(u_i) is orthonormal, (Qui)⋅(Quj)=ui⋅uj(Qu_i)\cdot(Qu_j) = u_i \cdot u_j (dot products preserved), so the images are orthonormal; nn orthonormal vectors in Rn\mathbb R^n form a basis.

      stretchclassic

      Show that every 3×33 \times 3 orthogonal matrix with determinant −1-1 is a rotation followed by the reflection x↦−xx \mapsto -x. Conclude that −1-1 is always one of its eigenvalues.

      Solution

      −Q-Q is orthogonal with det⁡(−Q)=(−1)3det⁡Q=1\det(-Q) = (-1)^3\det Q = 1, so −Q=R-Q = R is a rotation and Q=−RQ = -R. By Euler’s theorem Rv=vRv = v for some v≠Ov \ne O, so Qv=−vQv = -v: −1-1 is an eigenvalue.

      Summary

      • Orthogonal QQ: orthonormal columns, QTQ=IQ^{\mathsf T}Q = I, Q−1=QTQ^{-1} = Q^{\mathsf T}.
      • Equivalent: preserves dot products, preserves lengths (an isometry).
      • det⁡Q=±1\det Q = \pm 1: +1+1 rotations, −1-1 orientation-reversing.
      • In the plane: rotations RθR_\theta and reflections, nothing else. RαRβ=Rα+βR_\alpha R_\beta = R_{\alpha+\beta} is the addition formula.
      • In space: every rotation has an axis (Euler), and its angle comes from tr⁡Q=1+2cos⁡θ\operatorname{tr} Q = 1 + 2\cos\theta.
      • Eigenvalues have ∣λ∣=1|\lambda| = 1. Unitary is the complex version.
      • Orthogonal matrices never magnify errors, which is why numerical algorithms are built from them.

      Watch and read

      The same ideas explained by someone else. Use these when an explanation here does not land.

      Where this sits

      Comes from
      3.1 Symmetric matrices and the spectral theorem
      2.9 Inner products, orthogonality, Gram–Schmidt, projection
      Leads to
      3.4 The singular value decomposition and PCA
      Same idea elsewhere
      MATH 375: Spagnolie's Lecture 8 composed two 90° rotations about different axes and got different answers in the two orders. Those were orthogonal matrices; this chapter explains what all such matrices look like.
      JEE / CBSE: Rotating axes in coordinate geometry used $x' = x\cos\theta + y\sin\theta$. That substitution is multiplication by a rotation matrix.
      Graphics and robotics: Every camera orientation, robot-arm joint and game-character pose is stored as a rotation matrix or a quaternion.