naginterfaces.library.matop.complex_​gen_​matrix_​cond_​sqrt

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

complex_gen_matrix_cond_sqrt computes an estimate of the relative condition number, , and a bound on the relative residual, in the Frobenius norm, for the square root of a complex matrix . The principal square root, , of is also returned.

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

https://www.nag.com/numeric/nl/nagdoc_29.3/flhtml/f01/f01kdf.html

Parameters
acomplex, array-like, shape

The matrix .

Returns
acomplex, ndarray, shape

The principal matrix square root . Alternatively, if = 1, contains an non-principal square root of .

alphafloat

An estimate of the stability of the relative residual for the computed principal (if no exception or warning is raised) or non-principal (if = 1) matrix square root, .

condsafloat

An estimate of the relative condition number, in the Frobenius norm, of the principal (if no exception or warning is raised) or non-principal (if = 1) matrix square root at , .

Raises
NagValueError
(errno )

On entry, .

Constraint: .

(errno )

has a defective vanishing eigenvalue. The square root and condition number cannot be found in this case.

(errno )

An error occurred when computing the matrix square root. Consequently, and could not be computed. It is likely that the function was called incorrectly.

Warns
NagAlgorithmicWarning
(errno )

has a negative or semisimple vanishing eigenvalue. A non-principal square root was returned.

(errno )

An error occurred when computing the condition number. The matrix square root was still returned but you should use complex_gen_matrix_sqrt() to check if it is the principal matrix square root.

Notes

For a matrix with no eigenvalues on the closed negative real line, the principal matrix square root, , of is the unique square root with eigenvalues in the right half-plane.

The Fréchet derivative of a matrix function in the direction of the matrix is the linear function mapping to such that

The absolute condition number is given by the norm of the Fréchet derivative which is defined by

The Fréchet derivative is linear in and can, therefore, be written as

where the operator stacks the columns of a matrix into one vector, so that is .

complex_gen_matrix_cond_sqrt uses Algorithm 3.20 from Higham (2008) to compute an estimate such that . The quantity of provides a good approximation to . The relative condition number, , is then computed via

is returned in the argument .

is computed using the algorithm described in Higham (1987). This is a version of the algorithm of Björck and Hammarling (1983). In addition, a blocking scheme described in Deadman et al. (2013) is used.

The computed quantity is a measure of the stability of the relative residual (see Accuracy). It is computed via

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