# Example

Suppose $F$ rotates two-dimensional vectors by $\theta$ degrees, counter-clockwise about the origin. Convince yourself that $F$ is a linear transformation, and then find its matrix representation. Finally, use this matrix to rotate two vectors of your choosing by $25^{\circ}$.

We should convince ourselves that rotation by $\theta$ degrees is indeed a linear transformation before proceeding. Do both properties of a linear transformation hold? Recall that $F$ is a linear transformation (operating on vectors) if and only if, for all scalars $c$ and vectors $\bar{x}$ and $\bar{y}$ we have:

1. $F(c\bar{x}) = cF(\bar{x})$
2. $F(\bar{x}+\bar{y}) = F(\bar{x}) + F(\bar{y})$

1. If we stretch a vector $\bar{x}$ by a factor of $c$ first, and then rotate it clockwise by $\theta^{\circ}$, is the result the same as rotating the vector $\bar{x}$ first and then stretching it by a factor of $c$?

2. If we add two vectors $\bar{x}$ and $\bar{y}$ (in the normal way, "head-to-tail") and then rotate the vector representing their sum, is the result the same as first rotating the individual vectors $\bar{x}$ and $\bar{y}$ and then adding them together?

Geometrically, we should be able to quickly say "yes" to both questions. As such, we can now focus our attention on finding a matrix form for such a linear transformation. Suppose we wish our matrix to rotate vectors by $25^{\circ}$ counter-clockwise. Recall, that the first and second columns of the matrix form for a linear transformation (on 2-dimensional vectors) indicate what that transformation does to the vectors $\begin{pmatrix}1\\0\end{pmatrix}$ and $\begin{pmatrix}0\\1\end{pmatrix}$, respectively

If our transformation is a rotation counter-clockwise of 25 degrees, notice that

$$\begin{pmatrix}1\\0\end{pmatrix} \rightarrow \begin{pmatrix} \cos 25^\circ \\ \sin 25^\circ\end{pmatrix} \quad \textrm{and} \quad \begin{pmatrix}0\\1\end{pmatrix} \rightarrow \begin{pmatrix}-\sin 25^\circ\\ \cos 25^\circ \end{pmatrix}$$

As such, the matrix form we seek is:

$$\begin{bmatrix} \cos 25^\circ & -\sin 25^\circ\\ \sin 25^\circ& \cos 25^\circ\end{bmatrix}$$

Following similar logic, the matrix form for a counter-clockwise rotation by any angle $\theta$ is given by

$$\begin{bmatrix} \cos \theta & -\sin \theta\\ \sin \theta & \cos \theta \end{bmatrix}$$

With the rotation matrix found, rotating a particular vector is easy...

Suppose we wish to rotate the vector $\begin{pmatrix}3\\4\end{pmatrix}$ by $25^\circ$. We just find

$$\begin{bmatrix} \cos 25^\circ & -\sin 25^\circ\\ \sin 25^\circ& \cos 25^\circ\end{bmatrix} \begin{pmatrix}3\\4\end{pmatrix} = \begin{pmatrix}3\cos 25^\circ - 4 \sin 25^\circ \\ 3 \sin 25^\circ + 4 \cos 25^\circ \end{pmatrix} \approx \begin{pmatrix}1.028\\4.893\end{pmatrix}$$

Other rotations are found in a similar manner...