DADiSP Worksheet Functions > Function Categories > Matrix Math and Special Matrices > SQRTM

 

SQRTM

Purpose:

Computes the principal matrix square root.

Syntax:

SQRTM(a)

(x, res) = SQRTM(a)

a

-

A square matrix.

Returns:

A square matrix.

 

(x, res) = SQRTM(a) returns the square root matrix and residual where res = norm(a - x *^ x, "fro") / norm(a, "fro").

Example:

W1: ravel(1..9, 3)

W2: sqrtm(W1)

W3: real(W2 *^ W2)

 

W1 contains the array:

 

{{1, 4, 7},

 {2, 5, 8},

 {3, 6, 9}}

 

W2 == {{0.4498 + 0.7623i, 1.0185 + 0.0842i, 1.5873 - 0.5940i},

       {0.5526 + 0.2068i, 1.2515 + 0.0229i, 1.9503 - 0.1611i},

       {0.6555 - 0.3487i, 1.4844 - 0.0385i, 2.3134 + 0.2717i}}

 

W3 == {{1, 4, 7},

       {2, 5, 8},

       {3, 6, 9}}

Remarks:

SQRTM(A) returns a matrix X such that X *^ X == A.

 

Not all matrices have a square root and some matrices have multiple square roots.

See Also:

^

^^ (Matrix Power)

EXPM

FUNM

LOGM