Find the general formula to compute $\det(A_n)$ and then proof by induction, problem with the proof... I have to find the general formula to compute the determinant of a matrix which has all the diagonal elements $0$ and all non-diagonal elements $1$. 
I have calculated the $\det$ starting from $n=1$, $n=2$, $n=3$, $n=4$ and $n=5$
For $n=1$,  $\det(A) =  0$
For $n=2$,  $\det(A) = -1$
For $n=3$,  $\det(A) =  2$
For $n=4$,  $\det(A) = -3$
For $n=5$,  $\det(A) =  4$
For $n=6$,  $\det(A) = -5$
From this pattern I saw that every time the value is $n-1$ and the sign is alternating, so I created this general formula based on the results I got:
$$\det(A) = (-1)^{n+1} \cdot (n-1)$$
Now I need to proof this by induction, when I do the base case $n=0$, I get $0=1$, does that mean that I should only start from $n\ge 1$ since there is no matrix with dimension $0$, or I am doing something wrong which I cannot see? 
 A: You no need to find the the determinant of the above matrix by induction if you know about the matrix $J_n$ (a $n\times n$ matrix whose all entries are $1$). Basically you have to required the determinant of the matrix $J_n-I$.
The matrix $J_n$ have eigenvalues $0$ with multiplicity $n-1$ and $n$ with multiplicity $1$. So the eigenvalues of $J_n-I$ are  $-1$ with multiplicity $n-1$ and $n-1$ with multiplicity $1$. So $\det(J_n-I)=(-1)^{n-1}(n-1)$.
Although your intuition using mathematical induction is correct. 
A: $A=J-I$, where $J$ is the matrix with $1$ in all entries.
Elementary row operations convert $J$ to a matrix of zeros, except for the first row, which is all ones. Therefore, $J$ has rank $1$. Thus, $0$ is an eigenvalue of $J$ with multiplicity $n−1$. Also, the vector with all ones is an eigenvector of $J$ with eigenvalue $n$, forcibly with multiplicity $1$.
Thus, the eigenvalues of $J$ are $n$ with multiplicity $1$ and $0$ with multiplicity $n−1$.
Since $A=P(J)$, where $P(x)=x-1$, the eigenvalues of $A$ are $P(\lambda)=\lambda-1$, where $\lambda$ is an eigenvalue of $J$. Therefore, the eigenvalues of $A$ are $n-1$ with multiplicity $1$ and $0-1$ with multiplicity $n−1$, and so the determinant of $A$ is $(n-1)^1(-1)^{n-1}$.
