Contents

# ?getri

Computes the inverse of an LU-factored general matrix.

## Syntax

Include Files
• mkl.h
Description
The routine computes the inverse
inv(
A
)
of a general matrix
A
. Before calling this routine, call
?getrf
to factorize
A
.
Input Parameters
matrix_layout
Specifies whether matrix storage layout is row major (
LAPACK_ROW_MAJOR
) or column major (
LAPACK_COL_MAJOR
).
n
The order of the matrix
A
;
n
0
.
a
Array
a
(size max(1,
lda
*
n
))
contains the factorization of the matrix
A
, as returned by
?getrf
:
A
=
P*L*U
. The second dimension of
a
must be at least
max(1,
n
)
.
lda
a
;
lda
max(1,
n
)
.
ipiv
Array, size at least
max(1,
n
)
.
The
ipiv
array, as returned by
?getrf
.
Output Parameters
a
Overwritten by the
n
-by-
n
matrix
inv(
A
)
.
Return Values
This function returns a value
info
.
If
info
= 0
, the execution is successful.
If
info
=
-i
, parameter
i
If
info
=
i
, the
i
-th diagonal element of the factor
U
is zero,
U
is singular, and the inversion could not be completed.
Application Notes
The computed inverse
X
satisfies the following error bound:
`|XA - I| ≤ c(n)ε|X|P|L||U|,`
where
c
(
n
)
is a modest linear function of
n
;
ε
is the machine precision;
I
denotes the identity matrix;
P
,
L
, and
U
are the factors of the matrix factorization
A
=
P*L*U
.
The total number of floating-point operations is approximately
(4/3)
n
3
for real flavors and
(16/3)
n
3
for complex flavors.

#### Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.