# Determinant of symmetric matrix with the main diagonal elements zero

How to prove that the determinant of a symmetric matrix with the main diagonal elements zero and all other elements positive is not zero (i.e., that the matrix is invertible)?

EDIT: OP indicates in a comment that the entries above the diagonal are to be distinct.

-
Just to make sure : do you mean a matrix of this form : $$\begin{bmatrix} 0 & * & * & \dots \\ * & 0 & * & \dots \\ * & * & 0 & \dots \\ \vdots & \vdots & \vdots & \ddots \\ \end{bmatrix}$$ where the stars indicate positive entries? – Patrick Da Silva May 12 '12 at 7:49
Another very important thing : do your coefficients of your matrix lie in the real numbers? Or in some other field? I assume they do because you said "positive". – Patrick Da Silva May 12 '12 at 7:58
Maybe important remark : a computational experiment with all my stars replaced by ones suggest that the matrix with ones everywhere has determinant $n(-1)^n$ where $n$ is the size of the matrix. It also suggests that the determinant of such matrices will alternate signs when $n$ varies. – Patrick Da Silva May 12 '12 at 8:54
@tes: please edit the question to contain all relevant information. Right now one has to read a comment on one of the answers to find a rather significant hypothesis! – Mariano Suárez-Alvarez May 13 '12 at 4:20

\begin{vmatrix} 0 & 2 & 3 & 15 \\ 2 & 0 & 5 & 9 \\ 3 & 5 & 0 & 6 \\ 15 & 9 & 6 & 0 \end{vmatrix}

This matrix has determinant zero.

Added: The determinant in the $4\times 4$ case is quite nice: $$2[(af)^2+(be)^2+(cd)^2]-(af+be+cd)^2.$$ To get integer entries, consider the Diophantine equation $$2[x^2+y^2+z^2]=(x+y+z)^2$$ which has solutions $x=cr^2$, $y=cs^2$, $z=ct^2$ where $r+s=t$. We need to be able to split $x,y,z$ into six distinct factors, two each. I eventually hit upon $c=3$, $r=2$, $s=3$, and $t=5$. This gives $x=12$, $y=27$, $z=75$ which I split as $a=2$, $f=6$, $b=3$, $e=9$, $c=15$, and $d=5$.

-
Brute force? Educated trial-and-error? More where that one came from? – Gerry Myerson May 13 '12 at 5:52
@GerryMyerson Educated guesswork, with the help of Maple. – Byron Schmuland May 13 '12 at 13:08

The assertion is not true. Counter-example.

$$\begin{vmatrix} 0 & 2 & 1 & 1 \\ 2 & 0 & 1 & 1 \\ 1 & 1 & 0 & 2 \\ 1 & 1 & 2 & 0 \end{vmatrix}$$

If entries of the matrix are distinct, then we need to show that rows (or columns) of this matrix are linearly independent. Let's do it with a $4 \times 4$ matrix and then we'll try to generalize.

$$A = \begin{vmatrix} 0 & a & b & c \\ a & 0 & d & e \\ b & d & 0 & f \\ c & e & f & 0 \end{vmatrix}$$ where $a \ne b \ne c \ne d \ne f \ne g$.

Assume that these rows are linearly dependent (i.e. we can write one of the rows in terms of other rows). Without loss of generality, we can write row 1 in terms of other rows. Then one must find $x_1, x_2, x_3$ (not all of them zero) such that,

$$ax_1 + bx_2 + cx_3 = 0 \\ 0x_1 + dx_2 + ex_3 = a \\ dx_1 + 0x_2 + fx_3 = b \\ ex_1 + fx_2 + 0x_3 = c$$

If we can show that there is a contradiction (i.e. there are no such $x_1, x_2, x_3$ which satisfy above system, we prove that rows of this matrix are linearly independent, thus determinant of this matrix in non-zero.

-
I just forget that all non zero element is real positive and different. – tes May 12 '12 at 13:40
Then you try to prove that rows of $n \times n$ matrix are linearly independent. – Dilawar May 12 '12 at 16:59
Dilawar: Bu technically how? – tes May 13 '12 at 1:40
I have updated answer to give you a direction. Though I am still struggling to find a good concise proof. – Dilawar May 13 '12 at 3:38

Here's another way to get a counterexample.

Start with Dilawar's $$\pmatrix{0&2&1&1\cr2&0&1&1\cr1&1&0&2\cr1&1&2&0\cr}$$ It is certainly symmetric, has determinant zero, and positive integer entries (off the diagonal), but the objection is we want all the entries (above the diagonal) to be distinct. If you multiply any row or column by any positive integer, the determinant remains zero (and the off-diagonal entries remain positive integers). To keep the matrix symmetric, if you multiply some column by $a$, you must multiply the corresponding row by $a$ as well. A little bit of experimenting shows that if you multiply the second row and column by 3, the bottom row and column by 4, you get $$\pmatrix{0&6&1&4\cr6&0&3&12\cr1&3&0&8\cr4&12&8&0\cr}$$ and you win.

Not that it's a competition, but I note the entries here are slightly smaller than those in Byron's answer.

-