DECOMPOSITION
sqrtm
Compute, if exists, the matrix square root.
Example of usage
Factorise a labelled industrial sensor calibration matrix and verify reconstruction.
Usage / limitations
+Use when: Derive square-root operators for covariance transformations.
−Limitations: Matrix shape, symmetry, conditioning and numerical precision constrain validity.
Mathematical formula
X² = A.
Sample dataShow
{
"variable": "measurement_matrix",
"domain": "Industrial sensor calibration",
"feature_names": [
"temperature_c",
"vibration_mm_s"
],
"matrix": [
[
4.0,
0.0
],
[
0.0,
9.0
]
]
}
Code example (Python)
# DataLens.ai sample data — industrial sensor calibration
import numpy as np
A = np.diag([4.,9.])
# DataLens.ai example
# Factorise the named two- or three-sensor calibration matrix.
from scipy.linalg import sqrtm
result = sqrtm(A)
assert np.allclose(result @ result,A)
print("Expected output verified")
# DataLens.ai example
# Factorise the named two- or three-sensor calibration matrix.
from scipy.linalg import sqrtm
result = sqrtm(A)
assert np.allclose(result @ result,A)
print("Expected output verified")