HP MLIB User's Guide Vol. 1 7th Ed.
Chapter 3 Basic Matrix Operations 313
Solve triangular system STPSV/DTPSV/CTPSV/ZTPSV
Name STPSV/DTPSV/CTPSV/ZTPSV
Solve triangular system
Purpose Given an n-by-n upper- or lower-triangular matrix A stored in packed form as
described in “Matrix Storage” and an n-vector x, these subprograms overwrite x
with the solution y to the system of linear equations Ay = x. This is the forward
elimination or back substitution step of Gaussian elimination. Optionally, A can
be replaced by A
T
, the transpose of A, or by A*, the conjugate transpose of A.
Specifically, these subprograms compute
where A
−T
is the inverse of the transpose of A, and is the inverse of the
conjugate transpose of A.
These subprograms are more primitive than the LAPACK linear equation
solvers. As such, they are intended to supplement but not replace them, serving
instead as building blocks in constructing optimized linear algebra software. In
fact, many of the LAPACK subprograms have been recoded to call these
subprograms.
Refer to “F_STPSV/F_DTPSV/F_CTPSV/F_ZTPSV” on page 406 for a
description of the equivalent BLAS Standard subprograms.
Matrix
Storage
You supply the upper or lower triangle of A, stored column-by-column in packed
form in a 1-dimensional array. This saves memory compared to storing the
entire matrix.
The following examples illustrate the packed storage of a triangular matrix.
Upper triangular matrix
If A is
then A is packed column by column into an array ap as follows:
Upper-triangular matrix element a
ij
is stored in array element ap(i+(j×(j−1))/2).
xA
1–
x← xA
T–
x← and xA
*–
x,←,,
A
*–
11 12 13 14
0222324
0 0 33 34
00044
k 12345678910
ap(k) 11122213233314243444