Hi Leo!



 Leockl:

tensor([[1., 2., 3.],
        [2., 5., 6.],
        [3., 6., 9.]], dtype=torch.float64)

…
As you can see one of the eigenvalues is different, ie. 4.05517871e-16 vs. -2.6047e-16
Why is this happening?


In short, this is due to (double-precision) floating-point round-off, and
is to be expected.
The rows of your matrix are linearly dependent – specifically,
tsr_symmetric[2] = 3 * tsr_symmetric[0] – so your matrix
has zero determinant and (at least) one zero eigenvalue.
The two eigenvalues you quote are within double-precision round-off
of zero (and of one another).  That is, within round-off error, they are
equal to one another (and to zero), and not actually different.
Best.
K. Frank