How many degrees of freedom would a rotation matrix in R5 have? I understand that a rotation matrix in R3 has three degrees of freedom because there is three linearly independent planes that the rotation can take place in. How does this translate to R5?
 A: In $n$ dimensions you have $\frac{1}{2}n(n-1)$ degrees of freedom.
One argument goes like these lines: In $n$ dimensions a rotation matrix $R$ has $n^2$ degrees of freedom. Rotations preserve the dot products of vectors. So $u^t v=u^t R^tRv$ for any vectors $u$ and $v$ and so $R^t R=I$. That's $n^2$ equations. But those below the diagonal are the same as those above. So we only have $\frac{1}{2}n(n+1)$ equations leaving $\frac{1}{2}n(n-1)$ degrees of freedom.
There's actually one more constraint: rotations need to preserve volume so $\det R=1$. You can already deduce $(\det R)^2=1$ from $R^t R=I$ so this extra constraint doesn't reduce the degrees of freedom, it just cuts the space in half. A full proof requires showing that the remaining equations are algebraically independent.
For $n=5$ we get $10$.
A: Here's another, more geometric, point of view. 
Rotations in three dimensions are very special, and potentially misleading. We may be tempted to think of them as rotations about an axis, when we should really think of them as rotations in a plane. Of course, in $\Bbb R^3$ these two notions coincide, but in $\Bbb R^n$ we no longer have the luxury of rotating about axes. we do, however, continue rotating in planes.
So, in this point of view, we get distinct "basic" rotations by choosing distinct pairs of coordinate axes, of which there are ${n \choose 2} = \frac{n(n-1)}{2}$, to span the plane in which we're rotating. (Note that in $\Bbb R^3$, we would have ${3 \choose 2} = 3$ ways to choose pairs of coordinate axes, corresponding to the $xy, xz$, and $yz$ planes. This is merely a consistency check).
The hard part, of course, is verifying that every possible rotation can be achieved as a composition of these (and that we do indeed need all ${n \choose 2}$ of them). One way to do this might be to convince yourself that, using only a composition $T$ of these "basic" rotations in a coordinate plane, you can rotate any plane $p$ until it coincides with one of the coordinate planes. Then, the conjugation $T^{-1}RT$, where $R$ is a known rotation in the coordinate plane, will be a rotation in your plane $p$.
A: The set of orthogonal operators in $\mathbb{R}^n$, denoted by $O_n(\mathbb{R})$, is an algebraic variety defined by the equation $R^TR=I$. The dimension of this variety (the number of degrees of freedom) is the dimension of his tangent space (if this dimension is a constant). Since $G=O_n(\mathbb{R})$ is a group, it suffices, by translation, to consider the tangent space $T_I(G)$ in $I$.
By derivation, in $I$, of the equality $R^TR=I$, we obtain $T_I(G)=\{H|H^T+H=0\}$, that is the vector space of the skew symmetric matrices. This space has dimension $n(n-1)/2$ and we are done.
EDIT. Here's another way of seeing things. We consider the geodesic $t\rightarrow e^{tH}$  in $SO_n(\mathbb{R})$ passing through $I$ in the direction $H$. Then $H\in SKEW_n\rightarrow e^{H}\in SO_n(\mathbb{R})$ is a local diffeomorphism. Then the degree of freedom in $SO_n$ is $dim(SKEW_n)=n(n-1)/2$.
A: To get an intuition for it, you can look at it like this.
5 x 5 is a matrix of 25 elements and generally 25 degrees of freedom.
Rotation matrix is an orthonormal matrix, which means that all of its columns are unit vectors. This is 1 DOF less for each column. 25 - 5 = 20
Also, orthonormal means that all of its columns are perpendicular to each other (dot product == 0). That's 1 DOF less for each combination of two columns. The number of such combinations is $\frac{1}{2}n(n-1)$.
$\frac{1}{2}5(5-1)=10$
We were left with 20 DOF and now, 20 - 10 = 10.
We are down to 10 DOF.
To recap the entire procedure, ${n}^{2} - n - \frac{1}{2}n(n-1)=\frac{1}{2}n(n-1)$
