Datalens.ai
← All algorithms

DECOMPOSITION

qz

QZ decomposition for generalized eigenvalues of a pair of matrices.

Example of usage

Factorise a labelled industrial sensor calibration matrix and verify reconstruction.

Usage / limitations

+Use when: Solve generalised eigenvalue problems for model pairs.

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

Mathematical formula

QᵀAZ = S and QᵀBZ = T.
Sample dataShow
{
  "variable": "measurement_matrix",
  "domain": "Industrial sensor calibration",
  "feature_names": [
    "temperature_c",
    "vibration_mm_s"
  ],
  "matrix": [
    [
      2.0,
      0.0
    ],
    [
      0.0,
      3.0
    ]
  ],
  "reference_matrix": [
    [
      1.0,
      0.0
    ],
    [
      0.0,
      1.0
    ]
  ]
}

Code example (Python)

# DataLens.ai example
# Factorise the named two- or three-sensor calibration matrix.
from scipy.linalg import qz
AA, BB, Q, Z = qz(A,B)
assert np.allclose(Q @ AA @ Z.T,A) and np.allclose(Q @ BB @ Z.T,B)
print("Expected output verified")