The roots of the characteristic polynomial and the eigenvalues are not the same
问题 This is matrix B B = [1 2 0 ; 2 4 6 ; 0 6 5] The result of eig(B) is: {-2.2240, 1.5109, 10.7131} and the characteristic polynomial of B by this link is syms x polyB = charpoly(B,x) x^3 - 10*x^2 - 11*x + 36 but the answer of solve(polyB) is 133/(9*(3^(1/2)*5492^(1/2)*(i/3) + 1009/27)^(1/3)) + ((3^(1/2)*5492^(1/2)*i)/3 + 1009/27)^(1/3) + 10/3 (3^(1/2)*(133/(9*(3^(1/2)*5492^(1/2)*(i/3) + 1009/27)^(1/3)) - ((3^(1/2)*5492^(1/2)*i)/3 + 1009/27)^(1/3))*i)/2 - 133/(18*(3^(1/2)*5492^(1/2)*(i/3) + 1009