1DGETRI(1) LAPACK routine (version 3.2) DGETRI(1)
2
3
4
6 DGETRI - computes the inverse of a matrix using the LU factorization
7 computed by DGETRF
8
10 SUBROUTINE DGETRI( N, A, LDA, IPIV, WORK, LWORK, INFO )
11
12 INTEGER INFO, LDA, LWORK, N
13
14 INTEGER IPIV( * )
15
16 DOUBLE PRECISION A( LDA, * ), WORK( * )
17
19 DGETRI computes the inverse of a matrix using the LU factorization com‐
20 puted by DGETRF. This method inverts U and then computes inv(A) by
21 solving the system inv(A)*L = inv(U) for inv(A).
22
24 N (input) INTEGER
25 The order of the matrix A. N >= 0.
26
27 A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
28 On entry, the factors L and U from the factorization A = P*L*U
29 as computed by DGETRF. On exit, if INFO = 0, the inverse of
30 the original matrix A.
31
32 LDA (input) INTEGER
33 The leading dimension of the array A. LDA >= max(1,N).
34
35 IPIV (input) INTEGER array, dimension (N)
36 The pivot indices from DGETRF; for 1<=i<=N, row i of the matrix
37 was interchanged with row IPIV(i).
38
39 WORK (workspace/output) DOUBLE PRECISION array, dimension
40 (MAX(1,LWORK))
41 On exit, if INFO=0, then WORK(1) returns the optimal LWORK.
42
43 LWORK (input) INTEGER
44 The dimension of the array WORK. LWORK >= max(1,N). For opti‐
45 mal performance LWORK >= N*NB, where NB is the optimal block‐
46 size returned by ILAENV. If LWORK = -1, then a workspace query
47 is assumed; the routine only calculates the optimal size of the
48 WORK array, returns this value as the first entry of the WORK
49 array, and no error message related to LWORK is issued by
50 XERBLA.
51
52 INFO (output) INTEGER
53 = 0: successful exit
54 < 0: if INFO = -i, the i-th argument had an illegal value
55 > 0: if INFO = i, U(i,i) is exactly zero; the matrix is singu‐
56 lar and its inverse could not be computed.
57
58
59
60 LAPACK routine (version 3.2) November 2008 DGETRI(1)