# Showing that $M$ and $N$ will have same eigenvalues. [duplicate]

Today I came accross to this problem. And after some study, I have derived the following solution. Request to the experts, kindly let me know if I have made any mistakes.

The question is: if $M, N$ be $n$ square matrices such that tr$(M^k)=$ tr$(N^k)$ for all $k=1, 2, \cdots, n$ then prove that $M$ and $N$ will have same eigenvalues. What about this one?

We know that if $\psi_A(x)=x^n+c_{n-1}x^{n-1}+c_{n-2}x^{n-2}+\cdots+c_1x+(-1)^n|A|I_n$ be characteristic polynomial of $A$, then the coefficients are given by $$c_{n-m}=\frac{(-1)^m}{m}\left| \begin{array}{ccccc} t_1 & m-1 & 0 & \cdots & 0 \\ t_2 & t_1 & m-2 & \cdots & 0 \\ \vdots & \vdots & & & \vdots \\ t_{m-1} & t_{m-2} & t_2 & t_1 & 1 \\ t_m & t_{m-1} & t_3 & t_2 & t_1 \\ \end{array} \right|$$ where $t_r:=$ tr$(A^r)$.

Assume that $\psi_{M}(x)=x^n+a_{n-1}x^{n-1}+a_{n-2}x^{n-2}+\cdots+a_1x+(-1)^n|M|I_n$ and $\psi_N(x)=x^n+b_{n-1}x^{n-1}+b_{n-2}x^{n-2}+\cdots+b_1x+(-1)^n|N|I_n$. Then $$a_r=b_r$$ (by using tr$(M^k)=$ tr$(N^k)$ and the above determinant).

Hence $\psi_M(x)=\psi_N(x)$ which means $M$ and $N$ will have same 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(); } ); }); }); May 18 '15 at 8:20

Here is an elementary solution that I like the most. I will assume that the ground field contains $\mathbb{Q}$, otherwise it has charateristic $p$, and then, $A=I_p$ and $B=0$ is a counterexample. I will also say that $u$ is a root of polynomial $f$ of zero multiplicity if $f(u)\neq0$.
Let $S(A)$ denote the spectrum of a matrix $A$, and suppose $\{\lambda_1,...,\lambda_t\}=S(M)\cup S(N)$. Assume $\lambda_i$ is a root of multiplicity $x_i$ (respectively, $a_i$) in characteristic polynomial of $M$ (respectively, $N$). Then, we have $\sum_ix_i\lambda_i^k=\sum_ia_i\lambda_i^k$ for any $k=\{0,...,t-1\}$. The matrix of this linear system is Vandermonde, so the solution $x_i$ is unique, and one has $x_i=a_i$.