Show that $|x|^2 = |y|^2$ with $A$ orthogonal and $Ax = \cos (θ)x − \sin (θ)y$, $Ay = \sin (θ)x + \cos (θ) y$ 
Let $A$ be an orthogonal $n × n$ matrix and suppose that $x, y \in \mathbb R^n$
  and $\theta \in (0 , \pi)$ satisfy 
  $$Ax = \cos (θ)x − \sin (θ)y,\\
Ay = \sin (θ)x + \cos (θ) y.$$
Prove that $x$ and $y$ must be perpendicular vectors of equal length, i.e. show that $|x|^2 = |y|^2$
  and $x · y = 0$.

We know that because $A$ is orthogonal then$$\langle x,x \rangle =\langle Ax,Ax \rangle, \quad \langle x,y \rangle=\langle Ax,Ay \rangle, \quad \langle y,y \rangle=\langle Ay,Ay \rangle.$$
I was already struggling with showing that $|x|^2 = |y|^2$. So far I just wrote out that 
$$|x|^2= \sum_{i=1}^n (Ax_i)^2= \sum_{i=1}^n \cos^2(\theta)x_i^2-2\cos(\theta)\sin(\theta)x_iy_i+\sin^2(\theta)y_i^2,\\
|y|^2= \sum_{i=1}^n (Ay_i)^2= \sum_{i=1}^n \cos^2(\theta)y_i^2+2\cos(\theta)\sin(\theta)x_iy_i+\sin^2(\theta)x_i^2.$$
I don't really see how I could conclude from this that they are equal.
 A: $$\langle x,y\rangle =\langle x, A^TAy\rangle=\langle Ax,Ay\rangle=\langle x\cos\theta -y\sin\theta, x\sin\theta+y\cos\theta\rangle$$
Computing the last expression:
$$\langle x\cos\theta -y\sin\theta, x\sin\theta+y\cos\theta\rangle\\=\sin\theta\cos\theta\langle x,x\rangle+\cos^2\theta\langle x,y\rangle-\sin^2\theta\langle y, x\rangle-\sin\theta\cos\theta\langle y,y\rangle\\=\sin\theta\cos\theta||x||^2+\cos^2\theta\langle x,y\rangle-\sin^2\theta\langle y, x\rangle-\sin\theta\cos\theta||y||^2\\=\sin\theta\cos\theta(||x||^2-||y||^2)+\langle x,y\rangle(\cos^2\theta-\sin^2\theta)$$
Therefore we have:
$$\langle x,y\rangle=\sin\theta\cos\theta(||x||^2-||y||^2)+\langle x,y\rangle(\cos^2\theta-\sin^2\theta)\\=\frac{\sin(2\theta)}{2}(||x||^2-||y||^2)+\cos(2\theta)\langle x,y\rangle$$
equivalently
$$2(1-\cos(2\theta))\langle x,y\rangle=\sin(2\theta)(||x||^2-||y||^2)$$
By assumption the identity holds for any $\theta\in(0,\pi)$ so when $\theta=\pi/2$ we obtain $\langle x,y\rangle=0$ for any $x,y\in\mathbb{R}^n$. Pick any $\theta\in(0,\pi)\setminus\{\pi/2\}$ then it must be the case that $||x||^2-||y||^2=0$ implying $||x||=||y||$.
