Given $y\in \mathbb{R}^n$, what is the solution set of $|x|=|y|$ in $\mathbb{R}^{n}$ when $n\geq 3$? Fix $y\in \mathbb{R}^n$, what is the solution of $|x|=|y|$ in $\mathbb{R}^{n}$ when $n\geq 3$ ?
In dimension $n=1$ we have $x=\pm y$ and in dimension $n=2$ we also easily see that $x=O y$ where $O$ is a rotation matrix (an orthogonal matrix).
The solution set is obviously non-empty in dimensions $n\geq 3$. It contains the vectors $x=O y$ where $O$ in an $n-$dimensional rotation matrix.
What is the complete solution ?
 A: I'll assume that $|x| = \sqrt{x^T x}$ here. Complete a basis of $\mathbb R^n$ with $y$ as the first vector. We may assume (by possibly carrying out Gram-Schmidt) that this basis is orthonormal, so that the matrix $Y$ whose columns are the elements of this basis is an orthogonal/rotation matrix. For any vector $x \in \mathbb R^n$, extend $x$ to a basis of $\mathbb R^n$, which, as before, we may assume to be orthonormal. Let $X$ be the matrix whose columns are the elements of this basis, so $X$ is orthogonal. Note that $Y$ sends the first standard basis vector to $y/|y|$ and $X$ sends the first standard basis vector to $x/|x|$. Then $XY^{-1}$, which is also orthogonal, sends $y/|y|$ to $x/|x|$ and hence sends $y$ to $x \cdot |y|/|x|$. In particular, if $|x|=|y|$, then $XY^{-1}$ sends $y$ to $x$. Conversely, if there exists an orthogonal matrix $O$ with $Oy=x$, then
$$|x| = \sqrt{x^T x} = \sqrt{y^TO^TOy} = \sqrt{y^TIy} = \sqrt{y^Ty} = |y|$$
so indeed the set of vectors $x$ with $|x|=|y|$ is precisely the set of vectors $Oy$ with $O$ orthogonal, as José's comment suggests.
