linear algebra characteristic polynomial, matrix rank, Matrix similarity I'm having a problem solving the following assignment, can someone please help me?
I'm given 2 $n \times n$ matrices, $n>1$.
A=$\begin{bmatrix}1 & .& .& .& .& .& 1\\. &&&&&&.\\.&&&&&&.\\.&&&&&&.\\.&&&&&&.\\.&&&&&&.\\1 &.&.&.&.&.&1\end{bmatrix}$
B=$\begin{bmatrix}n & 0& & .& .& 0& 0\\0 &0&&&&&.\\.&&&&&&.\\.&&&&&&.\\.&&&&&&.\\.&&&&&&.\\0 &.&.&.&.&.&0\end{bmatrix}$
1) I need to find the characteristic polynomial of A using A's Rank.
2) I need to prove that the Coefficient of $t^n-1$ in the characteristic polynomial of A is equal -(trA).
3) I need to prove that A and B are similar matrices and find P so that $B = P^{-1}AP$
*All of A's entries = 1.
 A: For A you can use the fact that if the sum of all the rows is equal, then this sum, $n$ is eigenvalue, and since the rank is 1, it's mean that $\dim\ker A = n-1$ which means that $0$ is eigenvalue from order $n-1$.
from that you can conclude that the characteristic polynomial of $A$ is $$p(\lambda)=\lambda ^ {n-1}(\lambda -n)$$  
A: $A$ is symmetric, so the algebraic multiplicity of an eigenvalue is equal to the geometric multiplicity. 
It is not hard to see that, for any $x$, $Ax = c(1,1,\dots,1)^T$ for some constant $c$. Thus, its rank is $1$ (corresponding to eigenvalue $\lambda = ...?$) and the other $n-1$ eigenvalues are $0$. Such a matrix has characteristic polynomial
$$
(t - \lambda)(t - 0)^{n-1} = t^{n-1}(t - \lambda)
$$
For question 2, it is easy to directly calculate the trace, and you should now have the characteristic polynomial, so just verify.
To find a similarity transform, you can find all the eigenvectors (meaning, find $n$ linearly independent eigenvectors) of $A$, or of $B$. One will be much easier than the other.
