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