﻿ f06yj Method
f06yj performs one of the matrix-matrix operations
 $B←αA-1B,B←αA-TB,B←αBA-1 orB←αBA-T,$
where $A$ is a real triangular matrix, $B$ is an $m$ by $n$ real matrix, and $\alpha$ is a real scalar. ${A}^{-\mathrm{T}}$ denotes ${\left({A}^{\mathrm{T}}\right)}^{-1}$ or equivalently ${\left({A}^{-1}\right)}^{\mathrm{T}}$.
No test for singularity or near-singularity of $A$ is included in this method. Such tests must be performed before calling this method.

# Syntax

C#
```public static void f06yj(
string side,
string uplo,
string transa,
string diag,
int m,
int n,
double alpha,
double[,] a,
double[,] b,
out int ifail
)```
Visual Basic
```Public Shared Sub f06yj ( _
side As String, _
uplo As String, _
transa As String, _
diag As String, _
m As Integer, _
n As Integer, _
alpha As Double, _
a As Double(,), _
b As Double(,), _
<OutAttribute> ByRef ifail As Integer _
)```
Visual C++
```public:
static void f06yj(
String^ side,
String^ uplo,
String^ transa,
String^ diag,
int m,
int n,
double alpha,
array<double,2>^ a,
array<double,2>^ b,
[OutAttribute] int% ifail
)```
F#
```static member f06yj :
side : string *
uplo : string *
transa : string *
diag : string *
m : int *
n : int *
alpha : float *
a : float[,] *
b : float[,] *
ifail : int byref -> unit
```

#### Parameters

side
Type: System..::..String
On entry: specifies whether $B$ is operated on from the left or the right.
${\mathbf{side}}=\text{"L"}$
$B$ is pre-multiplied from the left.
${\mathbf{side}}=\text{"R"}$
$B$ is post-multiplied from the right.
Constraint: ${\mathbf{side}}=\text{"L"}$ or $\text{"R"}$.
uplo
Type: System..::..String
On entry: specifies whether $A$ is upper or lower triangular.
${\mathbf{uplo}}=\text{"U"}$
$A$ is upper triangular.
${\mathbf{uplo}}=\text{"L"}$
$A$ is lower triangular.
Constraint: ${\mathbf{uplo}}=\text{"U"}$ or $\text{"L"}$.
transa
Type: System..::..String
On entry: specifies whether the operation involves ${A}^{-1}$ or ${A}^{-\mathrm{T}}$.
${\mathbf{transa}}=\text{"N"}$
The operation involves ${A}^{-1}$.
${\mathbf{transa}}=\text{"T"}$ or $\text{"C"}$
The operation involves ${A}^{-\mathrm{T}}$.
Constraint: ${\mathbf{transa}}=\text{"N"}$, $\text{"T"}$ or $\text{"C"}$.
diag
Type: System..::..String
On entry: specifies whether $A$ has nonunit or unit diagonal elements.
${\mathbf{diag}}=\text{"N"}$
The diagonal elements are stored explicitly.
${\mathbf{diag}}=\text{"U"}$
The diagonal elements are assumed to be $1$, and are not referenced.
Constraint: ${\mathbf{diag}}=\text{"N"}$ or $\text{"U"}$.
m
Type: System..::..Int32
On entry: $m$, the number of rows of the matrix $B$; the order of $A$ if ${\mathbf{side}}=\text{"L"}$.
Constraint: ${\mathbf{m}}\ge 0$.
n
Type: System..::..Int32
On entry: $n$, the number of columns of the matrix $B$; the order of $A$ if ${\mathbf{side}}=\text{"R"}$.
Constraint: ${\mathbf{n}}\ge 0$.
alpha
Type: System..::..Double
On entry: the scalar $\alpha$.
a
Type: array<System..::..Double,2>[,](,)[,][,]
An array of size [dim1, dim2]
Note: dim1 must satisfy the constraint:
• if ${\mathbf{side}}=\text{"L"}$, $\mathrm{dim1}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{m}}\right)$;
• if ${\mathbf{side}}=\text{"R"}$, $\mathrm{dim1}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{n}}\right)$.
Note: the second dimension of the array a must be at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{m}}\right)$ if ${\mathbf{side}}=\text{"L"}$ and at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{n}}\right)$ if ${\mathbf{side}}=\text{"R"}$.
On entry: the triangular matrix $A$; $A$ is $m$ by $m$ if ${\mathbf{side}}=\text{"L"}$, or $n$ by $n$ if ${\mathbf{side}}=\text{"R"}$.
• If ${\mathbf{uplo}}=\text{"U"}$, $A$ is upper triangular and the elements of the array below the diagonal are not referenced.
• If ${\mathbf{uplo}}=\text{"L"}$, $A$ is lower triangular and the elements of the array above the diagonal are not referenced.
• If ${\mathbf{diag}}=\text{"U"}$, the diagonal elements of $A$ are assumed to be $1$, and are not referenced.
b
Type: array<System..::..Double,2>[,](,)[,][,]
An array of size [dim1, dim2]
Note: dim1 must satisfy the constraint: $\mathrm{dim1}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{m}}\right)$
Note: the second dimension of the array b must be at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{n}}\right)$.
On entry: the $m$ by $n$ matrix $B$.
If ${\mathbf{alpha}}=0$, b need not be set.
On exit: the updated matrix $B$.
ifail
Type: System..::..Int32%
On exit: $\mathbf{ifail}=0$ unless the method detects an error (see [Error Indicators and Warnings]).

None.

None.

# Error Indicators and Warnings

${\mathbf{ifail}}=-9000$
An error occured, see message report.
${\mathbf{ifail}}=-6000$
Invalid Parameters $〈\mathit{\text{value}}〉$
${\mathbf{ifail}}=-4000$
Invalid dimension for array $〈\mathit{\text{value}}〉$
${\mathbf{ifail}}=-8000$
Negative dimension for array $〈\mathit{\text{value}}〉$
${\mathbf{ifail}}=-6000$
Invalid Parameters $〈\mathit{\text{value}}〉$
${\mathbf{ifail}}=-6000$
Invalid Parameters $〈\mathit{\text{value}}〉$

Not applicable.

None.