# Finding the eigenvalues for a symmetric matrix where the numbers on the main diagonal are not given but equal [duplicate]

This question already has an answer here:

Given the matrix: $A = \left(\begin{array}{rrr} k & 1 & 1\\ 1 & k & 1\\ 1 & 1 & k \end{array}\right)$ where $k$ is a real constant/number

Generally we know that the sum of the elements on the main diagonal equals the sum of all the eigenvalues: $tr(A) = \lambda{_1} + \lambda{_2} + \lambda{_3} = 3k$

Since this matrix is symmetric we know that the following holds true: $A^T = A$

Also since all of the rowsums are the same we can assume that the rowsum is equal to one of the eigenvalues, so we set: $\lambda{_1} = k + 2$

Using the identity matrix $I = \left(\begin{array}{rrr} 1 & 0 & 0\\ 0 & 1 & 0\\ 0 & 0 & 1 \end{array}\right)$

when solving $(A - \lambda{_1} I) = 0$ we find the first eigenvector to be $\vec{v_{1}} = \left(\begin{array}{rrr} 1 \\ 1 \\ 1 \end{array}\right).$

Now my question is how can I find the two remaining eigenvalues?

## marked as duplicate by Marc van Leeuwen linear-algebra StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Apr 15 '16 at 15:28

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

• Here's a nice trick that will enable you to solve the problem: prove that $\lambda$ is an eigenvalue of $A$ with eigenvector $v$ iff $\lambda-a$ is an eigenvalue of $A-aI$ with eigenvector $v$ (where $a$ is some scalar). Then you can use $a=k$ or $a=k-1$. – Guy Apr 15 '16 at 14:47
• Take 1, -1, 0 and 1, 0, -1 – akech Apr 15 '16 at 14:48

## 3 Answers

The $n\times n$ matrix of all ones, what I will denote as $\text{Ones}_{n}$ has the eigenvalues $0$ and $n$ with multiplicities (geometric and algebraic) $n-1$ and $1$ respectively.

To see this, note that in $\text{Ones}_n$, every column is the same and nonzero, thus $rank(\text{Ones}_n)=1$.

By the rank-nullity theorem, we know then that $nullity(\text{Ones}_n)=n-1 = nullity(\text{Ones}_n-0I) = geomu_{\lambda=0}$, therefore the geometric multiplicity of $\lambda=0$ as an eigenvalue of $\text{Ones}_n$ is $n-1$ and its algebraic multiplicity is either $n-1$ or $n$.

Since $trace(\text{Ones}_n)=n$ and $trace(\text{Ones}_n)=\sum \lambda$, we know that $0$ cannot be the only eigenvalue of $\text{Ones}_n$. Thus $\lambda=0$ is an eigenvalue of $\text{Ones}_n$ of multiplicity $n-1$, and the remaining eigenvalue must be $\lambda=n$ of multiplicity $1$.

The corresponding eigenspaces can be quickly seen to be $E_{\lambda=0} = span\{v_2,v_3,\dots,v_n\}$ where $v_i$ is the vector with the first and $i^{th}$ entries equal to one and negative one respectively and all other entries equal to zero, and $E_{\lambda=n} = span\{u\}$ where $u$ is the vector of all ones.

Now that we know the eigenvalues and eigenspaces of $\text{Ones}_n$, note that your matrix can be written as $\text{Ones}_n+(k-1)I$

Note further, that for any eigenvector, $v$ with corresponding eigenvalue $\lambda$ for the matrix $A$, it will again be an eigenvector for a polynomial of matrix $A$, $f(A)$, with corresponding eigenvalue $f(\lambda)$.

In your specific case, to see this, let $v$ be an eigenvector of $\text{Ones}_n$ with eigenvalue $\lambda$.

$(\text{Ones}_n+(k-1)I)v = \text{Ones}_nv + (k-1)Iv = \lambda v + (k-1)v = (\lambda+k-1)v$

This implies that the eigenvalues will be $k-1$ with multiplicity $n-1$ and $n+k-1$ with multiplicity $1$ with the same respective eigenspaces as before.

By some observation, we see that $k-1$ and $k+2$ are the only two distinct eigenvalues of $A$, as the following verifications.

1. For $\lambda=k+2$, then $\begin{pmatrix}1\\1\\1\end{pmatrix}$ is an eigenvector of $A$ which is what you found.

2. For $\lambda=k-1$, we see that the matrix $A-\lambda I=\begin{pmatrix}1&1&1\\1&1&1\\1&1&1\end{pmatrix}$ has rank $1$. Thus the dimension of the eigenspace equals ${\rm nullity}(A-\lambda I)=3-1=2$. So we only have the two distinct eigenvalues.

Hint The form of the matrix $A$ suggests we can think of it as $$A = \pmatrix{1 & 1 & 1 \\ 1 & 1 & 1 \\ 1 & 1 & 1} + (k - 1) I .$$

The first matrix on the r.h.s., which we can write as $A - (k - 1) I$, has rank $1$.