Similar matrix for numerical computations

70 Views Asked by At

I compute numerically a symmetric matrix $W$ from the flow of a ode. I have to check numerically if this matrix is definite-positive. Two cases:

  • either I use the Cholesky algorithm :ok
  • or I compute the eigenvalues. It appears that in theory, $W$ has zero eigenvalues, let say $\lambda$ and numerically I can check that when I increase the precision (absolute and relative) of the ode integrator, $\lambda$ becomes smaller while the other eigenvalues, let say $\gamma$, don't change. However, the ratio of $\frac{\lambda }{ \min(\gamma)}$ is not small ($10^{-7}$) with respect to the machine precision ($10^{-22}$).

Question: How can I find a similar matrix $S$ to $W$ so that $S$ is well conditionned to compute the eigenvalues (in the sense that $\lambda / \gamma$ will be closer to the machine precision) ?