## Developer Reference

• 2020.2
• 07/15/2020
• Public Content
Contents

# ?hesv_rk

?hesv_rk
computes the solution to a system of linear equations A * X = B for Hermitian matrices.
Description
?hesv_rk
computes the solution to a complex system of linear equations A * X = B, where A is an
n
-by-
n
Hermitian matrix and X and B are
n
-by-
nrhs
matrices.
The bounded Bunch-Kaufman (rook) diagonal pivoting method is used to factor A as A = P*U*D*(U
H
)*(P
T
), if
uplo
=
'U'
, or A = P*L*D*(L
H
)*(P
T
), if
uplo
=
'L'
, where U (or L) is unit upper (or lower) triangular matrix, U
H
(or L
H
) is the conjugate of U (or L), P is a permutation matrix, P
T
is the transpose of P, and D is Hermitian and block diagonal with 1-by-1 and 2-by-2 diagonal blocks.
?hetrf_rk
is called to compute the factorization of a complex Hermitian matrix. The factored form of A is then used to solve the system of equations A * X = B by calling BLAS3 routine
?hetrs_3
.
Input Parameters
uplo
CHARACTER*1
Specifies whether the upper or lower triangular part of the Hermitian matrix A is stored:
• =
'U'
: The upper triangle of A is stored.
• =
'L'
: The lower triangle of A is stored.
n
INTEGER
The number of linear equations; that is, the order of the matrix A.
n
≥ 0.
nrhs
INTEGER
The number of right-hand sides; that is, the number of columns of the matrix B.
nrhs
≥ 0.
A
COMPLEX
for
chesv_rk
COMPLEX*16
for
zhesv_rk
Array, dimension (
lda
,
n
).
On entry, the Hermitian matrix A. If
uplo
=
'U'
n
-by-
n
upper triangular part of A contains the upper triangular part of the matrix A, and the strictly lower triangular part of A is not referenced. If
uplo
=
'L'
n
-by-
n
lower triangular part of A contains the lower triangular part of the matrix A, and the strictly upper triangular part of A is not referenced.
lda
INTEGER
The leading dimension of the array
A
.
lda
≥ max(1,
n
).
B
COMPLEX
for
chesv_rk
COMPLEX*16
for
zhesv_rk
On entry, the
n
-by-
nrhs
right-hand side matrix B.
The second dimension of
B
must be at least max(1,
nrhs
).
ldb
INTEGER
The leading dimension of the array
B
.
ldb
≥ max(1,
n
).
lwork
INTEGER
The length of the array
work
.
If
lwork
=
-
1, a workspace query is assumed; the routine calculates only the optimal size of the
work
array for the factorization stage and returns this value as the first entry of the
work
array, and no error message related to
lwork
is issued by XERBLA.
Output Parameters
A
COMPLEX
for
chesv_rk
COMPLEX*16
for
zhesv_rk
On exit, if
info
= 0, diagonal of the block diagonal matrix D and factors U or L as computed by
?hetrf_rk
:
• Only
diagonal elements of the Hermitian block diagonal matrix D on the diagonal of A; that is, D(
k
,
k
) =
A
(
k
,
k
); (superdiagonal (or subdiagonal) elements of D are stored on exit in array
e
).
—and—
• If
uplo
=
'U'
, factor U in the superdiagonal part of A. If
uplo
=
'L'
, factor L in the subdiagonal part of A.