Ax B A Linear Equation: MN MN MN MN
Ax B A Linear Equation: MN MN MN MN
Ax B A Linear Equation: MN MN MN MN
n
1. Solve a x
i 1
i i b a linear equation
Some observation:
kLi L j L j
Li L j
2x 3 y 5
we have here x 1, y 1
3x y 2
If one equation is the multiple of another equation,
we have infinite solutions. e.g.
2x 3 y 5
4x 6 y 10
a11 x1 a12 x2 b1
The equations have unique
a21 x1 a22 x2 b2
a11 a12
| A| a11a22 a12 a21 0
a21 a22
j 1 j 1
Show an example.
0 1 4 0 0 4
e.g. 0 0 0 1 0 2 is in row-canonical form.
0 0 0 0 1 3
L1 : 2x1 x2 x3 4
L2 : x1 2x2 3x3 6
L3 : x1 x2 x3 1
The augmented matrix is
2 1 1 4 2 1 1 4
1 2 3 6 0 1 4 5
1 1 1 1 0 0 7 7
x3 1,x2 1,x1 1
x2 1.001 (tolerable),
this gives us
x1 10.00 (outrageous)_
x1 1.000 x2 10.00
Failure of partial pivoting. If we scale equation 1 by
10 4 , then we get
| ak 1 | |a j1 |
step 2: Choose k such that max
sk j 1..n sj
Augmented equation.
3 13 9 3 19
6 4 1 18 34
6 2 2 4 16
12 8 6 10 26
| ali ,1 | 3 6 6 12
Compute now
sli
i 4 , , ,
13 18 6 12
0 12 8 1 27
0 2 3 14 18
A
6 2 2 4 16
0 4 2 2 6
0 12 8 1 27
0 0 13 / 3 83 / 6 45 / 2
A
6 2 2 4 16
0 0 2/3 5/3 3
2x 3 y z 8
x y 2z 1
x y 3z 6
x( k ) 4 1.5 y( k 1 ) 0.5z ( k 1 )
y ( k ) 1 x( k 1 ) 2z ( k 1 )
z ( k ) 2 0.3333x( k 1 ) 0.3333 y( k 1 )
A D L U
D Diagonal matrix
L Lower Triangular
U=Upper Triangular
e.g.
2 5 3 2 0 0 0 0 0 0 5 3
1 6 4 0 6 0 1 0 0 0 0 4
3 2 1 0 0 1 3 2 0 0 0 0
Given this Ax b becomes
( D L U )x b or Dx=(L+U)x+b
or x=D -1 ( L U )x D 1b
1 1 1 0
A A 1 3 0 b= 2 with this
1 0 2 -3
A D L U , and here
1 0 0 0 -1 1
D 0 3 0 L+U= 1 0 0
0 0 2 -1 0 0
1 0 0
1 0
Now, D 0 0.3333
0 0 0.5
Therefore,
1 0 0 0 1 1
D 1 ( L U ) 0 0.3333 0 1 0 0
0 0 0.5 1 0 0
0 1 1
= 0.3333 0 0
0.5 0 0
1 0 0 0 0
1 0 2 0.6666
and D b 0 0.3333
0 0 0.5 3 1.5
0 1 1 0
x ( k 1 ) 0.3333 0 0 x( k ) 0.6666
0.5 0 0 1.5
0 0.666667 1.5
0.833333 0.944444 1.91667
0.972222 0.990741 1.98611
0.99537 0.998457 1.99769
0.999228 0.999743 1.99961
0.999871 0.999957 1.99994
0.999979 0.999993 1.99999
0.999996 0.999999 2
0.999999 1 2
1 1 2
( D L )x Ux b or x=(D-L)-1Ux ( D L )1 b .
x( k 1 ) ( D L )1Ux( k ) ( D L )1 b
1 i 1 n
k
bi aij x j aij x j
( k 1 ) ( k 1 )
xi
aii j 1 j i 1