[Math] Determinant of a special $0$-$1$ matrix

determinantlinear algebra

I have a matrix which is of odd order and has exactly two ones in each row and column. The rest of the entries in each row/column are all zero. What will be the determinant of this matrix?

I believe the answer is $\pm 2$. My question is as to how is this derived?

Any help will be appreciated. Thanks.

Best Answer

As described by examples in J.M.'s answer and Paul's comment to Martin's answer, it is possible to get zero and $\pm2$. But that is not all of it. Consider matrices of the form (thanks to Martin for pointing out that I need to use an odd size) $$ A=\pmatrix{P&0&0\cr0&P&0\cr0&0&P\cr}, $$ where $P$ is the matrix from Paul's comment $$ P=\pmatrix{1&1&0\cr1&0&1\cr0&1&1\cr}. $$ Obviously $\det A=-8$, and it is clear that we can get any odd power of two in this way. I believe this covers all the possibilities: $0,\pm2^k$ for some odd natural number $k>0$.

Edit: Here's a proof that $\pm 2^{2t+1}, t\in\mathbf{N},$ and $0$ are all the possibilities. Do the following: Pick one of the 1s on row number $i_1$. Check the location of the other 1 on that row. Let the other 1 on that column be on row $i_2$. Keep doing this horizontal-vertical motion to define a set of rows $i_3,\ldots$. Sooner or later you get back to row number $i_1$. We have thus identified a subset of rows $i_1,\ldots,i_k$ for some integers $k>1$. By reordering the rows, we can bring these to the top. By reordering the columns we get a block looking exactly like the matrices in J.M.'s answer in the top-left corner. That block has determinant $2$ or $0$ as described by J.M. - according to the parity of $k$.

We may or may not have exhausted all the rows of the matrix. If we have not covered all of it, we build another block in a similar fashion. In the end we will have an odd number of blocks with an odd number of rows. The parity of the necessary row/column permutations gives us the sign.