# Function sqrtm #

Calculate the principal square root of a square matrix.
The principal square root matrix `X`

of another matrix `A`

is such that `X * X = A`

.

https://en.wikipedia.org/wiki/Square_root_of_a_matrix

## Syntax #

```
X = math.sqrtm(A)
```

### Parameters #

Parameter | Type | Description |
---|---|---|

`A` |
Array | Matrix | The square matrix `A` |

### Returns #

Type | Description |
---|---|

Array | Matrix | The principal square root of matrix `A` |

## Examples #

```
math.sqrtm([[1, 2], [3, 4]]) // returns [[-2, 1], [1.5, -0.5]]
```