Solving The Linear Equations through The Gauss Elimination

6
Solving The Linear Equations through The Gauss Elimination Soon-Young Min Department Of Physics Kangwon National University

description

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. …. Convert this to triangular form;. - PowerPoint PPT Presentation

Transcript of Solving The Linear Equations through The Gauss Elimination

Page 1: 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

Page 2: Solving The Linear Equations             through The Gauss Elimination

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

Page 3: Solving The Linear Equations             through The Gauss Elimination

① 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

Page 4: Solving The Linear Equations             through The Gauss Elimination

Augmented Matrix W

Define matrix W in the system AX = b.

baa

baabaa

nnnn

n

n

bAw...

....

...

...

...

],[

1

2221

1111

Page 5: Solving The Linear Equations             through The Gauss Elimination

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

Page 6: Solving The Linear Equations             through The Gauss Elimination

Programming with C