Rotate $xy=1$ by $\frac{\pi}{4}$ in a negative (clockwise) direction. I was studying hyporbolae for the first time and noticed that $y=\frac{1}{x}$ is a rotated hyperbola. I had seen equations like $y=\frac{1}{x}$ before but never noticed they where hyperbolae.
Anyway using geometry and the general form of a hyperbola, $\frac{x^2}{a^2}-\frac{y^2}{b^2}=1$, I realised that $xy=1$ is $\frac{x^2}{2}-\frac{y^2}{2}=1$ which has been rotated clockwise by $\frac{\pi}{4}$.
I tried to rotate $xy=1$ using the rotation matrix: $ \left( \begin{array}{cc} \cos\theta & \sin\theta\\ \sin\theta & \cos\theta\end{array} \right)$
$$\left( \begin{array}{cc} \cos\theta & \sin\theta\\ \sin\theta & \cos\theta\end{array} \right) \left( \begin{array}{cc} x \\ \frac{1}{x}\end{array} \right)=\left( \begin{array}{cc} x'\\ y' \end{array} \right)$$
$$\frac{x}{\sqrt{2}}+\frac{1}{\sqrt{2}x}=x', -\frac{x}{\sqrt{2}}+\frac{1}{\sqrt{2}x}=y'$$
I used two methods. The first worked and the second did not. I'd like to know where I'm going wrong with the second approach.
In the first approach I squared both sides of the above equations and then used simultaneous equations to remove the $x$. Then dividing across by $2$ gives the desired result.
Just out of curiosity I tried another method. I first multiplied across both equations by $\sqrt{2}x$ and rearranged to quadratic form: $$x^2-\sqrt{2}x'x+1=0, x^2-\sqrt{2}y'x-1=0$$
I equated the solutions of each to get: $$\frac{\sqrt{2}x' \pm\sqrt{2x'^2-4}}{2}=\frac{-\sqrt{2}y' \pm\sqrt{2y'^2+4}}{2}$$
The $\pm$s are ugly but I figured I could get rid of them through a series of squaring. I tried a few different ways starting with roots on opposite sides, roots on the same side etc. but I can't quite get it through. Should this work or am I going down a dead-end road ?
Ok I got it: $$\frac{\sqrt{2}x \pm\sqrt{2x^2-4}}{2}=\frac{-\sqrt{2}y \pm\sqrt{2y^2+4}}{2}$$ simplifies to  $$\frac{x^2}{2}-\frac{y^2}{2}=1$$
 A: You can't get a 4th degree equation by an affine transformation of coordinates.
A: I think its easier if we keep the variable $y$ around.  Then
$$
\begin{pmatrix}
X\\
Y
\end{pmatrix}
=
\begin{pmatrix}
\cos(\pi/4) & -\sin(\pi/4)\\
\sin(\pi/4) & \cos(\pi/4)
\end{pmatrix}
\begin{pmatrix}
x\\
y
\end{pmatrix}
$$
so $X = \frac{\sqrt{2}}{2} x - \frac{\sqrt{2}}{2} y$ and $Y = \frac{\sqrt{2}}{2} x + \frac{\sqrt{2}}{2} y$.  Inverting this system, we have
$$
x = \frac{\sqrt{2}}{2} X + \frac{\sqrt{2}}{2} Y \qquad y = \frac{\sqrt{2}}{2} X - \frac{\sqrt{2}}{2} Y
$$
and substituting these expressions into the equation $xy = 1$, we find
\begin{align*}
1 = xy = \left(\frac{\sqrt{2}}{2} X + \frac{\sqrt{2}}{2} Y\right)\left(\frac{\sqrt{2}}{2} X - \frac{\sqrt{2}}{2} Y\right) = \frac{X^2}{2} - \frac{Y^2}{2} \, .
\end{align*}
Just as a note, in general, squaring equations can introduce spurious solutions because the squaring map $a \mapsto a^2$ is not one-to-one.  The degree $4$ formula you are looking for is actually the equation of a "doubled" hyperbola, since
$$
x^4+y^4-4x^2+4y^2-2x^2y^2+4 = (x^2 - y^2 - 2)^2 \, .
$$
