Since the eigenvalues in e are the roots of the characteristic polynomial of A, use poly to determine the characteristic polynomial from the values in e.

The algorithms employed for poly and roots illustrate
an interesting aspect of the modern approach to eigenvalue computation. poly(A) generates
the characteristic polynomial of A, and roots(poly(A)) finds
the roots of that polynomial, which are the eigenvalues of A.
But both poly and roots use eig,
which is based on similarity transformations. The classical approach,
which characterizes eigenvalues as roots of the characteristic polynomial,
is actually reversed.

If A is an n-by-n matrix, poly(A) produces
the coefficients p(1) through p(n+1),
with p(1)=1,
in

It is possible to prove that poly(A) produces
the coefficients in the characteristic polynomial of a matrix within
roundoff error of A. This is true even if the eigenvalues
of A are badly conditioned. The traditional algorithms
for obtaining the characteristic polynomial do not use the eigenvalues,
and do not have such satisfactory numerical properties.