# Rotation matrix check

Let matrix $A=\frac{1}{\sqrt{2}} \begin{bmatrix} 1 & -1 \\ 1 & 1 \\ \end{bmatrix}$. Check if $A$ is a rotation matrix in $\mathbb{R^2}$ by angle $\theta=\frac{\pi}{4}$.

Entries of a matrix $A$ in trigonometric form are $A= \begin{bmatrix} \cos(-\theta) & {-\sin(-\theta)} \\ {\sin(-\theta)} & \cos(-\theta) \\ \end{bmatrix}$

This means that $A$ is a rotation matrix in $\mathbb{R^2}$ by angle $\alpha=\frac{-\pi}{4}$, but not by $\theta=\frac{\pi}{4}$.

Is this correct?

• With $-\theta$ this is a clockwise rotation, otherwise it is an anti-clockwise rotation, so it depends on how you are rotating. Your A matrix is not correct though. – Paul Dec 5 '15 at 11:40
• You should keep in mind that a 'positive rotation' like $\pi /4$ usually means a counterclockwise rotation, where you do not use minus signs for $\theta$. – shardulc says Reinstate Monica Jun 23 '16 at 7:54

## 2 Answers

The vector $(1,0)$ along the $x$ axis is rotated into $\frac1{\sqrt2}(1,1)$ in the first quadrant. Thus $A$ rotates counterclockwise, which is by convention associated with positive angles; it represents a rotation by $+\frac\pi4$.

In a wider sense, one might also say that $A$ rotates by an angle $\frac\pi4$ if strictly speaking it rotated by $-\frac\pi4$. The distinction between the two is only valid in $\mathbb R^2$; in $\mathbb R^3$ the rotation by $-\frac\pi4$ around an axis is the rotation by $\frac\pi4$ around the inverse axis. As we tend to think of rotations in three dimensions, this reduction to positive rotation angles is sometimes also applied in talking about $\mathbb R^2$.

• Important to point out that checking one particular vector is mapped right does not mean the operator does what we think it would do on all vectors. – mathreadler Jun 23 '16 at 8:49
• @mathreadler: Right. I was taking as given that $A$ is a rotation matrix; if so, it rotates all vectors by the same angle and it suffices to look at one. That $A$ is a rotation matrix follows from $\det A=1$ and $A^\top A=1$, which are readily checked. You're right that this is part of checking that $A$ is a rotation matrix; I wasn't providing a complete check but focussing on the OP's sign issue. – joriki Jun 23 '16 at 8:53

A systematic way to check that a linear operator is the one we expect it to be is to check how it maps a whole basis. We can take the standard basis ( column vectors: ) $$B = \left[\begin{array}{cc}1&0\\0&1\end{array}\right]$$ Then we calculate $AB$ and the columns of this product should be as we expect the corresponding columns in $B$ to be mapped. To check a whole basis is important because it can be that some particular linear subspace is mapped right, but another one is not.

An simple example would be $A = \left[\begin{array}{cc}1&0\\0&0\end{array}\right]$ which does rotate the vector $[1,0]^T$ by 0 degrees but shrinks the vector $[0,1]^T$ down to origo. Checking $A$ to do what we expect it to do for only one vector could fail in this case.