TITLE: Determinant of a special $0$-$1$ matrix
QUESTION [5 upvotes]: 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.

REPLY [5 votes]: 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.

REPLY [4 votes]: I assume for the purposes of this answer that your matrices take the form
$$\begin{pmatrix}1&&&&1\\1&1&&&\\&1&1&&\\&&\ddots&\ddots&\\&&&1&1\end{pmatrix}=\mathbf H+\mathbf I$$
$\mathbf H$ is a Frobenius companion matrix, with characteristic polynomial $(-1)^n(x^n-1)$. The characteristic polynomial of $\mathbf H+\mathbf I$ is $p(x)=(-1)^n((x-1)^n-1)$ Thus, $\det(\mathbf H+\mathbf I)=p(0)=(-1)^n((-1)^n-1)=1-(-1)^n$.
The matrix itself is a special case of what is sometimes referred to as a "Forsythe matrix". It can be generated in MATLAB with the command gallery('forsythe',n,1,1).

Consider also the matrices
$$\mathbf B=\begin{pmatrix}1&1&&&\\1&0&1&&\\&1&\ddots&\ddots&\\&&\ddots&0&1\\&&&1&1\end{pmatrix}$$
It can be shown (though the relationship of tridiagonal determinants and three-term difference equations) that the characteristic polynomials of these matrices are given by
$$\det(\mathbf B-\lambda\mathbf I)=(-1)^n (\lambda-2)\frac{\sin\left(n\arccos\frac{\lambda}{2}\right)}{\sin\left(\arccos\frac{\lambda}{2}\right)}=(-1)^n (\lambda-2)U_{n-1}\left(\frac{\lambda}{2}\right)$$
where $U_k(x)$ is the Chebyshev polynomial of the second kind. $\det\mathbf B$ is thus given by $2(-1)^{n+1}\sin\dfrac{n\pi}{2}$.