This post will look at rotating a matrix 90° and what that does to the determinant. This post was motivated by the previous post. There I quoted a paper that had a determinant with 1s in the right column. I debated rotating the matrix so that the 1s would be along the top because that seems more natural, but in the end I kept the original notation. If I had rotated the matrix, I’d need to adjust the value of the determinant.

Rotating a matrix is a an unusual operation. When someone speaks of turning a matrix over, they usually mean taking the transpose; taking the transpose is a reflection, not a rotation. And when you see the words “rotation” and “matrix” in close proximity, the topic is a matrix that represents a rotation. That’s not what this post is about: the matrix isn’t performing a rotation; a rotation is being performed on it.

Here’s an example:

Using subscripts makes the example above a little harder to read but much easier to formalize.

If we denote a matrix by *A* and its image after rotation as *A*‘, then the components *a*‘ of *A*‘ are related to the components *a* of *A* by

To form the rotation of *A*, we take the transpose of *A*, then reverse the order of the rows. In matrix notation,

where *J* is the matrix that has 1’s on the secondary diagonal, the diagonal running southwest to northeast, and 0’s everywhere else. The matrix *J* is the rotation of the identity matrix *I*.

The determinant of *A*‘ is the determinant of *J* times the determinant of *A*^{T}, and the determinant of *A*^{T} is the same as the determinant of *A*.

So the last thing we need to do to compute the determinant of *A*‘ is to compute the determinant of *J*.

We can turn *I* into *J*, and vice versa, by reversing the order of the rows. Let’s do this one pair of rows at a time. We swap the first and last rows. Then we swap the second row with the second to last row, then swap the third row from the top with the third row from the bottom, etc.

Suppose *I* is an *n* × *n* matrix, and first assume *n* is even. Then we need to do *n*/2 swaps, swapping each of the top *n*/2 rows with one of the bottom *n*/2 rows. Each swap reverses the sign of the determinant, and so the determinant of *J* is (−1)^{n/2}. Now if *n* is odd, the middle row doesn’t move. So we swap the top (*n* – 1)/2 rows with the bottom (*n* – 1)/2 rows. So in that case the determinant of *J* is (−1)^{(n-1)/2}. We can combine the even and the odd case using floor notation: