Geology Reference
In-Depth Information
Finally, with the interchange of the second and third rows, the completed reduction
of the array (1.531) takes the form
100
001
010
G
=
RG
100493/235 6/235 67/235
010113/235 16/235 22/235
0012 7/47
=
H
=
.
(1.538)
5/47
1/47
The unit matrix is on the left of the array, followed by the solution vector in the
next column, and the inverse of the original coe
cient matrix is on the right.
cient matrix A , in the system (1.530), to the unit
matrix I is seen to be achieved by the sequence of matrix multiplications,
The reduction of the coe
RQ 3 P 3 Q 2 P 2 Q 1 P 1 A
=
I .
(1.539)
Taking the determinant of both sides of this equation gives
det R
·
det P 3
·
det P 2
·
det P 1
·
det Q 3 ·
det Q 2 ·
det Q 1 ·
det A
=
1.
(1.540)
Now, det R
1, showing that row interchange reverses the sign of the determ-
inant, while det P 3 =
=−
93/235, det P 2 =
3/31, det P 1 =
1/9, and det Q 3 =
det Q 2 =
det Q 1 =
1. Hence,
31
3 ×
235
93 =−
det A
=−
1
×
9
×
235.
(1.541)
cient matrix, returned
in A, the solution vector, returned in B and the determinant of the coe
The subroutine LINSOL solves for the inverse of the coe
cient matrix,
returned in DET. The integer vectors, IR and IC, record the row and column of each
successive pivot, allowing the rows to be unscrambled, and the integer vector IDET
records the rearranged sequence of the rows, allowing the sign of the determinant
to be determined.
SUBROUTINE LINSOL(A,B,N,C,DET,M1,M2)
C
C LINSOL solves the linear system Ax=b by Gauss-Jordan elimination
C with partial pivoting. A is the N x N coefficient matrix
C and B is the N-length constant vector b. The inverse of A
C is returned in A, the solution vector x is returned in B,
C and the determinant of A is returned in DET. C is the N x 2N+1
C augmented matrix used internally. M1 is the maximum dimension
C for N specified in the main programme and M2=2M1+1 is
C the maximum dimension for 2N+1 used in the main programme.
C
IMPLICIT DOUBLE PRECISION(A-H,O-Z)
DIMENSION A(M1,M1),B(M1),C(M1,M2),HOLD(M1,M2),
1 IR(M1),IC(M1),IDET(M1)
C Construct the augmented matrix C.
Search WWH ::




Custom Search