As practice for doing linear transformations, we will create the matrices anyway and show that they lead to the same conclusion as going step by step in Solution 1. First recall that a rotation matrix rotating counter-clockwise with an angle
has the form
![{\displaystyle A={\begin{bmatrix}\cos(\theta )&-\sin(\theta )\\\sin(\theta )&\cos(\theta )\end{bmatrix}}.}](https://wiki.ubc.ca/api/rest_v1/media/math/render/svg/1fd6ea7f74ae86c667fcf3660b1995aa0fae4393)
If you are having trouble remembering how to form a rotation matrix, see the solution to Question A28 on this exam for a more detailed explanation of these entries (they are components of the vectors generated by rotating the unit vectors).
Since in this example the angle rotating is
then we get
![{\displaystyle A={\frac {1}{2}}{\begin{bmatrix}{\sqrt {3}}&-1\\1&{\sqrt {3}}\end{bmatrix}}.}](https://wiki.ubc.ca/api/rest_v1/media/math/render/svg/8445c9f5cb21ee68046a137f2c4e7c37a027edfa)
Next for the projection matrix, to get the entries in column k, we have to do a projection of the kth unit vector onto our desired vector u=[1,2]. We get that the first column is
![{\displaystyle {\textrm {proj}}_{\mathbf {u} }[1,0]={\frac {[1,0]\cdot [1,2]}{5}}[1,2]={\frac {1}{5}}[1,2].}](https://wiki.ubc.ca/api/rest_v1/media/math/render/svg/0f3abcc5fe9a831666ff1c7af7dbb6dee661e6ad)
The second column is
![{\displaystyle {\textrm {proj}}_{\mathbf {u} }[0,1]={\frac {[0,1]\cdot [1,2]}{5}}[1,2]={\frac {2}{5}}[1,2].}](https://wiki.ubc.ca/api/rest_v1/media/math/render/svg/f49c37dee60e54d44d6349cb0c5adf334a5f3fdb)
Therefore we get that the projection matrix is
![{\displaystyle B={\frac {1}{5}}{\begin{bmatrix}1&2\\2&4\end{bmatrix}}.}](https://wiki.ubc.ca/api/rest_v1/media/math/render/svg/de6a9941912fee24c00ea75d2398a6b9ed3fb485)
The total transformation then is (remember that the rotation is applied first),
.
Therefore,
![{\displaystyle {\begin{aligned}T\left({\begin{bmatrix}1\\0\end{bmatrix}}\right)&={\frac {1}{10}}{\begin{bmatrix}{\sqrt {3}}+2&2{\sqrt {3}}-1\\2{\sqrt {3}}+4&4{\sqrt {3}}-2\end{bmatrix}}{\begin{bmatrix}1\\0\end{bmatrix}}\\&={\frac {1}{10}}{\begin{bmatrix}{\sqrt {3}}+2\\2{\sqrt {3}}+4\end{bmatrix}}={\frac {{\sqrt {3}}+2}{10}}{\begin{bmatrix}1\\2\end{bmatrix}}\end{aligned}}}](https://wiki.ubc.ca/api/rest_v1/media/math/render/svg/48132ea79a91a63fb154312e123d84b15bd91078)
like we recovered in the first solution.