# 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.

• I believe you are rotating clockwise, rather than counter-clockwise. Just try switching the sign of the angle. – mweiss Sep 2 '14 at 4:21
• @mweiss: If that were true, the product of the gradients $2$ and $\frac12$ would be $-1$. – TonyK Sep 2 '14 at 11:16
• @mweiss: Come to think of it, that can't be right. It looks like the book has it wrong: the gradient should be $-\frac12$. – TonyK Sep 2 '14 at 11:19
• @TonyK: The working out is my own, the book only provided it's "correct answer". I did notice though (based on responses, of course) was that when I found the inverse of the rotational matrix, I forgot that b and c were to change to -b and -c. – user134903 Sep 2 '14 at 11:53
• The textbook answer $y'=\frac{x'}2+\frac{\sqrt2}{4}$ (as you have reported it) can't be right: the angle between the two lines is not $45^{\circ}$. – TonyK Sep 2 '14 at 12:06

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}$$

• The textbook seems to say that I should be doing it anti-clockwise, however this method (rotating it the other direction) worked. Thanks! – user134903 Sep 2 '14 at 4:32

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)$.

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$.
• Yes $-$ it looks like the book has it wrong (or the OP left out the minus sign). – TonyK Sep 2 '14 at 11:20