Solving a Triangular System of Linear Equations (trs)

trs solves a triangular system of the form \( A X = B \) or \( A^T X = B \), where \( A \) is a triangular matrix of order \( n \), and \( B \) is an \( n \times n_{\text{rhs}} \) matrix. A check is made to verify that \( A \) is nonsingular.

Multiple Right-Hand Sides

trans

(input)
Specifies the form of the system of equations:

NoTrans

\( A X = B \)

Trans

\( A^T X = B \)

ConjTrans

\( A^H X = B \)

A

(input) real or complex valued TrMatrix
The triangular matrix \( A \).

B

(input/output) real or complex valued GeMatrix
On entry, the right hand side matrix \( B \). On exit, if the return value equals zero, the solution matrix \( X \).

Return value:

i=0

Successful exit.

i>0

\( A_{i,i} \) is exactly zero, indicating that the matrix is singular and the solutions \( X \) have not been computed.

Single Right-Hand Side

trans

(input)
Specifies the form of the system of equations:

NoTrans

\( A X = b \)

Trans

\( A^T X = b \)

ConjTrans

\( A^H X = b \)

A

(input) real or complex valued TrMatrix
The triangular matrix \( A \).

b

(input/output) real or complex valued DenseVector
On entry, the right hand side vector \( b \). On exit, if the return value equals zero, the solution vector \( x \).

Return value:

i=0

Successful exit.

i>0

\( A_{i,i} \) is exactly zero, indicating that the matrix is singular and the solutions \( x \) have not been computed.