Skip to content

isposdef(E::Eigen) is incorrect #1187

@sztal

Description

@sztal

Hi,

The problem is as in the title. In short, isposdef method for Eigen factorization is incorrect. It does not check for hermiticity/symmetricity and only looks at the eigenvalues, which is of course not enough.

using LinearAlgebra
T = UpperTriangular(rand(3, 3) .+ 1)
isposdef(T)  # False
isposdef(eigen(T))  # True

Best!

Version info

Julia Version 1.11.3
Commit d63adeda50d (2025-01-21 19:42 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 16 × AMD Ryzen 9 5900HX with Radeon Graphics
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, znver3)
Threads: 1 default, 0 interactive, 1 GC (on 16 virtual cores)
Environment:
  JULIA_PROJECT = @.
  JULIA_PKG_PRESERVE_TIERED_INSTALLED = true
  JULIA_REVISE = manual

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions