# Geometric intuition behind an n-dimensional rotation matrix

How do I derive an n-dimensional rotation matrix from a geometric perspective? I have read on wikipedia that it preserves distance so that $Q^TQ = I$ but the explanation to be honest isn't very clear. I've had a thorough look on Google and can't find a decent explanation that starts from the geometry first. Also, on Wikipedia (see here: https://en.wikipedia.org/wiki/Rotation_matrix) it says that $det(Q) = 1$ but it isn't clear at all why! Thanks.

• You may find interesting youtu.be/0rEz9-6trHw
– mfl
Aug 20 '18 at 14:54
• I'm not sure I understand what you mean by "deriving something from a geometric perspective", but you might find this question relevant: math.stackexchange.com/questions/2872052/…. Aug 20 '18 at 14:56
• Beware: there is not any commonly accepted definition of "rotation matrix" when the size of the matrix is larger than 3 by 3. Aug 20 '18 at 15:19
• You can think about rotation matrices as members of the group of symmetries of a sphere centred at the origin. These are called in general "orthogonal matrices". Not all symmetries of the sphere are called 'rotations' - some are called 'reflections' - see also the comment above me - from user1551. Aug 20 '18 at 16:29

Suppose $Q$ is an $n\times n$ matrix that preserves distance. Heuristically, that would mean that $$\Vert Qx-Qy \Vert = \Vert x - y \Vert$$ for all $n$-vectors $x$ and $y$. Now if you use the polarization identity $$\left<x,y\right> = \frac{1}{4}\left(\Vert x+y \Vert^2 - \Vert x-y\Vert^2\right)$$ you can show that preserving distances is equivalent to preserving the inner product. So $Q$ preserves distances if and only if $$\left<Qx,Qy\right> = \left<x,y\right>$$ for all $x$ and $y$. Using the defining property of the transpose, we can move it over: $$\left<Qx,Qy\right> = \left<x,y\right> \implies \left<x,Q^TQy\right> = \left<x,y\right>$$ for all $x$ and $y$. From this follows that $Q^TQ = I$. A nice consequence is that if treat the columns of $Q$ as vectors, they form an othonormal set: each has unit length, and each pair are orthogonal (perpendicular).
Now using determinant properties, you have that $\det Q^2 = \det I = 1$. So $\det Q = \pm 1$.
But this all comes from the distance-preserving property of $Q$. If you consider $\mathbb{R}^n$ as an oriented vector space, you can determine if distance-preserving matrices preserve or reverse the orientation. The condition of preserving the orientation is equivalent to the determinant of $Q$ being $1$.
• Fair point. I had to be a bit vague in that last paragraph because, like user1551 says, there isn't really a notion of rotation matrix for dimensions higher than 3 that's independent of the determinant property. I'll try to put in something for $n=2$ that might help. Aug 21 '18 at 13:15