# How to determine the characteristic polynomial of the $4\times4$ real matrix of ones? [duplicate]

$$\left[\begin{array}{l}1&1&1&1\\1&1&1&1\\1&1&1&1\\1&1&1&1\end{array}\right]$$

I am having difficulties with calculating this. Currently I'm stuck at finding the determinant of the following matrix:

$$\left[\begin{array}{l}\lambda-1&-1&-1&-1\\-1&\lambda-1&-1&-1\\-1&-1&\lambda-1&-1\\-1&-1&-1&\lambda-1\end{array}\right]$$

Is there a "smart" way/trick to get the result or should I just crunch the numbers through Gaussian elimination? Normally it is not that difficult to do this, but if all the elements of the matrix are the same, it somehow got me confused.

## marked as duplicate by Dietrich Burde, Arnaud D., Han de Bruijn, John Hughes, Siong Thye GohJan 17 '18 at 17:46

• You first matrix is not a square matrix. For the determinant of a matrix with $a$ on the diagonal, and $b$ elsewhere, there is a formula! Have a look at MSE. – Dietrich Burde Jan 17 '18 at 16:03
• Here is the popular post @DietrichBurde is referring to:math.stackexchange.com/questions/86644/…. – StubbornAtom Jan 17 '18 at 16:06
• @StubbornAtom Yes, exactly! This post is also recommended at this question. – Dietrich Burde Jan 17 '18 at 16:08

Consider any $n \times n$ rank-$1$ matrix $A$ as follows: one of its eigenvalues is its trace and the remaining eigenvalues are zero. Hence, the characteristic polynomial is $$x^{n-1}(x-\mbox{Tr}(A))$$ and the spectrum is $\{0,4\}$.
• @Zanzi The eigenvalues can be found by inspection. $A$’s column space is obviously one-dimensional, so that immediately gives you three of the eigenvalues, and you can always find the last eigenvalue via the trace. – amd Jan 17 '18 at 21:01
$$\begin{array}{rl} \det (s \mathrm I_n - 1_n 1_n^\top) &= \det \left( s \cdot \left( \mathrm I_n - s^{-1}1_n 1_n^\top \right) \right)\\ &= s^n \cdot \det \left( \mathrm I_n - s^{-1}1_n 1_n^\top \right)\\ &= s^n \cdot \left( 1 - n \, s^{-1} \right)\\ &= s^{n-1} \left( s-n \right)\end{array}$$