Proof that theorems about trace of matrix : Can somebody help me about proofs of this theorems
A is an nxn matrix and $\ A^2$ = mA then,
tr(A) = m rank(A) .
A is an nxn matrix and k is a positive integer then,
tr($\ A^k$) =  $\sum_{i=1}^n λ_i^k$  where λ's are the characteristic roots of A.
Thanks for helping...
 A: Since $A^2=mA$ then the polynomial $P=x(x-m)$ annihilates $A$ and then 
$$\operatorname{sp}(A)\subset \{0,m\}$$


*

*if $m=0$ then the only eigenvalue of $A$ is $0$ hence $A$ is nilpotent and the equality $\operatorname{tr} A=m\operatorname{rank}A$ is trivial.

*if $m\ne0$ then if $\operatorname{sp}(A)= \{m\}$ then $A=mI_n$ so $\operatorname{tr} A=nm=m\operatorname{rank}A$ and if $\operatorname{sp}(A)= \{0\}$ then $A$ is nilpotent with index say $p$ so we have


$$0=A^p=mA^{p-1}\implies A=0$$
and the equality is trivial. Finally if $\operatorname{sp}(A)= \{0,m\}$ then the rank of $A$ is the multiplicity of $m$ and the equality is also clear.
For the second result: we know that every matrix is triangularizable over $\Bbb C$
so there's an invertible matrix $P$ such that
$$A=P\begin{pmatrix}\lambda_1&\times&\cdots&\times
\\&\ddots&\ddots&\vdots\\
&\Large0&\ddots&\times\\
&&&\lambda_n\end{pmatrix}P^{-1}$$
hence
$$A^k=P\begin{pmatrix}\lambda^k_1&\times&\cdots&\times
\\&\ddots&\ddots&\vdots\\
&\Large0&\ddots&\times\\
&&&\lambda^k_n\end{pmatrix}P^{-1}$$
and the result follows easily.
A: First of all, the trace of a matrix is invariant by similarity. That means you can transform every matrix in his Jordan form, where the trace is the sum of all eigenvalues, with their algebraic multiplicity.
Now, if $A^2=mA$, it means that his minimal polynomial divides $x^2-mx=x(x-m)$, so $A$ has only $0$ and $m$ as eigenvalues, and $A$ is diagonalizable.
Thus, the algebraic (and geometric) multiplicity of the null eigenvelue is the dimension of his Ker, and the multiplicity of $m$ is the rank, so $Tr(A)=m*rk(A)$.
If $A=MJM^{-1}$, with $J$ in Jordan form, then $A^k=MJ^kM^{-1}$. Since $J$ is triangular, $J^k$ has on the main diagonal the $k$-th powers of the diagonal elements of $J$, meaning that  $tr(A^k)=\sum_{i=1}^n λ_i^k$
