# Math Help - counterexample for matrices

1. ## counterexample for matrices

A,B are n*n matrices over C.

give a counterexample satisfies trace(A)=trace(B), det(A)=det(B)
but their eigenvalues are not the same.

2. Originally Posted by szpengchao
A,B are n*n matrices over C.

give a counterexample satisfies trace(A)=trace(B), det(A)=det(B)
but their eigenvalues are not the same.
Assume A is diagonal and that:

trace(A)=x and det(A)=y

This gives you two equations in the diagonal elements (the eigen values) of A. Now assume A is a 3x3 matrix and show that the two equations have multiple solutions (and find two or more of them for some convienient choice of x and y).

.

3. Originally Posted by szpengchao
A,B are n*n matrices over C.

give a counterexample satisfies trace(A)=trace(B), det(A)=det(B)
but their eigenvalues are not the same.
Let diag(d1,d2,...dn) denote a diagonal matrix with d1, d2,... dn on the diagonal in that order. Now choose A = diag(1,1,0,0,0,...,0), B = diag(2,0,0,..,0) to construct the example.