Beruflich Dokumente
Kultur Dokumente
AND
MATRIX COMPUTATIONS
(1)
A =
a 11( 1 )
(1 )
a 21
.....
.....
a 12( 1 )
(1 )
a 22
......
......
.....
.....
.....
......
a 1( 1n )
a 2( 1n)
......
......
a n( 11 )
a n( 12)
......
(1 )
a nn
y1(1)
(1)
y2
M
y (1)
n
where yi(1) = yi
We assume a11(1) 0
Then by ERO applied to A(1) , (that is, subtracting suitable multiples of the first
row from the remaining rows), reduce all entries below a11(1) to zero. Let the
resulting matrix be denoted by A(2).
(1)
Ri +mi(11)R1
A(2)
2
mi(11) =
where
ai(11)
;
a11(1)
i > 1.
A(2)
a11(1) a12(1)
( 2)
0 a22
0 a ( 2)
32
M
M
( 2)
0 an 2
Notice that the above row operations on A(1) can be effected by premultiplying
A(1) by M(1) where
1 0 0 L 0 0
(1)
m21
(1)
(1)
M = m31
I n 1
(1)
mn1
Let
i.e.
R i + m i 1 R1
y (1)
y ( 2 )
(2)
Ri +mi(22)
A(3) ;
( 2)
i2
ai(22)
= ( 2) ;
a22
i>3
Here
M ( 2)
1 0
0 1
0 m ( 2)
32
=
( 2)
0 m42
M
M
0 m ( 2)
n2
L
I n 2
and
M(2) A(2) = A(3) ;
A( 3 )
a11(1)
0
= 0
a12(1)
...
(2)
a22
( 2)
a23
( 3)
a33
an( 33)
... a1(n1)
... a3(3n)
... M
(3)
... ann
(3)
We next assume a33
0 and proceed to make entries below this as zero. We
(1)
(2)
thus get M , M , . , M(r) where
M (r )
0
M
0
=
0
0
M
0 L
1 L
0 L
0 r ( n r )
0 L mr( +r )1r
0 L mr( +r )2 r
M M
M
0 L
mnr( r )
I n r
(r )
(r )
=A
( r +1)
a11(1)
M
=
M
M
0
...
...
...
...
( 2)
a22
...
...
...
arr( r )
...
...
...
anr( r ++11)
...
a1(n1)
a2( rn)
arn( r )
ar( +r 1+n1)
...
( r +1)
ann
where
A( n )
a11(1)
a12(1) L a1(n1)
( 2)
a22
L a2( 2n)
O
( n)
ann
since A = A(1)
(2)
(n)
Now A(n) is an upper triangular matrix and hence its determinant is a11(1) a22
L ann
.
Thus det A is given by
(2)
( n)
det A = a11(1) a22
L ann
Thus the simple GEM can be used to solve the system Ax = y and also to
evaluate det A provided aii( i ) 0 for each i.
Further note that M(1), M(2), . , M(n-1) are lower triangular, and nonsingular as
their det = 1 and hence not zero. They are all therefore invertible and their
inverses are all lower triangular, i.e. if L = M(n-1) M(n-2) . M(1) then L is lower
triangular and nonsingular and L-1 is also lower triangular.
Now LA = LA(1) = M(n-1) M(n-2) . M(1) A(1) = A(n)
Therefore A = L-1 A(n)
Now L-1 is lower triangular which we denote by L and A(n) is upper triangular
which we denote by U, and we thus get the so called LU decomposition
A = LU
of a given matrix A as a product of a lower triangular matrix with an upper
triangular matrix. This is another application of the simple GEM. REMEMBER IF
AT ANY STAGE WE GET aii(1) = 0 WE CANNOT PROCEED FURTHER WITH
THE SIMPLE GEM.
EXAMPLE:
Consider the system
x1 + x2 + 2x3 = 4
2x1 - x2 + x3 = 2
x1 + 2x2
=3
Here
1 1 2
A = 2 1 1
1 2 0
4
y = 2
3
= 2
1
(1)
1
1
2
1
0
R 2 2 R1
R 3 R1
0
0
3 = A (2)
2
1
3
1
a11(1) = 1 0
(1)
m21
= 2
(1)
m31
= 1
(2)
= 3 0
a22
(1)
(2)
1 0 0
= 2 1 0
1 0 1
1
R3 + R 2
3
(2)
m31
=1
(2)
0
0
1
3
0
(1 )
4
4
= 2 6 = y (2) = M
3
1
3 = A ( 3)
3
(3)
a33
= 3
= 0
0
1 0
1
1
3
(3)
= M
(2)
(2)
= 6
3
x1 + x2 + 2x3 = 4
-3x2 - 3x3 = -6
- 3x3 = -3
Back Substitution
x3 = 1
-3x2 - 3 = - 6 -3x2 = -3 x2 = 1
(1 )
y (1 )
x1 + 1 + 2 = 4 x1 = 1
Thus the solution of the given system is,
x1 1
x = x 2 = 1
x 1
3
The determinant of the given matrix A is
(2) (3)
a11(1) a22
a33 = (1)(3)(3) = 9.
Now
(M )
(1)
( 1)
(M ( ) )
2
( 1)
1 0 0
= 2 1 0
1 0 1
1
0
0
= 0
1
0
0 1
1
3
L = M(2) M(-1)
L-1= ( M (2) M (1) ) = ( M (1) )
1
(M )
(2) 1
0
0
1 0 0 1
= 2 1 0 0
1
0
1 0 1
1
0 1
1
0
0
L = L(-1) = 2
1
0
1 1
1
3
(n)
U=A
(3)
=A
2
1 1
= 0 3 3
0 0 3
Therefore A = LU
i.e.,
1
0
0
1 1 2
A= 2 1 1 = 2
1
0
1 2 0
1 1
1
2
1 1
0 3 3
0 0 3
0 .000003
A(1) = 0 .215512
0 . 173257
(1)
0 . 235262
= 0 . 127653
0 . 285321
0 .213472
0 .375623
0 . 663257
0 .332147
0 .476625
0 .625675
a11(1) = 0.000003 0
(1)
m21
=
(1)
a21
0.215512
=
= 71837.3
(1)
0.000003
a11
(1)
m31
=
(1)
a31
0.173257
=
= 57752.3
(1)
0.000003
a11
(1)
= 71837 .3
57752 . 3
0
1
0
0 ;
1
0.000003
0
A(2) = M(1) A(1) =
(2)
(1)
=M
(1)
0.235262
16900.5
13586.6
0.332147
15334 .9 23860 .0
12327 .8 19181 .7
0.213472
(2)
a22
= 15334.9 0
(2)
=
m32
(2)
a32
12327.8
=
= 0.803905
(2)
15334.9
a22
0
0
1
1
0
M(2) = 0
0 0.803905 1
(3)
(2)
=M
(2)
0 .235262
= 16900 . 5
0 . 20000
0.000003
0
A(3) = M(2) A(2) =
0.213472
15334 .9
0
0.332147
23860 .0
0.50000
10
This compares poorly with the correct answers (to 10 digits) given by
x1 = 0.67 41 21 46 94
x2 = 0.05 32 03 93 39.1
x3 = -0.99 12 89 42 52
Thus we see that the simple Gaussian Elimination method needs modification in
order to handle the situations that may lead to arr( r ) = 0 for some r or situations as
arising in the above example. In order to do this we introduce the idea of Partial
Pivoting in the next section.
11