Determining eigenvalues, eigenvectors of $A\in \mathbb{R}^{n\times n}(n\geq 2)$. 
Let $a$ and $b$ be distinct nonzero real numbers and let $A\in \mathbb{R}^{n\times n}(n\geq 2)$ with each diagonal entry equal to $a$ and each off-diagonal entry equal to $b$. 



*

*Determine all eigenvalues and eigenvectors of $A$ together with their algebraic multiplicities.

*Is $A$ diagonalizable? Why?

*Determine the minimal polynomial of $A$.


My idea: Considering a $4\times 4$ matrix for simplicity:
$\left( \begin{array}{ccccc}
a& b&b & b \\
b &a&b &b \\
b & b&a& b\\
b&b&b&a
\end{array} \right)$ now we perform row operations to transform this matrix into a simple one like this:
$\left( \begin{array}{ccccc}
a-b& b-a& 0 & 0 \\
0 &a-b& b-a&0 \\
0 & 0&a-b & b-a\\
b&b&b&a
\end{array} \right)$ Then find the eigen values and from there eigen vectors? I think eigen values are $a\pm b$ but not sure how to prove it.
Thanks Marvis, your answer is very helpful. 
Can you also comment on my ideas about the rest of the problem: to find eigen vectors we need $x$ such that $(A-\lambda I)x=0.$ So, $\lambda =a-b$ gives me that $(A-\lambda I)=(b)$ a matrix with all entries $b$, thus eigen vector in this case is a $n\times 1$ vector with first entry $n-1$ and the rest of the entries as 1's. So, using the eigen vectors I can find an invertible matrix $P$ and find out if $P^{-1}AP=D$ where $D$ is a diagonal matrix? Then I can get minimal polynomial from the diagonal matrix.
 A: HINT 1:
Your matrix $A$ is $$(a-b)I + b e e^T$$
Can you now compute the eigenvalues?
Move your mouse over the gray area below for another hint.

 HINT 2: Make use of the fact that $\text{eigen}(\lambda A) = \lambda \text{eigen}(A)$ 

Move your mouse over the gray area below for another hint.

 HINT 3: $\text{eigen}(I + \alpha e e^T)$ are $1 + n\alpha$ and $1$($n-1$ times).

Move your mouse over the gray area for the complete answer.

 $$\text{eigen} ((a-b)I + b e e^T) = (a-b) \text{eigen} \left( I + \dfrac{b}{a-b} e e^T\right)$$ Hence, all we need is to find the eigenvalues of $I + \alpha ee^T$, where $\alpha = \dfrac{b}{a-b}$ in our case. Note that $ee^T$ is a rank one matrix and its eigen values are $e^Te = n$ and $n-1$ zeros. If $\lambda$ is an eigen value of $I + \alpha ee^T$, then $$\det (I + \alpha ee^T - \lambda I) = \alpha^n \det \left(ee^T + \dfrac{(1-\lambda)}{\alpha}I \right) = 0$$ This means that $-\dfrac{(1-\lambda)}{\alpha}$ are the eigenvalues of $ee^T$. Hence, we get that $$-\dfrac{(1-\lambda)}{\alpha} = n \text{ or }0 \text{ ($n-1$ times)}.$$ Hence, we get that $$\lambda = 1 + n \alpha, 1 \text{ ($n-1$ times)}$$ Hence, the eigenvalues of the initial matrix are $$\lambda = (a-b) + nb, (a-b) \text{ ($n-1$ times)}$$ The determinant of this matrix is $$((a-b)+nb)(a-b)^{n-1} = (a-b)^n + nb(a-b)^{n-1}$$

A: To take up the last part of the problem: if $\lambda=a-b$ then $A-\lambda I$ is a matrix of rank one, hence, of nullity $n-1$, so the eigenspace for the eigenvalue $\lambda$ has dimension $n-1$. That means that to diagonalize $A$ it's not enough to find one eigenvector; you must find $n-1$ linearly independent eigenvectors; $n-1$ linearly independent vectors in the nullspace of the all-$b$ matrix. Can you do that? 
