##### Example2.6.3

In this example, we will find the matrix defining a matrix transformation that performs a \(45^\circ\) counterclockwise rotation.

We first need to know that this geometric operation can be represented by a matrix transformation. To begin, we will define the function \(T:\real^2\to\real^2\) where \(T(\xvec)\) is obtained by rotating \(\xvec\) counterclockwise by \(45^\circ\text{,}\) as shown in Figure 4.

We need to check that \(T\) is a matrix transformation; by Proposition 2, this means that we should make sure that

\begin{equation*} \begin{aligned} T(c\vvec) \amp {}={} cT(\vvec) \\ T(\vvec + \wvec) \amp {}={} T(\vvec) + T(\wvec)\text{.} \end{aligned} \end{equation*}The next two figures illustrate these properties. For instance, Figure 5 shows that relationship between \(T(\vvec)\) and \(T(c\vvec)\) when \(c\) is a scalar. We easily see that \(T(c\vvec)\) is a scalar multiple of \(T(\vvec)\) and hence that \(T(c\vvec) = cT(\vvec)\text{.}\)

Similarly, Figure 6 shows the relationship between \(T(\vvec+\wvec)\text{,}\) \(T(\vvec)\text{,}\) and \(T(\wvec)\text{.}\) In this way, we see that \(T(\vvec+\wvec) = T(\vvec) + T(\wvec)\text{.}\)

This shows that the function \(T\text{,}\) which rotates vectors by \(45^\circ\) is a matrix transformation. We may therefore write it as \(T(\xvec) = A\xvec\) where \(A\) is the \(2\times2\) matrix \(A=\left[\begin{array}{rr} T(\evec_1) \amp T(\evec_2) \end{array}\right]\text{.}\) The columns of this matrix, \(T(\evec_1)\) and \(T(\evec_2)\text{,}\) are shown in Figure 7.

To find the components of these vectors, notice that they form an isosceles right triangle, as shown in Figure 8. Since the length of \(\evec_1\) is 1, the length of \(T(\evec_1)\text{,}\) the hypotenuse of the triangle, is 1.

This leads to

\begin{equation*} T(\evec_1) = \twovec{\frac1{\sqrt{2}}} {\frac1{\sqrt{2}}}, T(\evec_2) = \twovec{-\frac1{\sqrt{2}}} {\frac1{\sqrt{2}}} \text{.} \end{equation*}Hence, the matrix \(A\) is

\begin{equation*} A = \left[\begin{array}{rr} \frac{1}{\sqrt{2}} \amp -\frac{1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}} \amp \frac{1}{\sqrt{2}} \\ \end{array}\right] \text{.} \end{equation*}You may wish to check this using the interactive diagram in the previous activity using the approximation \(1/\sqrt{2} \approx 0.7\text{.}\)