Datalens.ai
← All algorithms

DECOMPOSITION

polar

Compute the polar decomposition.

Example of usage

Factorise a labelled industrial sensor calibration matrix and verify reconstruction.

Usage / limitations

+Use when: Separate rotation from deformation in transformations.

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

Mathematical formula

A = UP, U unitary and P positive semidefinite.
Sample dataShow
{
  "variable": "measurement_matrix",
  "domain": "Industrial sensor calibration",
  "feature_names": [
    "temperature_c",
    "vibration_mm_s"
  ],
  "matrix": [
    [
      2.0,
      1.0
    ],
    [
      0.0,
      3.0
    ]
  ]
}

Code example (Python)

# DataLens.ai example
# Factorise the named two- or three-sensor calibration matrix.
from scipy.linalg import polar
U, P = polar(A)
assert np.allclose(U @ P, A) and np.allclose(U.T @ U, np.eye(2))
print("Expected output verified")