Isposdef and eigvals do not agree

The problem is

julia> ishermitian(invA_star)
false

If you instead make A_star Symmetric, it will be faster and work as expected.

julia> A_star = Symmetric([0.5695141296842557 -0.5958323106341032; -0.5958323106341032 5.607107634272117])
2×2 Symmetric{Float64, Matrix{Float64}}:
  0.569514  -0.595832
 -0.595832   5.60711

julia> invA_star = inv(A_star)
2×2 Symmetric{Float64, Matrix{Float64}}:
 1.97551   0.209925
 0.209925  0.200652

julia> isposdef(invA_star)
true
3 Likes