Rotate on a unit circle given the degrees and coordinates? So I have square coordinates (x,y) that I map to coordinates on a unit circle via:
$$
x' = x \sqrt{1 - y^2 / 2}\\
y' = y \sqrt{1 - x^2 / 2}
$$
I am trying to rotate this now by 45 degrees.
Hm, I have to check if this is only in a specific quadrant, I think the coordinate at any time could be in any one of the four quadrants...but again not sure so if that matters please help me for both!!
But yea I'm trying to rotate by 45 degrees, I need to understand for both clockwise and counter clockwise.
I need to do this so I can play around with the equations in my code.
So far I have:
$$
x'' = \cos(\pi/4) \sqrt{(x'^2) + (y'^2)} + \arctan(y,x)^2\\
y'' = \cos(\pi/4) \sqrt{(x'^2) + (y'^2)} + \arctan(y,x)^2
$$
Not sure if this is correct.
But anyway, I go from the circle coordinates to the square via:
$$
x = \frac12 \sqrt{ 2 + u^2 - v^2 + 2u\sqrt2 }
  - \frac12 \sqrt{ 2 + u^2 - v^2 - 2u\sqrt2 }\\
y = \frac12 \sqrt{ 2 - u^2 + v^2 + 2v\sqrt2 }
  - \frac12 \sqrt{ 2 - u^2 + v^2 - 2v\sqrt2 }
$$
Please help! And give resources or explanation if you want, it's been a bit since I've used geometry.
 A: Adrian's comment is the correct one. Since rotation is a linear operation, it is enough to see its action on the standard basis. Let your rotation be denoted by $r(x,y) : \mathbb{R}^2 \to \mathbb{R}^2$, then
$$
r(1,0) = \left(\sqrt2/2, \sqrt2/2\right) = \frac{\sqrt2}{2} (1,1)
\quad \text{and} \quad
r(0,1) = \frac{\sqrt2}{2} (-1,1)
$$
So
$$
r\left( \begin{pmatrix} x \\ y \end{pmatrix}\right)
= r\left( x \begin{pmatrix} 1 \\ 0 \end{pmatrix}
        + y \begin{pmatrix} 0 \\ 1 \end{pmatrix}\right)
= x r\left( \begin{pmatrix} 1 \\ 0 \end{pmatrix}\right)
+ y r\left( \begin{pmatrix} 0 \\ 1 \end{pmatrix}\right)
= \frac{\sqrt{2}}{2}
  \begin{pmatrix} 1 & -1 \\ 1 & 1 \end{pmatrix}
  \begin{pmatrix} x \\ y \end{pmatrix}
$$
A: As you know we rotate the a point $z=(x,y) $ by multiplying by $$ e^{i\phi} = ( \cos \phi, \sin \phi)$$
For $\phi = \pi/4$ This translates to 
$$(x',y')\to  \sqrt 2 /2 ( x'-y' , x'+y')$$
Thus $x''=   \sqrt 2 /2 ( x'-y')$ and  $y''=   \sqrt 2 /2 ( x'+y')$ is the rotation for 45 degrees counter clockwise. 
