Determinant of a special $n\times n$ matrix Compute the determinant of the nun matrix:
$$
\begin{pmatrix}
2 &  1  & \ldots & 1 \\
1  &  2 & \ldots & 1\\
\vdots & \vdots & \ddots & \vdots\\
1  &   1       &\ldots & 2
\end{pmatrix}
$$
For $n=2$, I have$$
\begin{pmatrix}
2 &  1   \\
1  &  2 
\end{pmatrix}
$$ 
Then $det = 3$.
For $n=3$, we have
$$
\begin{pmatrix}
2 &  1 & 1\\
1  &  2 & 1\\
1 & 1 & 2 \\
\end{pmatrix}
$$
Then $det = 4$.
For $n=4$ again we have
$$
\begin{pmatrix}
2 &  1  & 1 & 1 \\
1  &  2 & 1 & 1\\
1 & 1 & 2 & 1\\
1  &   1  & 1 & 2
\end{pmatrix}
$$
Then $det = 5$
How can I prove that the determinant of nun matrix is $n+1$.
 A: Let $$v=(1,1,1,1...1)^T$$
Your matrix is $$
I + v v^T$$
This has $n-1$ eigenvalues equal to $1$ and one with value $n+1$. Hence the result.
A: Yet another way to do it:  note that the matrices in question are of the form $I + J$, where $J$ is the matrix every entry of which is $1$.  We have $J^2 = nJ$ by an easy calculation; thus the eigenvalues of $J$ are $0$ and $n$.  The eigenspace corresponding to $n$ is the one dimensional subspace spanned by the vector $v = (1, 1, ... , 1)^T$; since $\ker J$ consists of those vectors $w = (w_1, w_2, . . ., w_n)^T$ with $\sum_1^n w_i = 0$, the eigenspace corresponding to $0$ is of dimension $n - 1$; these observations imply the when $J$, being symmetric, is diagonalized one obtains a matrix with $n$ occurring at precisely one place on the diagonal, and zeroes everywhere else.  Thus we see that the multiplicity of $0$ as an eigenvalue is $n - 1$; that of $n$ is $1$.  Now use the fact that since $Jx = ax \Leftrightarrow (J + I)x = (a + 1)x$ to see that the eigenvalues of $I + J$ are $n + 1$, of multiplicity $1$, and $1$ of multiplicity $n - 1$.  Thus $\det (J + I)$, being the product of these eigenvalues, is $n + 1$.
Hope this helps.  Happy New Year,
and as always,
Fiat Lux!!!
A: A standard result (http://en.wikipedia.org/wiki/Matrix_determinant_lemma) is $\det(I+AB) = \det(I+BA)$.
Since the matrix above can be written as $I+ e e^T$, where $e$ is a vector of ones, we have $\det(I+ e e^T) = \det(1+ e^T e) = 1+e^Te = n+1$.
