Sec 3.1 Introduction to Linear System Sec 3.2 Matrices and Gaussian Elemination The graph is a line...

24
(eq3) 23 9 7 2 (eq2) 20 7 8 3 (eq1 4 2 z y x z y x z y x Example Sec 3.1 Introduction to Linear System Sec 3.2 Matrices and Gaussian Elemination n) (eq a a a a 2) (eq a a a a 1) (eq a a a a 1 nn 3 n3 2 n2 1 n1 1 2n 3 23 2 22 1 21 1 1n 3 13 2 12 1 11 b x x x x b x x x x b x x x x n n n equatio Linea of System ) ( 1 9 ) ( 5 2 3 eq2 eq1 y x y x The graph is a line in xy-plane The graph is a line in xyz-plane

Transcript of Sec 3.1 Introduction to Linear System Sec 3.2 Matrices and Gaussian Elemination The graph is a line...

Page 1: Sec 3.1 Introduction to Linear System Sec 3.2 Matrices and Gaussian Elemination The graph is a line in xy-plane The graph is a line in xyz-plane.

(eq3) 23972

(eq2) 20783

(eq1) 4 2

zyx

zyx

zyxExample

Sec 3.1 Introduction to Linear System

Sec 3.2 Matrices and Gaussian Elemination

n) (eq aa aa

2) (eq aa aa

1) (eq aa aa

1nn3n32n21n1

12n323222121

11n313212111

bxxxx

bxxxx

bxxxx

n

n

n

equationsLinear of

System

)( 19 )( 523

eq2

eq1

yxyx

The graph is a line in xy-plane

The graph is a line in xyz-plane

Page 2: Sec 3.1 Introduction to Linear System Sec 3.2 Matrices and Gaussian Elemination The graph is a line in xy-plane The graph is a line in xyz-plane.

(eq3) 23972

(eq2) 20783

(eq1) 4 2

zyx

zyx

zyxExample

Sec 3.1 Introduction to Linear System

972

783

121

23972

20783

4121

Coefficient Matrix3 x 3

Augmented Coefficient Matrix3 x 4

Sec 3.2 Matrices and Gaussian Elemination

Page 3: Sec 3.1 Introduction to Linear System Sec 3.2 Matrices and Gaussian Elemination The graph is a line in xy-plane The graph is a line in xyz-plane.

23972

20783

4121Example

Sec 3.1 Introduction to Linear System

Augmented Coefficient Matrix3 x 4

Sec 3.2 Matrices and Gaussian Elemination

Size, shape

row

column

columnth -j and rowth -iin element denotes ija

23aExample 7

Page 4: Sec 3.1 Introduction to Linear System Sec 3.2 Matrices and Gaussian Elemination The graph is a line in xy-plane The graph is a line in xyz-plane.

n) (eq aa aa

2) (eq aa aa

1) (eq aa aa

1nn3n32n21n1

12n323222121

11n313212111

bxxxx

bxxxx

bxxxx

n

n

n

System

Linear

nnnn

n

n

aaa

aaa

aaa

21

22221

11211

nnnnn

n

n

baaa

baaa

baaa

21

222221

111211

Coefficient Matrixn x n

Augmented Coefficient Matrixn x (n+1)

Sec 3.1 Introduction to Linear System

Sec 3.2 Matrices and Gaussian Elemination

Page 5: Sec 3.1 Introduction to Linear System Sec 3.2 Matrices and Gaussian Elemination The graph is a line in xy-plane The graph is a line in xyz-plane.

Example

Sec 3.1 Introduction to Linear System

Sec 3.2 Matrices and Gaussian Elemination

199 123

yxyx

systemlinear theofsolution a is 2

1

y

x

Page 6: Sec 3.1 Introduction to Linear System Sec 3.2 Matrices and Gaussian Elemination The graph is a line in xy-plane The graph is a line in xyz-plane.

Three Possibilities

Linear System

Unique Solution

1

02

yxyx

Example

Infinitely many

solutions

2

2221

yxyx

Example

NoSolution

3

21

yxyx

Example

InconsistentInconsisten

tconsistent

consistent

Page 7: Sec 3.1 Introduction to Linear System Sec 3.2 Matrices and Gaussian Elemination The graph is a line in xy-plane The graph is a line in xyz-plane.

How to solve any linear system

Triangular system

*

*

*

z

y

x

Use back substitution

****

****

****

****

****

****

zyx

zyx

zyx Augmented

*100

**10

***1

Page 8: Sec 3.1 Introduction to Linear System Sec 3.2 Matrices and Gaussian Elemination The graph is a line in xy-plane The graph is a line in xyz-plane.

Elementary Row OperationsMultiply one row by a nonzero constant1 iR * C

Interchange two rows

2ji R R

Add a constant multiple of one row to another row

3ji R R * C

(eq3) 11892

(eq2) 5 23

(eq1) 221083

zyx

zyx

zyxExample

Triangular system

****

****

****

*100

**10

***1

Page 9: Sec 3.1 Introduction to Linear System Sec 3.2 Matrices and Gaussian Elemination The graph is a line in xy-plane The graph is a line in xyz-plane.

How to solve any linear system

****

****

****

****

****

***1

***0

***0

***1

***0

**10

***1

**00

**10

***1

*100

**10

***1

Page 10: Sec 3.1 Introduction to Linear System Sec 3.2 Matrices and Gaussian Elemination The graph is a line in xy-plane The graph is a line in xyz-plane.

(eq3) 23972

(eq2) 20783

(eq1) 4 2

zyx

zyx

zyxExample

(-3) R1 + R2

(-2) R1 + R3

(-3) R2 + R3

Augmented Matrix

23972

20783

4121

15730

8420

4121(1/2) R2

3100

4210

4121

15730

4210

4121

3100

4210

4121

Convert into triangular matrix

triangular matrix

Page 11: Sec 3.1 Introduction to Linear System Sec 3.2 Matrices and Gaussian Elemination The graph is a line in xy-plane The graph is a line in xyz-plane.

Example Convert into triangular matrix

(eq3) 11892

(eq2) 5 23

(eq1) 221083

zyx

zyx

zyx

Page 12: Sec 3.1 Introduction to Linear System Sec 3.2 Matrices and Gaussian Elemination The graph is a line in xy-plane The graph is a line in xyz-plane.

How to solve any linear system

Triangular system

*

*

*

z

y

x

Use back substitution

****

****

****

****

****

****

zyx

zyx

zyxAugmented

*100

**10

***1

(eq3) 23972

(eq2) 20783

(eq1) 4 2

zyx

zyx

zyx

ExampleSolve

3100

4210

4121

Page 13: Sec 3.1 Introduction to Linear System Sec 3.2 Matrices and Gaussian Elemination The graph is a line in xy-plane The graph is a line in xyz-plane.

(eq3) 23972

(eq2) 20783

(eq1) 4 2

zyx

zyx

zyxExample

(-3) R1 + R2

(-2) R1 + R3

(-3) R2 + R3

Augmented Matrix

23972

20783

4121

15730

8420

4121(1/2) R2

3100

4210

4121

15730

4210

4121

Definition: (Row-Equivalent Matrices)

A and B are row equivalent if B can be obtained from A by a finite sequence of elementary row operations

A

B

Convert into triangular matrix

Example A and B are row equivalent

Page 14: Sec 3.1 Introduction to Linear System Sec 3.2 Matrices and Gaussian Elemination The graph is a line in xy-plane The graph is a line in xyz-plane.

Example

23972

20783

4121

3100

4210

4121

Definition: (Row-Equivalent Matrices)

A and B are row equivalent if B can be obtained from A by a finite sequence of elementary row operations

A B

A and B are row equivalent

A is the augmented matrix of sys(1)B is the augmented matrix of sys(2)

The

orem

1:

A and B are row equivalent&

sys(1) and sys(2) have same solution

Page 15: Sec 3.1 Introduction to Linear System Sec 3.2 Matrices and Gaussian Elemination The graph is a line in xy-plane The graph is a line in xyz-plane.

Echelon Matrix

000000

430120

000000

020000

110101

zero row

Example How many zero rows

000000

000000

100000

021020

110101

010000

000001

100000

021020

110101

Page 16: Sec 3.1 Introduction to Linear System Sec 3.2 Matrices and Gaussian Elemination The graph is a line in xy-plane The graph is a line in xyz-plane.

Echelon Matrix

non-zero row

Example

1) How many non-zero rows

2) Find all leading entries

000000

000000

100000

021020

110101

010000

000001

100000

021020

110101

000000

430120

000000

020000

110101

leading entry The first (from left) nonzero element in each nonzero row

0000

1120

1101

Page 17: Sec 3.1 Introduction to Linear System Sec 3.2 Matrices and Gaussian Elemination The graph is a line in xy-plane The graph is a line in xyz-plane.

Echelon Matrix

Def: A matrix A in row-echelon form if

1) All zero rows are at the bottom of the matrix

2) In consecutive nonzero rows the leading in the lower row appears to the right of the leading in the higher row

1 5 0 2

0 1 0 1

0 0 0 0

A

1

1 5 0 2

0 2 0 1

0 0 0 0

A

2

1 5 0 2

0 0 1 1

0 1 0 1

A

3

1 5 0 2

0 0 0 0

0 1 0 1

A

1100000

0120000

1010000

2020010

000

000

000

4A

111

111

111

5A

Page 18: Sec 3.1 Introduction to Linear System Sec 3.2 Matrices and Gaussian Elemination The graph is a line in xy-plane The graph is a line in xyz-plane.

How to transform a matrix into echelon form

****

****

**** Echelon

Gaussian Elimination

111010

001110

010100

1101001) Locate the first nonzero column

2) In this column, make the top entry nonzero

3) Use this nonzero entry to (below zeros )

4) Repeat (1-3) for the lower right matrix

111010

110100

010100

001110

31 RR

41 RR

110100

110100

010100

001110

Example

Page 19: Sec 3.1 Introduction to Linear System Sec 3.2 Matrices and Gaussian Elemination The graph is a line in xy-plane The graph is a line in xyz-plane.

Echelon Matrix

Reduce the augmented matrix to echelon form.

age160Example5/p

275610637103842

10232

54321

54321

54321

xxxxxxxxxx

xxxxx

741000

320100

1012321

Page 20: Sec 3.1 Introduction to Linear System Sec 3.2 Matrices and Gaussian Elemination The graph is a line in xy-plane The graph is a line in xyz-plane.

How to solve any linear system

Gaussian Elimination

*

*

*

z

y

x

Use back substitution

****

****

****

****

****

****

zyx

zyx

zyx Augmented

Echelon

Page 21: Sec 3.1 Introduction to Linear System Sec 3.2 Matrices and Gaussian Elemination The graph is a line in xy-plane The graph is a line in xyz-plane.

Leading variables and Free variables

0100000

9103100

4011211

leading Variables

1x 2x 3x 4x 5x 6x

Free Variables

631 ,, xxx542 ,, xxx

Page 22: Sec 3.1 Introduction to Linear System Sec 3.2 Matrices and Gaussian Elemination The graph is a line in xy-plane The graph is a line in xyz-plane.

AlgorithmBack Substitution

1) Set each free variable to parameter ( s, t, …)

2) Solve for the leading variables. Start from last row.

5710

10251

2Ex4/page16

x y z

sz Second row gives:

zy 75 sy 75

first row gives:zyx 2510

ssx 2)75(510 sx 3335

Thus the system has an infinite solution set consisting of all (x,y,z) given in terms of the parameter s as follows

sx 3335 sy 75

sz

Page 23: Sec 3.1 Introduction to Linear System Sec 3.2 Matrices and Gaussian Elemination The graph is a line in xy-plane The graph is a line in xyz-plane.

23

Example

2100

6310

5211

Back Substitution

The linear systems are in echelon form, solve each by back substitution

Ex1/p162

051000

0731310

0117251

Ex10/p162

Page 24: Sec 3.1 Introduction to Linear System Sec 3.2 Matrices and Gaussian Elemination The graph is a line in xy-plane The graph is a line in xyz-plane.

24

Quiz #1 on Saturday

Sec 3.1 + Sec 3.2