How to compute the determinant of the following matrix:
$ \left( \begin{array}{cccccccc} 2 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\ 1 & 2 & 1 & 1 & 1 & 1 & 1 & 1 \\ 1 & 1 & 2 & 1 & 1 & 1 & 1 & 1 \\ 1 & 1 & 1 & 2 & 1 & 1 & 1 & 1 \\ 1 & 1 & 1 & 1 & 2 & 1 & 1 & 1 \\ 1 & 1 & 1 & 1 & 1 & 2 & 1 & 1 \\ 1 & 1 & 1 & 1 & 1 & 1 & 2 & 1 \\ 1 & 1 & 1 & 1 & 1 & 1 & 1 & 2 \end{array} \right)$
you can write your matrix as $$I + uu^T, \det(I + uu^T) = n+1.$$ we have $u = (1,1,1, \ldots, 1)$ and the eigenvalues of $uu^T$ are $n, 0, 0, \ldots , 0.$ that means the eigenvalues of $I + uu^T$ are $n+1, 1, 1, \cdots, 1.$ so the determinant is $n+1.$