## A rotation followed by a rotation is a rotation

In preparation for answering exercise 2.6.3 in Gilbert Strang’s Linear Algebra and Its Applications, Third Edition, I wanted to derive in detail the effect of a reflection followed by a reflection, a reflection followed by a rotation, and a rotation followed by a reflection. For completeness this post recapitulates in a little more detail the argument in section 2.6 that a rotation followed by a rotation is a rotation.

Assume that we have a matrix that rotates vectors through the angle $\theta$ and a second matrix that rotates vectors through the angle $\varphi$. Intuitively we’d conclude that the effect of applying both matrices in succession is to rotate vectors through the angle $\theta+\varphi$. Let’s prove this conjecture.

The first rotation is represented by the matrix $Q_\theta = \begin{bmatrix} \cos \theta&-\sin \theta \\ \sin \theta&\cos \theta \end{bmatrix}$

and the second rotation is represented by the matrix $Q_\varphi = \begin{bmatrix} \cos \varphi&-\sin \varphi \\ \sin \varphi&\cos \varphi \end{bmatrix}$

The effect of the two rotations is thus represented by the product of the matrices: $\begin{bmatrix} \cos \varphi&-\sin \varphi \\ \sin \varphi&\cos \varphi \end{bmatrix} \begin{bmatrix} \cos \theta&-\sin \theta \\ \sin \theta&\cos \theta \end{bmatrix}$ $= \begin{bmatrix} \cos \varphi \cos \theta - \sin \varphi \sin \theta&-\cos \varphi \sin \theta - \sin \varphi \cos \theta \\ \sin \varphi \cos \theta + \cos \varphi \sin \theta&-\sin \varphi \sin \theta + \cos \varphi \cos \theta \end{bmatrix}$ $= \begin{bmatrix} \cos \varphi \cos \theta - \sin \varphi \sin \theta&-(\sin \varphi \cos \theta + \cos \varphi \sin \theta) \\ \sin \varphi \cos \theta + \cos \varphi \sin \theta&\cos \varphi \cos \theta - \sin \varphi \sin \theta \end{bmatrix}$

Given the trigonometric identities $\begin{array}{rcl} \cos (\varphi + \theta)&=&\cos \varphi \cos \theta - \sin \varphi \sin \theta \\ \sin (\varphi + \theta)&=&\sin \varphi \cos \theta + \cos \varphi \sin \theta \end{array}$

we have $\begin{bmatrix} \cos \varphi \cos \theta - \sin \varphi \sin \theta&-(\sin \varphi \cos \theta + \cos \varphi \sin \theta) \\ \sin \varphi \cos \theta + \cos \varphi \sin \theta&\cos \varphi \cos \theta - \sin \varphi \sin \theta \end{bmatrix}$ $= \begin{bmatrix} \cos (\varphi + \theta)&-\sin (\varphi + \theta) \\ \sin (\varphi + \theta)&\cos (\varphi + \theta) \end{bmatrix}$

But this matrix represents $Q_{\varphi+\theta}$, the rotation of all vectors in the x-y plane through the angle $\varphi+\theta$. We therefore have $Q_\varphi Q_\theta = Q_{\varphi+\theta}$.

Note that if we first rotate through the angle $\varphi$ and then through the angle $\theta$ this is equivalent to rotating through the angle $\theta$ and then through the angle $\varphi$. We therefore have $Q_\theta Q_\varphi = Q_\varphi Q_\theta$.

NOTE: This continues a series of posts containing worked out exercises from the (out of print) book Linear Algebra and Its Applications, Third Edition by Gilbert Strang.

If you find these posts useful I encourage you to also check out the more current Linear Algebra and Its Applications, Fourth Edition , Dr Strang’s introductory textbook Introduction to Linear Algebra, Fourth Edition and the accompanying free online course, and Dr Strang’s other books .

This entry was posted in linear algebra. Bookmark the permalink.