Class PositiveDefiniteness

java.lang.Object
org.flag4j.linalg.PositiveDefiniteness

public final class PositiveDefiniteness extends Object

Utility class for checking the positive-(semi-)definiteness of a real or complex matrix.

A matrix \( M \) is positive-definite iff \( \Re\left[x^{H}Mx\right] > 0 \) for any vector \( x \) or equivalently, if all eigenvalues are real and strictly greater than zero.

In the case where \( M \) is real, this simplifies to \( x^{T}Mx > 0 \).

Similarly, a matrix \( M \) is positive-semi-definite iff \( \Re\left[x^{H}Mx\right] >= 0 \) for any vector \( x \) or equivalently, if all eigenvalues are real and greater than or equal to than zero.

  • Method Details

    • isPosDef

      public static boolean isPosDef(Matrix src)
      Checks if the matrix is positive-definite. A matrix \( M \) is positive-definite iff \( x^{T}Mx > 0 \) for any vector \( x \) or equivalently, if all eigenvalues are strictly greater than zero.
      Parameters:
      src - Matrix to check if it is positive-definite.
      Returns:
      true if the matrix is positive-definite; false otherwise.
      See Also:
    • isPosDef

      public static boolean isPosDef(CMatrix src)
      Checks if the matrix is positive-definite. A matrix \( M \) is positive-definite iff \( \Re\left[x^{T}Mx\right] > 0 \) for any vector \( x \) or equivalently, if all eigenvalues are strictly greater than zero.
      Parameters:
      src - Matrix to check if it is positive-definite.
      Returns:
      true if the matrix is positive-definite; false otherwise.
      See Also:
    • isSymmPosDef

      public static boolean isSymmPosDef(Matrix src)
      Checks if the matrix is symmetric positive-definite. A matrix \( M \) is symmetric positive-definite iff the matrix is symmetric and \( x^{H}Mx > 0 \) for any vector \( x \) or equivalently, if all eigenvalues are real and strictly greater than zero.
      Parameters:
      src - Matrix to check if it is positive-definite.
      Returns:
      true if the matrix is positive-definite; false otherwise.
      See Also:
    • isHermPosDef

      public static boolean isHermPosDef(CMatrix src)
      Checks if the matrix is Hermitian positive-definite. A matrix \( M \) is Hermitian positive-definite iff the matrix is Hermitian and \( \Re\left[x^{H}Mx\right] > 0 \) for any vector \( x \) or equivalently, if all eigenvalues are real and strictly greater than zero.
      Parameters:
      src - Matrix to check if it is positive-definite.
      Returns:
      true if the matrix is positive-definite; false otherwise.
      See Also:
    • isPosSemiDef

      public static boolean isPosSemiDef(Matrix src)
      Checks if the matrix is positive semi-definite. A matrix \( M \) is positive-semi-definite iff \( x^{T}Mx >= 0 \) for any vector \( x \), or equivalently, if all eigenvalues are greater than or equal to zero.
      Parameters:
      src - Matrix to check if it is positive semi-definite.
      Returns:
      true if the matrix is positive semi-definite; false otherwise.
      See Also:
    • isPosSemiDef

      public static boolean isPosSemiDef(CMatrix src)
      Checks if the matrix is positive semi-definite. A matrix \( M \) is positive-semi-definite iff \( \Re\left[x^{T}Mx\right] >= 0 \) for any vector \( x \), or equivalently, if all eigenvalues are greater than or equal to zero.
      Parameters:
      src - Matrix to check if it is positive semi-definite.
      Returns:
      true if the matrix is positive semi-definite; false otherwise.
      See Also: