# Rotation matrices and prior invariance for arbitrary dimensions

I have a question about a rotation matrix, which can be represented in 2 dimensions as: $$R_{2}(\theta)=\begin{bmatrix} \cos\theta & \sin\theta \\ -\sin\theta & \cos\theta \end{bmatrix}$$ For some arbitrary angle $\theta$. This can be extended to an arbitrary number of dimensions by adding an identity matrix: $$R_{n}(\theta)=\begin{bmatrix} R_{2}(\theta) & 0 \\ 0 & I_{n-2}\end{bmatrix}$$

I have found some "invariance" properties of a n-dimensional prior distribution when rotated in 2 arbitrary dimensions. My question is: can any rotation in arbitrary dimensions be represented by a sequence of 2-D rotations? It doesn't matter if the sequence is unique or not for my purposes.

Or perhaps a better question is: if a prior distribution is invariant when rotated about 2 arbitrary dimensions, is it invariant when rotated about an arbitrary number of dimensions?

• I think you'd be better asking this on math.SE, as the question clearly applies equally to anything that can be represented in $n$-dimensional space, not just a probability distribution. – onestop Feb 17 '11 at 14:10
• @onestop - I am thinking the same thing. I'll leave this question here anyway, just in case somebody in stats world knows the answer. One thing I have found with stats (particularly Bayesian stats) is that you tend to come across just about every branch of maths (pardon the pun). So maybe some stats person may know it. – probabilityislogic Feb 17 '11 at 14:19
• I guess if you can "rearrange" the indexes (apply permutations) in you space the answer is yes otherwise it is no. – robin girard Feb 17 '11 at 14:29
• @robin- that is what I implicitly meant by rotating about "arbitrary" dimensions, in that it doesn't matter which "dimension" you call 1 and 2. – probabilityislogic Feb 17 '11 at 14:54

The answer, I believe, to your first question is "yes". This can be accomplished with Givens rotations, which allow for the annihilation of arbitrary elements of a matrix via a $2\times 2$ rotation matrix. The implication is that if you start with a rotation matrix, then you can reduce it to a diagonal matrix via Givens rotations. But, since orthogonality of a matrix is preserved by multiplication with another orthogonal matrix, this means that the diagonal matrix must be orthogonal, and hence, must contain only 1's and -1's. Additional rotations then reduce this matrix to the identity. The affirmative answer to your first question follows immediately.

Thus the space of $n\times n$ orthogonal matrices is spanned by Givens rotations with respect to matrix multiplication.

If this doesn't give you enough detail, let me know and I'll fill it in.

• thanks for your answer, especially the terminology - I've never heard of "givens" rotation before. – probabilityislogic Feb 17 '11 at 14:57
• Thanks for this, you have saved me a lot of useless algebra! Because I can go "rotation 2-D" new prior invariant... "rotate 2-D" new new prior invariant ..... etc. – probabilityislogic Feb 17 '11 at 15:13
• @probabilityislogic, Givens rotations are very popular in numerical linear algebra due to their simplicity and good numerical-stability characteristics. Some QR decomposition methods use them and I think any good SVD implementation will use them as well. – cardinal Feb 17 '11 at 15:21
• (+1) @Cardinal One small thing: the resulting diagonal matrix does not need to be the identity. It can have an even number of -1's. But those can be converted to +1's by means of suitable rotations (of 180 degrees). It's also worth nothing the implicit assumption that the only rotations one can use are with respect to a fixed basis. If not, then any rotation can always be written in the form $R_n(\theta)$ (that is, as a single such matrix) by choosing an appropriate basis adapted to that rotation. – whuber Feb 17 '11 at 18:27
• @whuber, Good catch! Thank you, and I've updated it accordingly. – cardinal Feb 17 '11 at 19:11

Yes, arbitrary rotations in an $n$ dimensional space can be written as the compositions of Givens rotations. The other question (and I think what you're aiming at) is

Or perhaps a better question is: if a prior distribution is invariant when rotated about 2 arbitrary dimensions, is it invariant when rotated about an arbitrary number of dimensions?

The answer is yes, and moreover look no further! since this class of distribution has been completely characterized: it's a subset of the elliptical distributions, when $\Sigma=I$. Elliptical distributions are all and only the rotationally invariant distirbutions, after an affine transformation of its variables. The standard normal multivariate distribution is its best-known example.