# Linear transformation — Counterclockwise rotation of 45 degrees?

My book asks us to find the standard matrix $A$ for the linear transformation $T$, where $T$ is the counterclockwise rotation of $45$ degrees in $R^2$. Their solution starts by saying:

$T(x,y) = (\cos(45^\circ) x - \sin(45^\circ) y, \ \sin(45^\circ) x + \cos(45^\circ) y)$

Can someone explain to me why this is?

I was able to otherwise complete the problem and find $A$ just by finding $T(1,0)$ and $T(0,1)$ using the unit circle, I don't understand this step they did. It's been a while since I had to do much with trigonometry so maybe I just need a little refresher.

• Since you know $T(1,0)$ and $T(0,1)$, use the fact that $T$ is linear to get $T(x,y)$: $$T(x,y) = xT(1,0) + yT(0,1)$$ – quasi Feb 8 '17 at 12:42

Suppose that $\|(x,y)\|=r$. Then there exists some angle $\theta^\circ$ such that $(x,y) = r(\cos \theta^\circ, \sin \theta^\circ)$ Rotating that point through an angle of $45^\circ$ will produce the new point

\begin{align} (x',y') &= r(\cos(\theta^\circ + 45^\circ), \sin(\theta^\circ+45^\circ)) \\ &= r( \cos \theta^\circ \cos 45^\circ - \sin \theta^\circ \sin 45^\circ, \cos \theta^\circ \sin 45^\circ + \sin \theta^\circ \cos 45^\circ) \\ &= (x \cos 45^\circ - y \sin 45^\circ, x \sin 45^\circ + y \cos 45^\circ) \\ \end{align}

They have just written out the standard rotation matrix equation for rotation:

$$\begin{bmatrix}\cos(\pi/4)&-\sin(\pi/4)\\\sin(\pi/4)&\cos(\pi/4)\end{bmatrix}\begin{bmatrix}x\\y\end{bmatrix}=\begin{bmatrix}x'\\y'\end{bmatrix}=T(x,y)$$

If you draw the triangle formed by $(1/\sqrt{2},0)$ and $(1/\sqrt{2},1/\sqrt{2})$ and $(0,0)$, it should start making a lot of sense what the sines and cosines are doing. Similarly you can look at the triangle formed by $(-1/\sqrt{2}, 1/\sqrt{2})$, $(-1/\sqrt{2},0)$ and $(0,0)$ and see what the second column is doing to $(0,1)$ graphically.

After that you can repeat by considering an arbitrary angle $\theta$ rather than just $\pi/4$, and the picture will show you why the sines and cosines are where they are.

Let $a,b \in \mathbb R^2$. The well-known formula for the angle $\phi$ between $a$ and $b$ reads as follows:

$\cos \phi=\frac{a * b}{||a|| *||b||}$.

Now let $a=(x,y)$ and $b=T(x,y)$. It now your turn to show that

$\frac{a * b}{||a|| *||b||}= \cos (45°)$