# On matrices that almost have the same eigenvalues

Let $A$ and $B$ be two $4$ by $4$ matrices. Using Newton's identites, one can prove that if $$det(A) = det(B)$$ and $$tr(A^i) = tr(B^i)$$ for $i=1,2,3$, then $A$ and $B$ have the same characteristic polynomial, thus the same eigenvalues.

I'm interested in pairs of matrices $A$ and $B$ that satisfy all those equations except the last one, i.e. $$det(A)=det(B)$$ $$tr(A)=tr(B)$$ $$tr(A^2)=tr(B^2)$$ but $tr(A^3) \neq tr(B^3)$.

Does anyone know how to generate such matrices? Have they ever been studied? A reference would be nice.

Thank you, Malik

-
Isn't that just saying that the characteristic poly's of A and B differ only in the linear term? That gives an easy way to generate such matrices :) –  t3suji Jun 17 '10 at 16:27
Yes I was making some additional assumptions unthinkingly t3suji, thanks. Maybe I'll have another go if Malik tells us what kind of properties he/she is interested in. –  Q.Q.J. Jun 17 '10 at 20:14

Such matrices will have a characteristic polynomial $z^4+a_3z^3+a_2z^2+a_1z+a_0$ with the same $a_3$, $a_2$, $a_0$ but distinct $a_1$. You can generate a plenty of diagonal such matrices by picking roots of such two polynomials. I cannot vouch that they were not studied but I am pretty certain that nothing groundbreaking came out of such studies.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9580684304237366, "perplexity": 294.80803021850693}, "config": {"markdown_headings": true, "markdown_code": false, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2015-35/segments/1440644064538.25/warc/CC-MAIN-20150827025424-00350-ip-10-171-96-226.ec2.internal.warc.gz"}