Datalens.ai
← All algorithms

DECOMPOSITION

hessenberg

Compute Hessenberg form of a matrix.

Example of usage

Factorise a labelled industrial sensor calibration matrix and verify reconstruction.

Usage / limitations

+Use when: Prepare general matrices for eigenvalue computation.

−Limitations: Matrix shape, symmetry, conditioning and numerical precision constrain validity.

Mathematical formula

QᵀAQ = H, H upper Hessenberg.
Sample dataShow
{
  "variable": "measurement_matrix",
  "domain": "Industrial sensor calibration",
  "feature_names": [
    "temperature_c",
    "vibration_mm_s",
    "pressure_kpa"
  ],
  "matrix": [
    [
      4.0,
      1.0,
      2.0
    ],
    [
      3.0,
      5.0,
      6.0
    ],
    [
      7.0,
      8.0,
      9.0
    ]
  ]
}

Code example (Python)

# DataLens.ai example
# Factorise the named two- or three-sensor calibration matrix.
from scipy.linalg import hessenberg
H, Q = hessenberg(A, calc_q=True)
assert np.allclose(Q @ H @ Q.T, A) and np.allclose(np.tril(H,-2),0)
print("Expected output verified")