# naginterfaces.library.linsys.complex_​symm_​solve¶

naginterfaces.library.linsys.complex_symm_solve(uplo, n, a, b)[source]

complex_symm_solve computes the solution to a complex system of linear equations , where is an complex symmetric matrix and and are matrices. An estimate of the condition number of and an error bound for the computed solution are also returned.

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

https://www.nag.com/numeric/nl/nagdoc_28.7/flhtml/f04/f04dhf.html

Parameters
uplostr, length 1

If , the upper triangle of the matrix is stored.

If , the lower triangle of the matrix is stored.

nint

The number of linear equations , i.e., the order of the matrix .

acomplex, array-like, shape

The complex symmetric matrix .

If , the leading by upper triangular part of the array contains the upper triangular part of the matrix , and the strictly lower triangular part of is not referenced.

If , the leading by lower triangular part of the array contains the lower triangular part of the matrix , and the strictly upper triangular part of is not referenced.

bcomplex, array-like, shape

The matrix of right-hand sides .

Returns
acomplex, ndarray, shape

If no exception is raised, the block diagonal matrix and the multipliers used to obtain the factor or from the factorization or as computed by lapacklin.zsytrf.

ipivint, ndarray, shape

If no exception is raised, details of the interchanges and the block structure of , as determined by lapacklin.zsytrf.

If , then rows and columns and were interchanged, and is a diagonal block;

if and , then rows and columns and were interchanged and is a diagonal block;

if and , then rows and columns and were interchanged and is a diagonal block.

bcomplex, ndarray, shape

If the function exits successfully or = + 1, the solution matrix .

rcondfloat

If no constraints are violated, an estimate of the reciprocal of the condition number of the matrix , computed as .

errbndfloat

If the function exits successfully or = + 1, an estimate of the forward error bound for a computed solution , such that , where is a column of the computed solution returned in the array and is the corresponding column of the exact solution . If is less than machine precision, is returned as unity.

Raises
NagValueError
(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, not one of ‘U’ or ‘u’ or ‘L’ or ‘l’: .

(errno )

Diagonal block of the block diagonal matrix is zero. The factorization has been completed, but the solution could not be computed.

Warns
NagAlgorithmicWarning
(errno )

A solution has been computed, but is less than machine precision so that the matrix is numerically singular.

Notes

The diagonal pivoting method is used to factor as , if , or , if , where (or ) is a product of permutation and unit upper (lower) triangular matrices, and is symmetric and block diagonal with and diagonal blocks. The factored form of is then used to solve the system of equations .

References

Anderson, E, Bai, Z, Bischof, C, Blackford, S, Demmel, J, Dongarra, J J, Du Croz, J J, Greenbaum, A, Hammarling, S, McKenney, A and Sorensen, D, 1999, LAPACK Users’ Guide, (3rd Edition), SIAM, Philadelphia, https://www.netlib.org/lapack/lug

Higham, N J, 2002, Accuracy and Stability of Numerical Algorithms, (2nd Edition), SIAM, Philadelphia