systems of linear equations let’s say you need to solve the following for x, y, & z: 2x + y...

10
Systems of Linear Equations Let’s say you need to solve the following for x, y, & z: 2x + y – 2z = 10 3x + 2y + 2z = 1 5x + 4y + 3z = 4 Two methods Gaussian elimination Cramer’s rule

Upload: john-gray

Post on 27-Dec-2015

214 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Systems of Linear Equations Let’s say you need to solve the following for x, y, & z: 2x + y – 2z = 10 3x + 2y + 2z = 1 5x + 4y + 3z = 4 Two methods –Gaussian

Systems of Linear Equations

• Let’s say you need to solve the following for x, y, & z:

2x + y – 2z = 10

3x + 2y + 2z = 1

5x + 4y + 3z = 4

• Two methods– Gaussian elimination– Cramer’s rule

Page 2: Systems of Linear Equations Let’s say you need to solve the following for x, y, & z: 2x + y – 2z = 10 3x + 2y + 2z = 1 5x + 4y + 3z = 4 Two methods –Gaussian

Gaussian Elimination

• For any system of independent linear equations,

we can set up the following augmented matrix:

and perform elementary row operations to reduce it to row-echelon form …

BAX

BA

Page 3: Systems of Linear Equations Let’s say you need to solve the following for x, y, & z: 2x + y – 2z = 10 3x + 2y + 2z = 1 5x + 4y + 3z = 4 Two methods –Gaussian

Our Example1. Multiply row 1 by 0.5 …

2. Multiply row 1 by -3 and add to row 2 …

4345

1223

10212

Page 4: Systems of Linear Equations Let’s say you need to solve the following for x, y, & z: 2x + y – 2z = 10 3x + 2y + 2z = 1 5x + 4y + 3z = 4 Two methods –Gaussian

Our example (cont.)

3. Continue until we have row-echelon form …

Page 5: Systems of Linear Equations Let’s say you need to solve the following for x, y, & z: 2x + y – 2z = 10 3x + 2y + 2z = 1 5x + 4y + 3z = 4 Two methods –Gaussian

Our example (concl.)

4. This corresponds to

____________________ = ____

_____________ = ____

______ = ____

Page 6: Systems of Linear Equations Let’s say you need to solve the following for x, y, & z: 2x + y – 2z = 10 3x + 2y + 2z = 1 5x + 4y + 3z = 4 Two methods –Gaussian

Alternative Method – Cramer’s Rule

1. Convert A to Ai where Ai are the matrices obtained by replacing the ith column with B:

345

223

212

A

344

221

2110

1A

3

2

A

A

Page 7: Systems of Linear Equations Let’s say you need to solve the following for x, y, & z: 2x + y – 2z = 10 3x + 2y + 2z = 1 5x + 4y + 3z = 4 Two methods –Gaussian

Cramer’s Rule (cont.)

2. Find the determinants of each of these matrices:

D = det(A) = _______

N1 = det(A1) = _______

N2 = det(A2) = _______

N3 = det(A3) = _______

Page 8: Systems of Linear Equations Let’s say you need to solve the following for x, y, & z: 2x + y – 2z = 10 3x + 2y + 2z = 1 5x + 4y + 3z = 4 Two methods –Gaussian

Cramer’s Rule (concl.)

3. The unique solution is now found by:

x = N1/D = _______

y = N2/D = _______

z = N3/D = _______

Page 9: Systems of Linear Equations Let’s say you need to solve the following for x, y, & z: 2x + y – 2z = 10 3x + 2y + 2z = 1 5x + 4y + 3z = 4 Two methods –Gaussian

Cramer’s Rule Works If and Only If …

1. Number of equations = number of unknowns

2. D ≠ 0

Page 10: Systems of Linear Equations Let’s say you need to solve the following for x, y, & z: 2x + y – 2z = 10 3x + 2y + 2z = 1 5x + 4y + 3z = 4 Two methods –Gaussian

Homework

Solve each of the following systems of linear equations,

a) using Gaussian Elimination

b) using Cramer’s Rule

1. 2x + y – z = 3

x + y + z = 1

x – 2y – 3z = 4

2. x – 3y – 2z = 6

2x – 4y – 3z = 8

-3x + 6y + 8z = -5