45 degree rotation of the line $y=-3x+1$? Currently working on problems in a textbook for Senior Maths (Year 11 Maths C, named 'Maths Quest - Maths C for Queensland), however I'm currently at a problem where my answer, despite attempting it multiple times, is incorrect to the textbook's result.
The question is, what the image of the line $y=-3x+1$ would be under the rotation of 45 degrees. 
It sounds like I am making a simple mistake somewhere, but I'm not sure where, therefore can't identify my mistake.
$$\begin{bmatrix} x' \\ y' \end{bmatrix} = R_{45^\circ} \begin{bmatrix} x \\ y \end{bmatrix}$$$$\begin{bmatrix} x \\ y \\ \end{bmatrix}=R_{45^\circ}^{-1}\begin{bmatrix} x' \\ y' \end{bmatrix}$$$$R_\theta=\begin{bmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \\ \end{bmatrix}$$$$R_{45^\circ}=\begin{bmatrix} \cos45 & -\sin45 \\ \sin45 & \cos45 \\ \end{bmatrix}$$$$=\begin{bmatrix} \frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}}\end{bmatrix}$$
$$_\text{The error occurred here, I didn't use the inverse}$$$$\begin{bmatrix} x \\ y\end{bmatrix}=\begin{bmatrix} \frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}}\end{bmatrix}\begin{bmatrix}x'\\y'\end{bmatrix}$$$$\therefore x=\frac1{\sqrt2}x' - \frac1{\sqrt2}y'$$$$ \space y=\frac1{\sqrt2}x' + \frac1{\sqrt2}y'$$$$\text{Sub x and y into original equation...}$$$$\frac1{\sqrt2}x' + \frac1{\sqrt2}y'=-3(\frac1{\sqrt2}x' - \frac1{\sqrt2}y')+1$$$$=\frac{-3}{\sqrt2}x'+\frac{3}{\sqrt2}+1$$$$\frac1{\sqrt2}y'=-\frac4{\sqrt2}x'+\frac3{\sqrt2}y'+1$$$$\frac{-2}{\sqrt2}y'=\frac{-4}{\sqrt2}x'+1$$$$\frac2{\sqrt2}y'=\frac4{\sqrt2}x'-1$$$$y'=\frac{4\sqrt2}{2\sqrt2}-\frac{\sqrt2}{2}$$$$y'=2x'-\frac{\sqrt2}2$$
All of the above methods used are simply multiplication, division, addition, and subtraction. I have tried this in a variety of orders, getting similar (once the same, however with $-\frac{\sqrt2}{2}$ instead of $\frac{\sqrt2}{2}$), however the textbook declares that the answer should be $y'=\frac{x'}2+\frac{\sqrt2}{4}$.
Where have I gone wrong? While keeping it roughly as simple as my own working out, any help is appreciated, especially other working out.
 A: Another way.
You can see your line as the set of points in the complex plane given by $z = k + (1-3 k) i$, $k \in \mathbb{R}, \ z = x+iy$. As a rotation by an angle $\alpha$ is the same as multiplying by $e^{i \alpha}$ you have that:
$$ \tilde{z} = z e^{i \pi/4} = \left(  k+(1-3k)i   \right)  \,  \left( \cos{\pi/4}   + i \, \sin{\pi/4} \right) = \ldots $$
Which you can always express in the form $y = y(x)$.
Hope you find this helpful.
Cheers!
A: The slope, $-3$, is the tangent of the angle that the line makes with the horizontal line.  The tangent of a $45^\circ$ angle is $1$.  So
$$
\tan(\alpha+\beta) = \frac{\tan\alpha+\tan\beta}{1-\tan\alpha\tan\beta} = \frac{-3+1}{1-(-3)1} = \frac{-2}{4} = \frac{-1}2.
$$
So the slope of the resulting line is $-1/2$.
A: Replace $$\begin{bmatrix} x \\ y\end{bmatrix}=\begin{bmatrix} \frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}}\end{bmatrix}\begin{bmatrix}x'\\y'\end{bmatrix}$$
by $$\begin{bmatrix} x \\ y\end{bmatrix}=\begin{bmatrix} \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\ -\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}}\end{bmatrix}\begin{bmatrix}x'\\y'\end{bmatrix}$$
