Matlab - eigenvalue doesn't zero the characteristic polynomial

73 Views Asked by At

I created a symmetric $21 \times 21$ matrix $A$ with condition number $7.5044$. I wrote the following code:

syms x;
AS = sym(A);
polyA = charpoly(AS,x);
solve(polyA);

and this is the result

  93.988842796147505104718718233034
  63.318989852350135397493503048259
  38.392863684000190231816927188875
  57.023973670819117411135094232301
  20.964197497113106525263127789941
  52.100859003607712279511955297751
  14.457776205660758291480361189262
  72.543368263184623095490492872815
 -19.500133944896490949432003697463
  65.733078713316290701540791543043
  71.723898977718034735792925663278
  57.262150118578505531059649955477
  27.620774843148443240592651344762
  49.356126883789838887152595264487
  51.847578071455088288616446818711
  70.832873937409296415793129090208
  12.524474726415933018910355256388
  37.721878707889458815773572522044
 -39.123034260347914003761194641743
  82.618237465274092122200710770248
  12.591224787366274858850190258322

I expect the following code to be close to zero

double(subs(polyA,37.721878707889458815773572522044))

But the answer of the matlab is -2.2191e+11, other eigenvalues generate other big numbers as well. Why the eigenvalues don't zero the polyA while the condition number is just $\approx 7$?