Solving The Linear Equations through The Gauss Elimination
-
Upload
ronan-austin -
Category
Documents
-
view
50 -
download
0
description
Transcript of Solving The Linear Equations through The Gauss Elimination
Solving The Linear Equations
through The Gauss Elimination
Soon-Young Min
Department Of Physics
Kangwon National University
Gauss Elimination Standard method for solving linear systems.
A linear system of n equations matrix
bxaxaxa
bxaxaxa
nnnnnn
nn
2211
22222121
nnnnnn
n
n
b
b
b
x
x
x
aaa
aaa
aaa
.
.
.
.
...
...
...
...
...
2
1
2
1
21
22221
1121111212111 bxaxaxa nn
…
① multiply or divide a row by a non-zero constant factor
② add to, or subtract from, one row a multiple of another row
③ interchange two row
Convert this to triangular form;
A process of upper-triangular with all diagonal
b
bb
x
xx
a
aaaaa
nnnn
n
n
.
.
.
.
...
....
...
...
...
2
1
2
1
222
11211
00
0
Augmented Matrix W
Define matrix W in the system AX = b.
baa
baabaa
nnnn
n
n
bAw...
....
...
...
...
],[
1
2221
1111
Algorithm (Upper-triangular)Initialize the n-vector p to have pi = i, I = 1, … ,n.
For k = 1, … , n, do; set m and , m equal to .
For j = k+1, … , n+1, do; set
w kp, ww
kp
kp
,
,
mwww jpjpjp ,,,
(Back substitution)
For k = n, n-1, … , 1 , do;
a
xabx
kk
kjjjkk
k
1calculate
Programming with C