# Determinant of a special $n\times n$ matrix [duplicate]

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$.

• Induction should work fine Jan 7, 2014 at 7:02
• Jul 17, 2018 at 0:56

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$.

• I like your answer better even though we have the same idea. Mine is a bit of a over kill. Jan 7, 2014 at 7:05
• @user44197: Actually, I think yours is nicely minimal, mine is overkill... Jan 7, 2014 at 7:06
• If i want to use this result of wiki I need to prove first that nxn matrix is invertible Jan 7, 2014 at 7:06
• Eigenvalues of $I+A$ are $1$ plus eigenvalues of $A$. Also, non-zero eigenvalues of $XY$ is the same as the non-zero eigenvalues of $YX$. But frankly, I like copper.hat's answer better. Jan 7, 2014 at 7:08
• @RobertLewis: Or the dollar stores :-). Jan 7, 2014 at 7:57

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.

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!!!

• Wow! A plus one! Just like the stuff they sell at Walgreen's, that's nice! Thanks to whoever! And a prosperous New Year to One and All! Jan 7, 2014 at 7:42