# naginterfaces.library.matop.real_​tri_​matrix_​sqrt¶

naginterfaces.library.matop.real_tri_matrix_sqrt(a)[source]

real_tri_matrix_sqrt computes the principal matrix square root, , of a real upper quasi-triangular matrix .

For full information please refer to the NAG Library document for f01ep

https://www.nag.com/numeric/nl/nagdoc_28.4/flhtml/f01/f01epf.html

Parameters
afloat, array-like, shape

The upper quasi-triangular matrix .

Returns
afloat, ndarray, shape

The principal matrix square root .

Raises
NagValueError
(errno )

On entry, .

Constraint: .

(errno )

has negative or vanishing eigenvalues. The principal square root is not defined in this case. real_gen_matrix_sqrt() or complex_gen_matrix_sqrt() may be able to provide further information.

(errno )

An internal error occurred. It is likely that the function was called incorrectly.

Notes

A square root of a matrix is a solution to the equation . A nonsingular matrix has multiple square roots. For a matrix with no eigenvalues on the closed negative real line, the principal square root, denoted by , is the unique square root whose eigenvalues lie in the open right half-plane.

real_tri_matrix_sqrt computes , where is an upper quasi-triangular matrix, with and blocks on the diagonal. Such matrices arise from the Schur factorization of a real general matrix, as computed by lapackeig.dhseqr, for example. real_tri_matrix_sqrt does not require to be in the canonical Schur form described in lapackeig.dhseqr, it merely requires to be upper quasi-triangular. then has the same block triangular structure as .

The algorithm used by real_tri_matrix_sqrt is described in Higham (1987). In addition a blocking scheme described in Deadman et al. (2013) is used.

References

Björck, Å and Hammarling, S, 1983, A Schur method for the square root of a matrix, Linear Algebra Appl. (52/53), 127–140

Deadman, E, Higham, N J and Ralha, R, 2013, Blocked Schur Algorithms for Computing the Matrix Square Root, Applied Parallel and Scientific Computing: 11th International Conference, (PARA 2012, Helsinki, Finland), P. Manninen and P. Öster, Eds, Lecture Notes in Computer Science (7782), 171–181, Springer–Verlag

Higham, N J, 1987, Computing real square roots of a real matrix, Linear Algebra Appl. (88/89), 405–430

Higham, N J, 2008, Functions of Matrices: Theory and Computation, SIAM, Philadelphia, PA, USA