TITLE: Why is the determinant of the all one matrix minus the identity matrix n-1?
QUESTION [6 upvotes]: Context (skippable)
I was asked (by a friend who is preparing for an exam) whether there was a special trick to compute the determinant of the following matrix. I didn't see anything beyond using the standard computations (like using "Gauss" to compute the value).
Then I asked another math student who, while quite bright, is a bit rusty in linear algebra and using sagemath we empirically found the below formula. Of course we were both confused as to a) whether it actually always holds and b) why it holds.
Actual question
Let $n\in\mathbb N$ be a positive integer. Let $I_n\in\mathbb R^{n\times n}$ be the identity matrix and let $1_n\in\mathbb R^{n\times n}$ be the all-one matrix, that is, the matrix for which every entry is $1$.
Now I am confused as to why the following (empirically found) statement holds (or does not):
$$\forall n\in\mathbb N:\det(1_n-I_n)=(-1)^{n-1}(n-1)$$

For illustration purposes, here is the matrix for $n=4$ (with the determinant being $-3$):
\begin{pmatrix}
0&1&1&1\\
1&0&1&1\\
1&1&0&1\\
1&1&1&0
\end{pmatrix}

REPLY [2 votes]: The other answers offer more insight into linear algebra. But you obviously wondered about whether you could use Gaussian elimination in some way — this is just to show you one possible way. Returning to your case $n=4$ as a worked example:
\begin{pmatrix}
0&1&1&1\\
1&0&1&1\\
1&1&0&1\\
1&1&1&0
\end{pmatrix}
It would be nice to procure a row or column in which there is only one non-zero entry. Let us try to eliminate all the ones that occupy the first $n-1=3$ columns in the bottom row. Above each of these ones sit $n-1=3$ entries, including one of the zeros on the diagonal, so there are always $n-2$ ones and one zero. On the other hand, above the zero in the bottom right there are $n-1$ ones. If we added all rows bar the bottom one, we get 
$$R_1 + \dots + R_{n-1}= \begin{pmatrix}
n-2&\cdots&n-2&n-1\\
\end{pmatrix}$$
Hence we subtract from the final row $\frac{1}{n-2}(R_1+\dots+R_{n-1})$ to obtain
\begin{pmatrix}
0&1&1&1\\
1&0&1&1\\
1&1&0&1\\
0&0&0&-\frac{n-1}{n-2}
\end{pmatrix}
where in this particular case, the bottom right entry would be $-\frac{n-1}{n-2}=-\frac{3}{2}$. If we then perform a Laplace (cofactor) expansion along the bottom row, we will need to find the determinant of the submatrix occupying the first $n-1$ rows and columns. But that submatrix is $1_{n-1} - I_{n-1}$, so we have reduced the problem to the previous case. The proof can therefore be carried out by induction.
The base case is easy enough to prove. And assuming the result is true for smaller cases, the argument outlined above gives:
$$\det(1_n - I_n) = (-1)^{n+n}\left(-\frac{n-1}{n-2}\right) \det (1_{n-1} - I_{n-1}) = (1)\left(-\frac{n-1}{n-2}\right)\left((-1)^{n-2}(n-2)\right)$$
which gives the required $(-1)^{n-1}(n-1)$.