<s>[INST] Finding the coordinate of a point after multiple transformations 
Find the new coordinates of $(2,3)$ if following transformations take place:
(i) Origin is shifted to $(1,1)$
(ii) Axes are rotated by an angle $45^{\circ}$ in anticlockwise sense
(iii) Origin is shifted to $(1,1)$ and then axes are rotated by angle $45^{\circ}$ in clockwise sense
(iv) Coordinate axes become $x+y+1=0$ and $x-y+2=0$


Here is what I have tried:
At first step, coordinates become $(1,2)$, then using $X=x\cos\theta+y\sin\theta, Y=y\cos\theta-x\sin\theta$, we get at the second step $(3/\sqrt{2}, 1/\sqrt{2})$. Now again translating origin to $(1,1)$, and applying rotation, this time $45^{\circ}$ clockwise we get $(1,2-\sqrt{2})$. Finally, changing axes to given lines, we get using the following formula, the point as $(2\sqrt{2}-1,1+1\sqrt{2})$
$$X=\frac{lx+my+n}{\sqrt{l^2+m^2}}\\ Y=\frac{mx-ly+n^{'}}{\sqrt{l^2+m^2}}$$
Turns out the actual answer given is $(1/\sqrt{2}, 6/\sqrt{2})$. Can anybody spot the mistake? Thanks.
 [/INST] (i) Origin is shifted to $(1, 1)$, so coordinates become $(1, 2)$.
(ii) If the axes are rotated by $45^\circ$ anticlockwise then the relation between
the original coordinates $(x,y)$ and the new coordinates $(x', y')$ is
$ x = \cos 45^\circ x' - \sin 45^\circ y' $
$ y = \sin 45^\circ x' + \cos 45^\circ y' $
which implies,
$ x' = \cos 45^\circ x + \sin 45^\circ y $
$ y' = -\sin 45^\circ x + \cos 45^\circ y $
Hence, the new coordinates are
$(x', y') = (\dfrac{5}{\sqrt{2}} , \dfrac{1}{\sqrt{2}})$
(iii) In this case, we have a combination of shifting and rotation, so
$(x, y)  = (1,1) + R (x', y') $
solving,
$(x', y') =( \cos (-45^\circ) (x-1) + \sin (-45)^\circ (y-1) , -\sin (-45^\circ) (x-1) + \cos (-45^\circ) (y-1)) $
And this evaluates to,
$(x', y') = (-\dfrac{1}{\sqrt{2}}, \dfrac{3}{\sqrt{2}})$
(iv) The point of intersection of the axes is $(-\dfrac{3}{2} , \dfrac{1}{2} )$
The axes orientation is rotated by $45^\circ$ clockwise with respect $xy$ axes.
Hence,
$(x', y') = \cos (-45^\circ) (x+\dfrac{3}{2}) + (\sin -45^\circ) (y-\dfrac{1}{2}) , -\sin( -45^\circ ) (x+\dfrac{3}{2}) + \cos (-45^\circ )(y-\dfrac{1}{2}) ) $
And this evaluates to,
$(x', y') = ( \dfrac{1}{\sqrt{2}} , \dfrac{6}{\sqrt{2}} ) $
</s>