If you have ever played with the
RotationTransform command in Mathematica, you may have at some point become impressed at how quickly it returns answers in an arbitrary number of dimensions. After all, the details section of the documentation for this command says explicitly that it “can effectively specify any element of the n-dimensional rotation group SO(n).” Since elements of the group can be evaluated by exponentiating the generator of the element, in this case an orthogonal matrix, it appears at first sight that Mathematica knows how to exponentiate an orthogonal matrix in an arbitrary number of dimensions, and very quickly at that.
It turns out that there is a simpler way to evaluate arbitrary elements of the group than by explicitly exponentiating each individual matrix. To show how this works, first quickly review the relationship between a rotation matrix and its generator. For the simplest case of rotation in a two-dimensional plane, the rotated vector is related to the initial vector by
for a right-hand rotation through the angle a. The generator of this rotation is represented by the matrix . The square of this matrix is the negative of the identity matrix, its cube is its own negative, and the full exponentiation is
leading to the rotation matrix given above. The generator of the rotation can be written as an outer product of the two unit vectors along the x-axis and the y-axis,
where the transposed vector on the right of each term is multiplied leftward onto each component of the vector to produce matrices that are added together. Since the final result is now a general vector statement, it can be extended immediately to higher dimensions. The equivalent three-dimensional generator is
where the subscript indicates that this is a right-hand rotation from the x-axis towards the y-axis. Note that in forming this generator, the first index appears with a negative sign as a non-transposed vector. The two remaining generators of right-hand rotations are
Because there are three coordinate axes, the number of pairwise combinations is also three, so that in three dimensions one can make the identifications
and describe rotations as being about the corresponding axes. The rotation matrices can be evaluated separately about each axis just as for the rotation in the two-dimensional plane, with the results
In three dimensions one can also consider a rotation about a general axis by a single angle
where because these numbers are direction cosines giving the inclination of the axis of rotation to the three coordinate axes. The square and cube of this matrix are
and the exponentiated matrix can be written as
where the denominators normalize powers of the coefficient matrix. When applied to a vector, the result is Rodrigues’ rotation formula:
In four dimensions one can no longer describe a rotation as being about an axis, because there are two axes perpendicular to every plane and there would be an ambiguity in the description. In higher dimensions there are even more axes perpendicular to each plane, so a rotation in n dimensions is best described as being in an (n−1)-dimensional hyperplane in a direction from one unit vector towards another.
The definitions above of generators in terms of outer products are in vector notation, and so can be extended immediately to describe rotation in any hyperplane defined by two n-dimensional vectors. Given any two orthogonal unit vectors n1 and n2, which means
the generator of rotations in the hyperplane spanned by the two vectors is
Forming powers of this generator,
the n-dimensional rotation matrix is simply
The difference of sign in the last term compared to Rodrigues’ rotation formula is due to an extra minus sign in the neighboring outer product. This n×n matrix can now be applied to an n-dimensional vector to find its final value after rotation in the specified hyperplane.
Given two vectors that are not orthogonal, one can apply the Gram-Schmidt orthogonality process, renormalize the second vector and form the rotation matrix with the two newly orthogonal unit vectors. And that is precisely what Mathematica does in producing answers so quickly in any number of dimensions. The exponentiation has already been carried out in the general formula and does not need to be done explicitly for every particular case, and forming the n×n matrix is trivial for Mathematica.
To demonstrate the consistency of this general formula with the result above in three dimensions, one need merely choose any vector satisfying v1 · n = 0 with respect to the three-dimensional axis of rotation, form its orthogonal vector v2 = v1×n , normalize both vectors and do a wee bit of algebra. Since there is an entire plane of rotation in which to choose the vectors, any initial choice leads by this method to the same result.
In four dimensions, exponentiation of a general orthogonal matrix is capable of explicit evaluation using a method based on the local isomorphism
where the minus signs have all been kept below the diagonal for convenience. Squaring this matrix itself produces a symmetric matrix whose interpretation is not immediately clear, but if one first writes
then it is straightforward to verify that these two matrices commute:
so that the complete exponentiated matrix is
One can describe this method as arranging the six parameters of SO(4) into two vectors, remembering that one is working with four-dimensional representations of SO(3).
Uploaded 2013.01.15 — Updated 2017.12.17 analyticphysics.com