# Is a square matrix whose diagonal and antidiagonal elements are all zero always singular?

Consider an $n\times n$ matrix whose primary and secondary diagonal elements are all zero. Does it necessarily follow that the determinant vanishes for these matrices?

When $n=1,2,3,4$, the matrix is necessarily singular.

-
@Rahul: The secondary diagonal is the one that goes from lower left to upper right; so a $2\times2$ matrix with the given property has all zero entries. – joriki Sep 28 '11 at 20:17
@joriki: Huh. I'm more used to calling it the antidiagonal myself... – J. M. Sep 29 '11 at 0:25

This is already false for $n=4$. For instance, the matrix

$$\begin{pmatrix}0&1&1&0\\1&0&0&1\\1&0&0&-1\\0&1&-1&0\end{pmatrix}$$

is not singular.

-
Oh, I made a mistake with my computations. Thank you for your example. – user16843 Sep 28 '11 at 20:26

For the $4\times 4$ case, you can simplify the determinant a bit:

$$\begin{vmatrix}&a&b&\\c&&&f\\d&&&g\\&h&k&\end{vmatrix}=\begin{vmatrix}a&b\\h&k\end{vmatrix}\begin{vmatrix}c&f\\d&g\end{vmatrix}$$

and one can certainly set things up such that both $2\times 2$ determinants do not evaluate to $0$.

-
+1 for especially good representations.... – Tapu Dec 31 '11 at 7:51
Note that one can permute the $4\times 4$ determinant into a block diagonal form with $2\times 2$ blocks, from which the form on the right is obtained. – J. M. Dec 31 '11 at 7:56

Why not simply consider the permutation matrix $\begin{pmatrix}0&1&0&0\\1&0&0&0\\0&0&0&1\\0&0&1&0\end{pmatrix}$?

-
Ah, simplicity itself! :-) – TenaliRaman Nov 25 '12 at 12:16

In general, NO.

For $2\times2$, such a matrix will itself be zero.

For $3\times3$, the matrix's 1st and 3rd rows will always be linearly dependent.

$\begin{pmatrix}0&a&0\\b&0&c\\0&d&0\end{pmatrix}$

When we have $n\geq 4$ then we can build a matrix which has all rows linearly independent; examples are given by @joriki, @J.M., @user1551.

Matrix has determinant zero iff its rows are linearly independent.

-
It's good that you made explicit why it is impossible in the $2$-by-$2$ and $3$-by-$3$ cases (and of course also in the $1$-by-$1$ case). – Jonas Meyer Dec 31 '11 at 4:53

A permutation of $\{1,2,\ldots,n\}$ corresponds to an $n$-by-$n$ permutation matrix whose entries are $0$ or $1$, with a $1$ in position $ij$ precisely when the permutation sends $i$ to $j$. Permutation matrices are characterized as having exactly one $1$ in each row and in each column, and being $0$ elsewhere. Each permutation matrix is invertible, and its inverse is the permutation matrix of the inverse permutation, which is also the transpose of the matrix. (Its determinant is $1$ or $-1$, corresponding to whether the permutation is even or odd, respectively.)

A permutation $\sigma$ corresponds to a matrix with only $0$s on the diagonal and antidiagonal as long as $\sigma(k)\neq k$ for all $k$ and $\sigma(k)\neq n+1-k$ for all $k$. In case $n$ is even and greater than $2$, you always get an example by swapping $k$ and $k+1$ for each odd $k$, and the $n=4$ case of this is given in user1551's answer. If $n$ is odd and greater than $3$, you can take $\sigma(1)=2$, $\sigma(2)=3$, $\sigma(3)=1$, and swap $k$ and $k+1$ for each even $k$ greater than $3$. A $5$-by-$5$ example is given by

$$\begin{pmatrix}0&1&0&0&0\\0&0&1&0&0\\1&0&0&0&0\\0&0&0&0&1\\0&0&0&1&0\end{pmatrix}.$$

-