I need to find the matrix that rotates an arbitrary point around $\begin{bmatrix}5 \\6\end{bmatrix}$ by 35* anticlockwise.
I figure I need to first move the plane to centre it at the origin, perform the rotation and then move it back?
But i can't figure out how to do this.
Thanks.
$\endgroup$ 12 Answers
$\begingroup$Matrices (as we normally use/think of them) represent linear transformations, and what you're looking for is not a linear transformation; it is what we would call an affine transformation. So, you can't quite do this with just matrix multiplication, unless you cheat a little by going up a dimension.
Option 1: Do things the normal way, without matrices.
Let $T(x)$ be the translation of the origin to $\pmatrix{5\\6}$. That is, $$ T(x) = x + \pmatrix{5\\6} $$ We then have $$ T^{-1}(x) = x-\pmatrix{5\\6} $$ From there, if $R$ is the rotation about the origin and $A$ is the rotation about $\pmatrix{5\\6}$, we have $$ A(x) = T(R(T^{-1}(x))) = Rx+\pmatrix{5\\6} - R\pmatrix{5\\6} = Rx + (I-R)\pmatrix{5\\6} $$ As you may verify.
Option 2:
Let $x = \pmatrix{x_1\\x_2}$ be our starting point. We may write $$ \pmatrix{R&(I-R)\pmatrix{5\\6}\\\pmatrix{0&0}&1} \pmatrix{\pmatrix{x_1\\x_2}\\1} = \pmatrix{A\pmatrix{x_1\\x_2}\\1} $$
$\endgroup$ $\begingroup$Another solution is to write $(x,y)$ in shifted polar coordinates, that is:
$$x = 5 + r \cdot \cos\theta \\ y = 6 + r \cdot \sin \theta$$
where $r$ is the distance of $(x,y)$ to $(5,6)$, and $\theta$ is the angle from the line $y = 6$, to the point, anti-clockwise. You can write $(x_\varphi, y_\varphi) = (5 + r \cdot \cos(\theta + \varphi), 6 + r \cdot \sin(\theta + \varphi))$ and use the formulas for $\sin(a+b)$, etc, and have the expressions for $x_\varphi$ and $y_\varphi$ explicitly. Make $\varphi = 35º$ and we're pratically done. Then do just like linear mappings.
$\endgroup$