﻿ f06ya Method
f06ya performs one of the matrix-matrix operations
 $C←αAB+βC,C←αATB+βC,C←αABT+βC orC←αATBT+βC,$
where $A$, $B$ and $C$ are real matrices, and $\alpha$ and $\beta$ are real scalars; $C$ is always $m$ by $n$.

# Syntax

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

#### Parameters

transa
Type: System..::..String
On entry: specifies whether the operation involves $A$ or ${A}^{\mathrm{T}}$.
${\mathbf{transa}}=\text{"N"}$
The operation involves $A$.
${\mathbf{transa}}=\text{"T"}$ or $\text{"C"}$
The operation involves ${A}^{\mathrm{T}}$.
Constraint: ${\mathbf{transa}}=\text{"N"}$, $\text{"T"}$ or $\text{"C"}$.
transb
Type: System..::..String
On entry: specifies whether the operation involves $B$ or ${B}^{\mathrm{T}}$.
${\mathbf{transb}}=\text{"N"}$
The operation involves $B$.
${\mathbf{transb}}=\text{"T"}$ or $\text{"C"}$
The operation involves ${B}^{\mathrm{T}}$.
Constraint: ${\mathbf{transb}}=\text{"N"}$, $\text{"T"}$ or $\text{"C"}$.
m
Type: System..::..Int32
On entry: $m$, the number of rows of the matrix $C$; the number of rows of $A$ if ${\mathbf{transa}}=\text{"N"}$, or the number of columns of $A$ if ${\mathbf{transa}}=\text{"T"}$ or $\text{"C"}$.
Constraint: ${\mathbf{m}}\ge 0$.
n
Type: System..::..Int32
On entry: $n$, the number of columns of the matrix $C$; the number of columns of $B$ if ${\mathbf{transb}}=\text{"N"}$, or the number of rows of $B$ if ${\mathbf{transb}}=\text{"T"}$ or $\text{"C"}$.
Constraint: ${\mathbf{n}}\ge 0$.
k
Type: System..::..Int32
On entry: $k$, the number of columns of $A$ if ${\mathbf{transa}}=\text{"N"}$, or the number of rows of $A$ if ${\mathbf{transa}}=\text{"T"}$ or $\text{"C"}$; the number of rows of $B$ if ${\mathbf{transb}}=\text{"N"}$, or the number of columns of $B$ if ${\mathbf{transb}}=\text{"T"}$ or $\text{"C"}$.
Constraint: ${\mathbf{k}}\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{transa}}=\text{"N"}$, $\mathrm{dim1}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{m}}\right)$;
• if ${\mathbf{transa}}=\text{"T"}$ or $\text{"C"}$, $\mathrm{dim1}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{k}}\right)$.
Note: the second dimension of the array a must be at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{k}}\right)$ if ${\mathbf{transa}}=\text{"N"}$ and at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{m}}\right)$ if ${\mathbf{transa}}=\text{"T"}$ or $\text{"C"}$.
On entry: the matrix $A$; $A$ is $m$ by $k$ if ${\mathbf{transa}}=\text{"N"}$, or $k$ by $m$ if ${\mathbf{transa}}=\text{"T"}$ or $\text{"C"}$.
b
Type: array<System..::..Double,2>[,](,)[,][,]
An array of size [dim1, dim2]
Note: dim1 must satisfy the constraint:
• if ${\mathbf{transb}}=\text{"N"}$, $\mathrm{dim1}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{k}}\right)$;
• if ${\mathbf{transb}}=\text{"T"}$ or $\text{"C"}$, $\mathrm{dim1}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{n}}\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)$ if ${\mathbf{transb}}=\text{"N"}$ and at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{k}}\right)$ if ${\mathbf{transb}}=\text{"T"}$ or $\text{"C"}$.
On entry: the matrix $B$; $B$ is $k$ by $n$ if ${\mathbf{transb}}=\text{"N"}$, or $n$ by $k$ if ${\mathbf{transb}}=\text{"T"}$ or $\text{"C"}$.
beta
Type: System..::..Double
On entry: the scalar $\beta$.
c
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 c must be at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{n}}\right)$.
On entry: the $m$ by $n$ matrix $C$.
If ${\mathbf{beta}}=0$, c need not be set.
On exit: the updated matrix $C$.
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}}=-6000$
Invalid Parameters . Check Documentation

Not applicable.

None.