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}