Why Orthogonal Matrices Are Rigid
Most matrices distort the plane or space they act on: they stretch some directions, squash others, and tilt angles. Orthogonal matrices are the matrices that do none of this. A rotation turns a figure without changing any length or any angle, and a reflection flips it without changing them either. This tutorial proves that the single algebraic condition \(\mathbf{Q}^{\top}\mathbf{Q}=\mathbf{I}\) is enough to force this rigidity: an orthogonal matrix preserves dot products, and therefore also norms, distances and angles.
Throughout, vectors are columns in \(\mathbb{R}^n\), \(\mathbf{x}\cdot\mathbf{y}=\mathbf{x}^{\top}\mathbf{y}\) is the dot product, and \(\|\mathbf{x}\|=\sqrt{\mathbf{x}\cdot\mathbf{x}}\) is the Euclidean norm. A square matrix \(\mathbf{Q}\in\mathbb{R}^{n\times n}\) is orthogonal when \(\mathbf{Q}^{\top}\mathbf{Q}=\mathbf{I}\). We use only this defining equation here; the equivalent descriptions (orthonormal columns, \(\mathbf{Q}^{-1}=\mathbf{Q}^{\top}\)) were established in the previous tutorial.
Dot Products Are Preserved
Proof. Write the dot product as a matrix product and use the rule \((\mathbf{A}\mathbf{B})^{\top}=\mathbf{B}^{\top}\mathbf{A}^{\top}\):
Each equality is justified in turn: the first rewrites the dot product, the second distributes the transpose over the product, the third substitutes \(\mathbf{Q}^{\top}\mathbf{Q}=\mathbf{I}\), and the last two simplify. \(\square\)
The proof is short, but notice what it uses. It never asks for a formula for the entries of \(\mathbf{Q}\), and it never splits into two or three dimensions. The identity \(\mathbf{Q}^{\top}\mathbf{Q}=\mathbf{I}\) sits in the middle of the product \(\mathbf{x}^{\top}\mathbf{Q}^{\top}\mathbf{Q}\mathbf{y}\) and collapses it, in any dimension.
Norms, Distances and Angles Follow
Proof. (a) Take \(\mathbf{y}=\mathbf{x}\) in the theorem: \(\|\mathbf{Q}\mathbf{x}\|^2=(\mathbf{Q}\mathbf{x})\cdot(\mathbf{Q}\mathbf{x})=\mathbf{x}\cdot\mathbf{x}=\|\mathbf{x}\|^2\). Norms are nonnegative, so taking square roots gives (a).
(b) By linearity, \(\mathbf{Q}\mathbf{x}-\mathbf{Q}\mathbf{y}=\mathbf{Q}(\mathbf{x}-\mathbf{y})\). Applying (a) to the vector \(\mathbf{x}-\mathbf{y}\) gives \(\|\mathbf{Q}(\mathbf{x}-\mathbf{y})\|=\|\mathbf{x}-\mathbf{y}\|\).
(c) The angle \(\theta\) between nonzero vectors is defined by \(\cos\theta=\dfrac{\mathbf{x}\cdot\mathbf{y}}{\|\mathbf{x}\|\,\|\mathbf{y}\|}\). The numerator is unchanged by the theorem, and each factor in the denominator is unchanged by (a). So the cosine, and hence the angle in \([0,\pi]\), is unchanged. Note also that \(\mathbf{Q}\mathbf{x}\) and \(\mathbf{Q}\mathbf{y}\) are nonzero, because their norms equal those of \(\mathbf{x}\) and \(\mathbf{y}\). \(\square\)
In particular, orthogonal vectors stay orthogonal: if \(\mathbf{x}\cdot\mathbf{y}=0\) then \((\mathbf{Q}\mathbf{x})\cdot(\mathbf{Q}\mathbf{y})=0\). Unit vectors stay unit vectors, so an orthonormal list is carried to an orthonormal list.
A Two-Dimensional Example
Worked Example: A Rotation of the Plane
Let \(\mathbf{Q}=\tfrac15\begin{bmatrix}3&-4\\4&3\end{bmatrix}\), \(\mathbf{x}=(2,1)\) and \(\mathbf{y}=(-1,3)\). Verify that \(\mathbf{Q}\) is orthogonal and that it preserves the dot product, the norm of \(\mathbf{x}\), and the distance between \(\mathbf{x}\) and \(\mathbf{y}\).
First, \(\mathbf{Q}^{\top}\mathbf{Q}=\tfrac1{25}\begin{bmatrix}3&4\\-4&3\end{bmatrix}\begin{bmatrix}3&-4\\4&3\end{bmatrix}=\tfrac1{25}\begin{bmatrix}25&0\\0&25\end{bmatrix}=\mathbf{I}\), so \(\mathbf{Q}\) is orthogonal. (It is the rotation through the angle whose cosine is \(3/5\) and sine is \(4/5\).)
Now compute the images: \(\mathbf{Q}\mathbf{x}=\tfrac15(6-4,\;8+3)=(\tfrac25,\tfrac{11}5)\) and \(\mathbf{Q}\mathbf{y}=\tfrac15(-3-12,\;-4+9)=(-3,1)\).
Dot product. Before: \(\mathbf{x}\cdot\mathbf{y}=2(-1)+1\cdot3=1\). After: \((\mathbf{Q}\mathbf{x})\cdot(\mathbf{Q}\mathbf{y})=\tfrac25(-3)+\tfrac{11}5(1)=-\tfrac65+\tfrac{11}5=1\).
Norm. Before: \(\|\mathbf{x}\|^2=4+1=5\). After: \(\|\mathbf{Q}\mathbf{x}\|^2=\tfrac4{25}+\tfrac{121}{25}=\tfrac{125}{25}=5\).
Distance. Before: \(\mathbf{x}-\mathbf{y}=(3,-2)\), so \(\|\mathbf{x}-\mathbf{y}\|^2=9+4=13\). After: \(\mathbf{Q}\mathbf{x}-\mathbf{Q}\mathbf{y}=(\tfrac25+3,\;\tfrac{11}5-1)=(\tfrac{17}5,\tfrac65)\), and \(\tfrac{289}{25}+\tfrac{36}{25}=\tfrac{325}{25}=13\).
Check: all three quantities agree before and after, exactly as the theorem and corollary predict. Neither vector was special; any other choice of \(\mathbf{x},\mathbf{y}\) would give the same agreement.
A Three-Dimensional Example
Worked Example: A Reflection-Type Matrix in R³
Let \(\mathbf{R}=\tfrac13\begin{bmatrix}1&2&2\\2&1&-2\\2&-2&1\end{bmatrix}\), \(\mathbf{u}=(1,-2,2)\) and \(\mathbf{v}=(3,0,-1)\). Show that \(\mathbf{R}\) is orthogonal, then compare the dot product, the norms and the distance before and after.
The columns of \(9\mathbf{R}^{\top}\mathbf{R}\) are dot products of columns of \(3\mathbf{R}\). The columns are \((1,2,2)\), \((2,1,-2)\), \((2,-2,1)\). Each has squared length \(1+4+4=9\), and the pairwise dot products are \(2+2-4=0\), \(2-4+2=0\) and \(4-2-2=0\). Therefore \(9\mathbf{R}^{\top}\mathbf{R}=9\mathbf{I}\), that is, \(\mathbf{R}^{\top}\mathbf{R}=\mathbf{I}\).
The images are \(\mathbf{R}\mathbf{u}=\tfrac13(1-4+4,\;2-2-4,\;2+4+2)=(\tfrac13,-\tfrac43,\tfrac83)\) and \(\mathbf{R}\mathbf{v}=\tfrac13(3+0-2,\;6+0+2,\;6+0-1)=(\tfrac13,\tfrac83,\tfrac53)\).
Dot product. \(\mathbf{u}\cdot\mathbf{v}=3+0-2=1\), and \((\mathbf{R}\mathbf{u})\cdot(\mathbf{R}\mathbf{v})=\tfrac19-\tfrac{32}9+\tfrac{40}9=\tfrac99=1\).
Norms. \(\|\mathbf{u}\|^2=1+4+4=9\) and \(\|\mathbf{R}\mathbf{u}\|^2=\tfrac{1+16+64}9=9\). Likewise \(\|\mathbf{v}\|^2=9+0+1=10\) and \(\|\mathbf{R}\mathbf{v}\|^2=\tfrac{1+64+25}9=10\).
Distance. \(\mathbf{u}-\mathbf{v}=(-2,-2,3)\), with squared length \(4+4+9=17\). Also \(\mathbf{R}\mathbf{u}-\mathbf{R}\mathbf{v}=(0,-4,1)\), with squared length \(0+16+1=17\).
Angle. Both pairs have cosine \(\dfrac{1}{3\sqrt{10}}\), since the dot product is \(1\) and the norms are \(3\) and \(\sqrt{10}\) in both cases. The angle is about \(1.465\) radians before and after.
Check: every quantity matches. Also \(\det\mathbf{R}=-1\), so this \(\mathbf{R}\) reverses orientation, yet it preserves lengths and angles all the same. Preserving geometry does not require preserving orientation.
What Preservation Does Not Mean
The theorem says that pairs of vectors keep their dot product after both are transformed. It does not say that \(\mathbf{Q}\mathbf{x}=\mathbf{x}\), and it does not say that the individual coordinates of a vector are preserved. In the 2D example above, \(\mathbf{x}=(2,1)\) is sent to \((\tfrac25,\tfrac{11}5)\), a different vector with the same length.
A second misunderstanding concerns the hypothesis. The proof used \(\mathbf{Q}^{\top}\mathbf{Q}=\mathbf{I}\) in an essential way. Consider the shear \(\mathbf{S}=\begin{bmatrix}1&1\\0&1\end{bmatrix}\). The vector \(\mathbf{e}_2=(0,1)\) has norm \(1\), but \(\mathbf{S}\mathbf{e}_2=(1,1)\) has norm \(\sqrt2\). The orthogonal vectors \(\mathbf{e}_1,\mathbf{e}_2\) are sent to \((1,0)\) and \((1,1)\), whose dot product is \(1\ne0\). So a matrix that is not orthogonal can fail all three properties at once.
The Converse: Norm Preservation Implies Dot Product Preservation
One might suspect that preserving lengths is weaker than preserving dot products. It is not, because the dot product can be recovered from norms. For any real vectors \(\mathbf{x},\mathbf{y}\), expand \(\|\mathbf{x}+\mathbf{y}\|^2=\|\mathbf{x}\|^2+2\,\mathbf{x}\cdot\mathbf{y}+\|\mathbf{y}\|^2\). Solving for the dot product gives the polarization identity
Proof. By linearity, \(\mathbf{A}\mathbf{x}+\mathbf{A}\mathbf{y}=\mathbf{A}(\mathbf{x}+\mathbf{y})\). Apply the polarization identity to \(\mathbf{A}\mathbf{x}\) and \(\mathbf{A}\mathbf{y}\), then the norm hypothesis three times:
The proposition shows that the three properties are tied together: preserving norms for all vectors is equivalent to preserving dot products for all pairs. The next tutorial uses this to show that a linear map preserving distances is represented by an orthogonal matrix. (Orthogonality of the matrix itself follows because \(\mathbf{x}^{\top}\mathbf{A}^{\top}\mathbf{A}\mathbf{y}=\mathbf{x}^{\top}\mathbf{y}\) for all \(\mathbf{x},\mathbf{y}\) forces \(\mathbf{A}^{\top}\mathbf{A}=\mathbf{I}\), by testing against standard basis vectors.)
Common Pitfalls
Squared versus unsquared norms. The computation naturally produces \(\|\mathbf{Q}\mathbf{x}\|^2\). Remember the final square root, and remember that it is the nonnegative root, since norms cannot be negative.
Order in the transpose. The identity \((\mathbf{Q}\mathbf{x})^{\top}=\mathbf{x}^{\top}\mathbf{Q}^{\top}\) reverses the order. Writing \(\mathbf{Q}^{\top}\mathbf{x}^{\top}\) is not even defined for a column \(\mathbf{x}\), and writing \(\mathbf{x}^{\top}\mathbf{Q}\mathbf{Q}^{\top}\mathbf{y}\) would place the wrong pair next to each other, so the identity \(\mathbf{Q}^{\top}\mathbf{Q}=\mathbf{I}\) could not be applied directly.
Non-square matrices. A matrix with orthonormal columns that is not square, such as a \(3\times2\) matrix, satisfies \(\mathbf{Q}^{\top}\mathbf{Q}=\mathbf{I}_2\) and so the proof above still shows that it preserves dot products and norms. But it need not satisfy \(\mathbf{Q}\mathbf{Q}^{\top}=\mathbf{I}_3\), so it is not an orthogonal matrix in the strict sense.
| Quantity | Before | After | Why unchanged |
|---|---|---|---|
| Dot product | \(\mathbf{x}\cdot\mathbf{y}\) | \((\mathbf{Q}\mathbf{x})\cdot(\mathbf{Q}\mathbf{y})\) | \(\mathbf{x}^{\top}\mathbf{Q}^{\top}\mathbf{Q}\mathbf{y}=\mathbf{x}^{\top}\mathbf{y}\) |
| Norm | \(\|\mathbf{x}\|\) | \(\|\mathbf{Q}\mathbf{x}\|\) | Dot product with itself |
| Distance | \(\|\mathbf{x}-\mathbf{y}\|\) | \(\|\mathbf{Q}\mathbf{x}-\mathbf{Q}\mathbf{y}\|\) | Linearity, then norm of \(\mathbf{x}-\mathbf{y}\) |
| Angle | \(\theta\) | \(\theta\) | Cosine built from the quantities above |
| Orthogonality | \(\mathbf{x}\cdot\mathbf{y}=0\) | \((\mathbf{Q}\mathbf{x})\cdot(\mathbf{Q}\mathbf{y})=0\) | Special case of the dot product |
Where This Fits
The preservation theorem is the geometric meaning of orthogonality. It explains why rotations and reflections are the only matrices that move figures rigidly, why an orthonormal basis stays orthonormal under a change of coordinates, and why numerical algorithms favor orthogonal factors such as the \(\mathbf{Q}\) in a QR factorization: multiplying by \(\mathbf{Q}\) cannot magnify rounding errors, because it cannot change any length. The next tutorial turns the argument around and characterizes every linear map that preserves distances.
Check Your Understanding
Work these without looking back, then verify each answer by direct computation.
- Let \(\mathbf{Q}=\begin{bmatrix}0&-1\\1&0\end{bmatrix}\). Show that \(\mathbf{Q}\) is orthogonal and verify \((\mathbf{Q}\mathbf{x})\cdot(\mathbf{Q}\mathbf{y})=\mathbf{x}\cdot\mathbf{y}\) for \(\mathbf{x}=(1,2)\), \(\mathbf{y}=(3,-1)\).
- Prove that if \(\mathbf{Q}\) is orthogonal and \(\mathbf{x}\cdot\mathbf{y}=0\), then \((\mathbf{Q}\mathbf{x})\cdot(\mathbf{Q}\mathbf{y})=0\).
- If \(\mathbf{Q}\) is orthogonal and \(\|\mathbf{x}\|=7\), what is \(\|\mathbf{Q}\mathbf{x}\|\)? Explain which result you are using.
- Use the polarization identity to express \(\mathbf{x}\cdot\mathbf{y}\) when \(\|\mathbf{x}+\mathbf{y}\|=5\), \(\|\mathbf{x}\|=3\), \(\|\mathbf{y}\|=2\).
- Show that \(\mathbf{S}=\begin{bmatrix}2&0\\0&1\end{bmatrix}\) does not preserve norms by finding a vector whose length changes.