Anti-diagonal matrix explained

In mathematics, an anti-diagonal matrix is a square matrix where all the entries are zero except those on the diagonal going from the lower left corner to the upper right corner (↗), known as the anti-diagonal (sometimes Harrison diagonal, secondary diagonal, trailing diagonal, minor diagonal, off diagonal or bad diagonal).

Formal definition

An -by- matrix is an anti-diagonal matrix if the th element is zero for all rows and columns whose indices do not sum to . Symbolically:a_ = 0 \ \forall i,j \in \left\,\ (i+j \ne n+1).

Example

An example of an anti-diagonal matrix is \begin 0 & 0 & 0 & 0 & 2 \\ 0 & 0 & 0 & 2 & 0 \\ 0 & 0 & 5 & 0 & 0 \\ 0 & 7 & 0 & 0 & 0 \\ -1 & 0 & 0 & 0 & 0 \end.

Another example would be \begin 0 & 0 & 0 & 0 & 1 \\ 0 & 0 & 0 & 1 & 0 \\ 0 & 0 & 1 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 \\ 1 & 0 & 0 & 0 & 0 \end ...which can be used to reverse the elements of an array (as a column matrix) by multiplying on the left.

Properties

All anti-diagonal matrices are also persymmetric.

The product of two anti-diagonal matrices is a diagonal matrix. Furthermore, the product of an anti-diagonal matrix with a diagonal matrix is anti-diagonal, as is the product of a diagonal matrix with an anti-diagonal matrix.

An anti-diagonal matrix is invertible if and only if the entries on the diagonal from the lower left corner to the upper right corner are nonzero. The inverse of any invertible anti-diagonal matrix is also anti-diagonal, as can be seen from the paragraph above. The determinant of an anti-diagonal matrix has absolute value given by the product of the entries on the diagonal from the lower left corner to the upper right corner. However, the sign of this determinant will vary because the one nonzero signed elementary product from an anti-diagonal matrix will have a different sign depending on whether the permutation related to it is odd or even:

Matrix sizePermutation for
nonzero elementary product of
anti-diagonal matrix
Even or oddSign of elementary product
2 × 2Odd
3 × 3Odd
4 × 4Even+
5 × 5Even+
6 × 6Odd

More precisely, the sign of the elementary product needed to calculate the determinant of an anti-diagonal matrix is related to whether the corresponding triangular number is even or odd. This is because the number of inversions in the permutation for the only nonzero signed elementary product of any anti-diagonal matrix is always equal to the th such number.

See also