1 math 250 linear equations and matrices. 2 topics preliminaries systems of linear equations...

48
1 MATH 250 Linear Equations and Matrices

Upload: beverly-clarke

Post on 27-Dec-2015

219 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: 1 MATH 250 Linear Equations and Matrices. 2 Topics Preliminaries Systems of Linear Equations Matrices Algebraic Properties of Matrix Operations Special

1

MATH 250Linear Equations and Matrices

Page 2: 1 MATH 250 Linear Equations and Matrices. 2 Topics Preliminaries Systems of Linear Equations Matrices Algebraic Properties of Matrix Operations Special

2

Topics

• Preliminaries

• Systems of Linear Equations

• Matrices

• Algebraic Properties of Matrix Operations

• Special Types of Matrices and Partitioned Matrices

• Matrix Transformations

Page 3: 1 MATH 250 Linear Equations and Matrices. 2 Topics Preliminaries Systems of Linear Equations Matrices Algebraic Properties of Matrix Operations Special

3

Systems of Linear EquationsSystem of m equations in n unknowns

a11x1 a12x2 a1nxn b1a21x1 a22x2 a2nxn b2

am1x1 am2x2 amnxn bm

Page 4: 1 MATH 250 Linear Equations and Matrices. 2 Topics Preliminaries Systems of Linear Equations Matrices Algebraic Properties of Matrix Operations Special

4

Systems of Linear EquationsComments

• If a system has a solution, call it consistent

• If a system doesn’t have a solution, call it inconsistent

• If , the system is called homogeneous. A homogeneous system always has the trivial solution

• If two systems have the same solution, then they are called equivalent. The solution strategy for linear systems is to transform the system through a series of equivalent systems until the solution is obvious

b1 b2 bm 0

x1 x2 xn 0

Page 5: 1 MATH 250 Linear Equations and Matrices. 2 Topics Preliminaries Systems of Linear Equations Matrices Algebraic Properties of Matrix Operations Special

5

Page 6: 1 MATH 250 Linear Equations and Matrices. 2 Topics Preliminaries Systems of Linear Equations Matrices Algebraic Properties of Matrix Operations Special

6

Page 7: 1 MATH 250 Linear Equations and Matrices. 2 Topics Preliminaries Systems of Linear Equations Matrices Algebraic Properties of Matrix Operations Special

7

MatricesSystems of Equations• Consider

• Define

• Express system as AX B

a11x1 a12x2 a1nxn b1a21x1 a22x2 a2nxn b2

am1x1 am2x2 amnxn bm

11 12 1 1 1

21 22 2 2 2

1 2

n

n

mn n mm m

a a a x ba a a x b

a a a x b

A X B

Page 8: 1 MATH 250 Linear Equations and Matrices. 2 Topics Preliminaries Systems of Linear Equations Matrices Algebraic Properties of Matrix Operations Special

8

Matrices

Systems of Equations

• Since the solution of the system involves the a and b values only, will often work with the augmented matrix

11 12 1 1

21 22 2 2

1 2

n

n

mn mm m

a a a ba a a b

a a a b

Page 9: 1 MATH 250 Linear Equations and Matrices. 2 Topics Preliminaries Systems of Linear Equations Matrices Algebraic Properties of Matrix Operations Special

9

Systems of Linear Equations

Elementary Operations on Systems

1) Switch two equations

2) Multiply an equation by nonzero constant

3) Add multiple of one equation to another

The application of any combination of elementary

operations to a linear system yields a new linear system

that is equivalent to the first

Page 10: 1 MATH 250 Linear Equations and Matrices. 2 Topics Preliminaries Systems of Linear Equations Matrices Algebraic Properties of Matrix Operations Special

10

Inverting a Matrix

• Usually not a good idea to compute x=A-1b– Inefficient– Prone to roundoff error

• In fact, compute inverse using linear solver– Solve Axi=bi where bi are columns of identity,

xi are columns of inverse

– Many solvers can solve several R.H.S. at once

Page 11: 1 MATH 250 Linear Equations and Matrices. 2 Topics Preliminaries Systems of Linear Equations Matrices Algebraic Properties of Matrix Operations Special

11

Solving Linear Systems Using Gaussian Elimination

• Write the augmented matrix for the system• Use matrix row operations to simplify the

matrix to one with 1s down the diagonal from upper left to lower right, and 0s below the 1s

• Write the system of linear equations corresponding to the matrix in step 2, and use back-substitution to find the system’s solutions

Page 12: 1 MATH 250 Linear Equations and Matrices. 2 Topics Preliminaries Systems of Linear Equations Matrices Algebraic Properties of Matrix Operations Special

12

Page 13: 1 MATH 250 Linear Equations and Matrices. 2 Topics Preliminaries Systems of Linear Equations Matrices Algebraic Properties of Matrix Operations Special

13

Page 14: 1 MATH 250 Linear Equations and Matrices. 2 Topics Preliminaries Systems of Linear Equations Matrices Algebraic Properties of Matrix Operations Special

Theorem 1: Equivalent systems and equivalent matrices:

If the augmented coefficient matrices of two linear systems are row equivalent, then the two systems have the same solution set.

14

Definition: Echelon MatrixThe matrix E is called an echelon matrix provided it has the following two properties:

1. Every row of E that consists entirely of zeros (if any) lies beneath every row that contains a nonzero

element.2. In each row of E that contains a nonzero element,

the nonzero element lies strictly to the right of the first nonzero element in the preceding row (if there is a preceding row).

Page 15: 1 MATH 250 Linear Equations and Matrices. 2 Topics Preliminaries Systems of Linear Equations Matrices Algebraic Properties of Matrix Operations Special

Use matrices to solve the system

25=2z+3y+x

19=2z+y+x

31=2z+y+3x

SolutionStep 1 Write the augmented matrix for the system.

Linear System Augmented Matrix

25=2z+3y+x19=2z+y+x31=2z+y+3x

25231

19211

31213

Example

Page 16: 1 MATH 250 Linear Equations and Matrices. 2 Topics Preliminaries Systems of Linear Equations Matrices Algebraic Properties of Matrix Operations Special

SolutionStep 2 Use matrix row operations to simplify the matrix to one with 1s down the diagonal from upper left to lower right, and 0s below the 1s. Our goal is to obtain a matrix of the form

f100ed10cba1

.

Our first step in achieving this goal is to get 1 in the top position of the first column.

252311921131213

To get 1 in this position, we interchange rows 1 and 2. (We could also interchange rows 1 and 3 to attain our goal.)

252313121319211 This was row 2; now it’s row 1.

This was row 1; now it’s row 2.

We want 1 in this position.

Example cont.

Page 17: 1 MATH 250 Linear Equations and Matrices. 2 Topics Preliminaries Systems of Linear Equations Matrices Algebraic Properties of Matrix Operations Special

SolutionNow we want to get 0s below the 1 in the first column.

252313121319211

Now add these products to the corresponding numbers in row 2. Notice that although we use row 1 to find the products, row 1 does not change.

We want 0 in these positions.

Let’s first get a 0 where there is now a 3. If we multiply the top row of numbers by –3 and add these products to the second row of numbers, we will get 0 in this position. The top row of numbers multiplied by –3 gives

-3(1) or –3, -3(1) or –3, -3(2) or –6, -3(19) or –57.

2523131 + (-3)2 + (-3)1 + (-3)3 + (-3)

19211

25231-26-4-2019211

=

We want 0 in this position.

Example cont.

Page 18: 1 MATH 250 Linear Equations and Matrices. 2 Topics Preliminaries Systems of Linear Equations Matrices Algebraic Properties of Matrix Operations Special

Solution

Now add these products to the corresponding numbers in row 3.

We are not yet done with the first column. If we multiply the top row of numbers by –1 and add these products to the third row of numbers, we will get 0 in this position. The top row of numbers multiplied by –1 gives

-1(1) or –1, -1(1) or –1, -1(2) or –2, -1(19) or –19.

25+(-19)2 + (-2)3 + (-1)1 + (-1)-26-4-2019211

6020-26-4-2019211

=

We want 1 in this position.

6020-26-4-2019211

We move on to the second column. We want 1 in the second row, second column.

Example cont.

Page 19: 1 MATH 250 Linear Equations and Matrices. 2 Topics Preliminaries Systems of Linear Equations Matrices Algebraic Properties of Matrix Operations Special

SolutionTo get 1 in the desired position, we multiply –2 by its reciprocal, -1/2. Therefore, we multiply all the numbers in the second row by –1/2 to get

6020› (-26)› (-4)› (-2)› (0)

19211

60201321019211

=

We want 0 in this position.

Now add these products to the corresponding numbers in row 3.

We are not yet done with the second column. If we multiply the top row of numbers by –2 and add these products to the third row of numbers, we will get 0 in this position. The second row of numbers multiplied by –2 gives

-2(0) or 0, -2(1) or –2, -2(2) or –4, -2(13) or –26.

6+(-26)0 + (-4)2 + (-2)0 + 01321019211

-20-4001321019211

=

Example cont.

Page 20: 1 MATH 250 Linear Equations and Matrices. 2 Topics Preliminaries Systems of Linear Equations Matrices Algebraic Properties of Matrix Operations Special

Solution

We want 1 in this position.

-20-4001321019211

We move on to the third column. We want 1 in the third row, third column.

To get 1 in the desired position, we multiply –4 by its reciprocal, -1/4. Therefore, we multiply all the numbers in the third row by –1/4 to get

-1/4(-20)-1/4(-4)-1/4(0)-1/4(0)1321019211

51001321019211

=

We now have the desired matrix with 1s down the diagonal and 0s below the 1s.

Step 3 Write the system of linear equations corresponding to the matrix in step 2, and use back-substitution to find the system’s solution. The system represented by the matrix in step 2 is

Example cont.

Page 21: 1 MATH 250 Linear Equations and Matrices. 2 Topics Preliminaries Systems of Linear Equations Matrices Algebraic Properties of Matrix Operations Special

Solution

We immediately see that the value for z is 5. To find y, we back-substitute 5 for z in the second equation.

5=z13=2z+y19=2z+y+x

252311921131213

y + 2z = 13 Equation 2

y + 2(5) = 13 Substitute 5 for x.

y = 3 Solve for y.

Finally, back-substitute 3 for y and 5 for z in the first equation:

x + y + 2z = 19 Equation 1

x + 3 + 2(5) = 19 Substitute 3 for y and 5 for x.

x + 13 = 19 Multiply and add.

x = 6 Subtract 13 from both sides.

The solution set for the original system is {(6, 3, 5)}.

Example cont.

Page 22: 1 MATH 250 Linear Equations and Matrices. 2 Topics Preliminaries Systems of Linear Equations Matrices Algebraic Properties of Matrix Operations Special

22

Page 23: 1 MATH 250 Linear Equations and Matrices. 2 Topics Preliminaries Systems of Linear Equations Matrices Algebraic Properties of Matrix Operations Special

23

Page 24: 1 MATH 250 Linear Equations and Matrices. 2 Topics Preliminaries Systems of Linear Equations Matrices Algebraic Properties of Matrix Operations Special

24

Gaussian Elimination

Definition• A matrix is in echelon form if• Any rows consisting entirely of zeros are

grouped at the bottom of the matrix.• The first nonzero element of each row is 1.

This element is called a leading 1.• The leading 1 of each row after the first is

positioned to the right of the leading 1 of the previous row.

• (This implies that all the elements below a leading 1 are zero.)

Page 25: 1 MATH 250 Linear Equations and Matrices. 2 Topics Preliminaries Systems of Linear Equations Matrices Algebraic Properties of Matrix Operations Special

25

Page 26: 1 MATH 250 Linear Equations and Matrices. 2 Topics Preliminaries Systems of Linear Equations Matrices Algebraic Properties of Matrix Operations Special

26

Page 27: 1 MATH 250 Linear Equations and Matrices. 2 Topics Preliminaries Systems of Linear Equations Matrices Algebraic Properties of Matrix Operations Special

27

Page 28: 1 MATH 250 Linear Equations and Matrices. 2 Topics Preliminaries Systems of Linear Equations Matrices Algebraic Properties of Matrix Operations Special

28

Page 29: 1 MATH 250 Linear Equations and Matrices. 2 Topics Preliminaries Systems of Linear Equations Matrices Algebraic Properties of Matrix Operations Special

29

Page 30: 1 MATH 250 Linear Equations and Matrices. 2 Topics Preliminaries Systems of Linear Equations Matrices Algebraic Properties of Matrix Operations Special

30

Page 31: 1 MATH 250 Linear Equations and Matrices. 2 Topics Preliminaries Systems of Linear Equations Matrices Algebraic Properties of Matrix Operations Special

31

Page 32: 1 MATH 250 Linear Equations and Matrices. 2 Topics Preliminaries Systems of Linear Equations Matrices Algebraic Properties of Matrix Operations Special

32

Page 33: 1 MATH 250 Linear Equations and Matrices. 2 Topics Preliminaries Systems of Linear Equations Matrices Algebraic Properties of Matrix Operations Special

33

Page 34: 1 MATH 250 Linear Equations and Matrices. 2 Topics Preliminaries Systems of Linear Equations Matrices Algebraic Properties of Matrix Operations Special

34

Page 35: 1 MATH 250 Linear Equations and Matrices. 2 Topics Preliminaries Systems of Linear Equations Matrices Algebraic Properties of Matrix Operations Special

35

Page 36: 1 MATH 250 Linear Equations and Matrices. 2 Topics Preliminaries Systems of Linear Equations Matrices Algebraic Properties of Matrix Operations Special

36

Page 37: 1 MATH 250 Linear Equations and Matrices. 2 Topics Preliminaries Systems of Linear Equations Matrices Algebraic Properties of Matrix Operations Special

37

Page 38: 1 MATH 250 Linear Equations and Matrices. 2 Topics Preliminaries Systems of Linear Equations Matrices Algebraic Properties of Matrix Operations Special

38

Page 39: 1 MATH 250 Linear Equations and Matrices. 2 Topics Preliminaries Systems of Linear Equations Matrices Algebraic Properties of Matrix Operations Special

39

Page 40: 1 MATH 250 Linear Equations and Matrices. 2 Topics Preliminaries Systems of Linear Equations Matrices Algebraic Properties of Matrix Operations Special

40

Page 41: 1 MATH 250 Linear Equations and Matrices. 2 Topics Preliminaries Systems of Linear Equations Matrices Algebraic Properties of Matrix Operations Special

41

Page 42: 1 MATH 250 Linear Equations and Matrices. 2 Topics Preliminaries Systems of Linear Equations Matrices Algebraic Properties of Matrix Operations Special

42

Page 43: 1 MATH 250 Linear Equations and Matrices. 2 Topics Preliminaries Systems of Linear Equations Matrices Algebraic Properties of Matrix Operations Special

43

Page 44: 1 MATH 250 Linear Equations and Matrices. 2 Topics Preliminaries Systems of Linear Equations Matrices Algebraic Properties of Matrix Operations Special

44

Page 45: 1 MATH 250 Linear Equations and Matrices. 2 Topics Preliminaries Systems of Linear Equations Matrices Algebraic Properties of Matrix Operations Special

45

Example 1Solving the following system of linear equations using the method of Gaussian elimination.

Solution 412842222

1232

4321

4321

4321

xxxxxxxxxxxx

Starting with the augmented matrix, create zeros below the pivot in the first column.

4128422122112321

682001310012321

1)2(312RR

RR

At this stage, we create a zero only below the pivot.

420001310012321

2)2(3 RR

210001310012321

32

1R

Echelon formWe have arrived at the echelon form.

Page 46: 1 MATH 250 Linear Equations and Matrices. 2 Topics Preliminaries Systems of Linear Equations Matrices Algebraic Properties of Matrix Operations Special

46

The corresponding system of equation is

213

1232

4

43

4321

xxxxxxx

We get

51)2(3

3

3

xx

Substituting x4 = 2 and x3 = 5 into the first equation,

102102

1)2(2)5(32

21

21

21

xxxx

xx

Let x2 = r. The system has many solutions. The solutions are2 ,5 , ,102 4321 xxrxrx

Page 47: 1 MATH 250 Linear Equations and Matrices. 2 Topics Preliminaries Systems of Linear Equations Matrices Algebraic Properties of Matrix Operations Special

47

Example 2Solving the following system of linear equations using the method of Gaussian elimination, performing back substitution using matrices.

412842222

1232

4321

4321

4321

xxxxxxxxxxxx

SolutionWe arrive at the echelon form as in the previous example.

4128422122112321

210001310012321

Echelon formThis marks the end of the forward elimination of variables from equations. We now commence the back substitution using matrices.

Page 48: 1 MATH 250 Linear Equations and Matrices. 2 Topics Preliminaries Systems of Linear Equations Matrices Algebraic Properties of Matrix Operations Special

48

210005010050321

3)3(2

)2(1 210001310012321

RRRR 2

2100050100

100021 )3(1 RR 3

This matrix is the reduced echelon form of the original augmented matrix. The corresponding system of equations is

25

102

4

3

21

xxxx

Let x2 = r. We get same solution as previously,2 ,5 , ,102 4321 xxrxrx