sqrtm

sqrtm(x)

Try it yourself:

See also:

sqrtm(): Matrix Square Root

sqrtm() computes a matrix B whose product B×B equals the input matrix. It is used in covariance transformations, control theory, and advanced linear algebra.

Matrix, not entry-wise root

sqrtm differs from applying sqrt() to entries. Results can be complex and may not be unique. Verify a candidate by multiply()ing it by itself, and inspect shape with size().

For symmetric positive-definite matrices, decompositions such as lu() or qr() may be useful depending on the task. Account for numerical error when checking equality.

Try Sqrtm in Calcul.io

Start with one of the editable examples above, then replace its arguments with your own values. Keeping the function on a separate calculator line makes the input and result easy to compare. For a longer workflow, assign the result to a variable or reference that line in the next expression.

Check the shown signature before adding optional arguments, and use the related-function links to compare operations with similar purposes.

All functions