chapter 4.4 solving systems of equations by matrices

25
Chapter 4.4 Solving Systems of Equations by matrices

Upload: aubrie-sheila-floyd

Post on 27-Dec-2015

228 views

Category:

Documents


5 download

TRANSCRIPT

Chapter 4.4

Solving Systems of Equations by matrices

Objectives

Use matrices to solve a system of two equations.

Use matrices to solve a system of three equations.

What is a matrix?

A matrix (plural: matrices) is a rectangular array of numbers. The following are examples of matrices:

11 12

21 22

2 11 0

0 1 40 1

3 1

3

6

a a

a a

Matrices

The numbers aligned horizontally in a matrix are in the same row. The numbers aligned vertically are in the same column.

2 1 0

1 6 2

row 1

row 2

column 2

column1

column 3

This matrix has 2 rows and 3 columns.It is called a 2 X 3(read “two by three”) matrix.

How do equations and matrices relate?

System of Equations Corresponding

(in standard form) Matrix

2 3 6

0

x y

x y

2 3 6

1 1 0

The rows of the matrix correspond to the equations in the system. The Coefficients of each variable are placed to the left of the vertical dashed line.Matrices are a shorthand notation for representing systems of equations.

Elementary Row Operations Any two rows in a matrix may be interchanged. The elements of any row may be multiplied (or

divided) by the same nonzero number. The elements of any row may be multiplied (or

divided) by a nonzero number and added to their corresponding elements in any other row. Notice that these row operations are the same

operations that we can perform on equations in a system.

Solving a system of 2 equations by matrices

Matrix System of Equations

1 2 3

0 1 5

1 2 3 2 3

0 1 5 5

x y x yor

x y y

In the second equation, we have y = 5. Substituting this in the first equation, we have x + 2(5) = -3 or x = - 13. The solution of the system in ordered pair is ( -13, 5)

Example 1:

Use matrices to solve the system:

Step 1: Set up the corresponding matrix

3 5

2 4

x y

x y

1 3 5

2 1 4

Example 1: Continued

Step 2: Use elementary row operations to write an equivalent matrix that looks like:

In the given matrix, the element in the first row is already 1, as desired. Next we write an equivalent matrix with a 0 below the 1. To do this, we multiply row 1 by -2 and add to row 2. We will change only row 2.

1 3 5

2 1 4

1

0 1

a b

c

1 3 5

2(1) 2 2(3) 1 2(5) 4

Row 1element

Row 2element

Row 1element

Row 1element

Row 2element

Row 2element

Simplifies to: 1 3 5

0 7 14

Example 1: Continued

Step 3: Now we change -7 to a 1 by use of an elementary row operation. We dived row 2 by -7

1 3 5

0 7 14

7 7 7

1 3 51 3 5

0 7 140 1 2

simplifies to

Example 1: Continued

The last matrix corresponds to the system:

To find x, we let y = 2 in the first equation.x + 3(2) = 5

x = -1

The ordered pair solution is (-1, 2). Check to see that this ordered pair satisfies the equations.

3 5

2

x y

y

1 3 5

0 1 2

Let’s try another one!

Use matrices to solve:

Step 1: Set up matrix

Step 2: Write an equivalent matrix that looks like:

To do this, multiply the first row by -2 and add to row 2. Leave row 1 the same!

2 4

2 3 13

x y

x y

1 2 4

2 3 13

Simply take the coefficientfrom each variable…

1

0 1

a b

c

2 2 2

1 2 4

(1) 2 (2) 3 ( 4) 13

1 2 4

0 7 21simplifies to

Let’s try another one!

Step 3: Now change the -7 to 1 by using elementary row operation. We divide row 2 by -7

Step 4: Write the system that corresponds to the matrix:

Step 5: Substitute to find the unknown variable.

x + 2y = -4

x + 2 (-3) = -4

x – 6 = -4

x = 2

1 2 41 2 4

0 7 21

70

71

73

simplifies to

2 4

3

x y

y

The ordered pair solutionis (2, -3)

Give it a try!

Use matrices to solve: 1

2 4

x y

x y

Solution: (2, -1)

Example 2: Use matrices to solve the system:

Step 1: Set up a corresponding matrix

Step 2: To get 1 in the row 1, column 1 position, we divide the elements of row 1 by 2.

2 3

4 2 5

x y

x y

2 1 3 1 31

2 24 2 54 2 5

2 2 2 simplifies to

2 1 3

4 2 5

Example 2 Continued Step 3: To get 0 under 1, we multiply the elements of

row 1 by -4 and add the new elements to the elements of row 2.

1 31

2 21 3

(1) 4 ( ) 2 (4 4 52

4 )2

1 31

2 20 0 1

simplifies to

Step 4: Write a correspondingsystem:

1 3

2 20 1

x y

The equation 0 = -1 is false for all y or x values; hence the system has no solution!

Concept Check:

Consider the system

What is wrong with the corresponding matrix shown below?

2 3 8

5 3

x y

x y

2 3 8

0 5 3

Answer bottom left on page 251

Give it a try!

Use matrices to solve: 3 0

6 2 2

x y

x y

Solution: Null Set

Solving a system of three equation in three variables using matrices The matrix must be written in the following

form: 1

0 1

0 0 1

a b d

c e

f

Example 3 Use matrices to solve the system:

Step 1: Set up a corresponding matrix

2 2

2 2 5

3 2 8

x y z

x y z

x y z

1

1

2

2

1 3

2 1 2

2 5

8

Our goal is to write an equivalent matrix with 1’s along the diagonal…seethe numbers in red and 0’s below the 1’s. The element in row 1, column 1 is already 1. Next we get 0’s for each element in the rest of column 1. The numbers in blue need to get changed to zeros.

Example 3: Continued Step 2: Multiply the elements in row 1 by 2 and add the

new elements to row 2. Multiply the elements of row 1 by -1 and add the new elements to the elements of row 3. We do not change row 1!

2 1 2 5

1

2 2 2 2

1 1

1 2 1 2

(1) 2 (1) (2)

(1) (2) 1 13 21 (2) 8( )

Green = Row 1Pink = # multiplied by

1 2 1 2

0 3 4 9

0 1 3 10

simplifies to

Example 3 Continued

Step 4: We continue down the diagonal and use elementary row operations to get 1 where the element 3 is now. To do this, we interchange rows 2 and 3.

1 2 1 2

0 3 4 9

0 1 3 10

1 2 1 2

0 1 3 10

0 3 4 9

is equivalent to

Example 3: Continued

Step 5: Next we want the new row 3, column 2 element to be 0. We multiply the elements of row 2 by -3 and add the result to the elements of row 3.

0 (1) ( 3)

1 2 1 2

0 1 3 10

0 3 4 9( 103 3 3 3 )

Green = Row 2Pink = # multiplied by

1 2 1 2

0 1 3 10

0 0 13 39

simplifies to

Example 3: Continued

Step 6: Finally, we divide the elements of row 3 by 13 so that the final diagonal element is 1.

13 13 13

1 2 1 2

0 1 3 10

0 9

1

0 13 3

3

1 2 1 2

0 1 3 10

0 0 1 3

simplifies to

Step 7: Write the system that correspondsto the matrix.

2 2

3 10

3

x y z

y z

z

Step 8: Substitute z = 3 into the 2nd equationy – 3(3) = -10

y – 9 = -10 y = -1

Step 9: Substitute z =3 and y = -1 into the 1st equationx + 2(-1) + 3 = 2

x – 2 + 3 = 2x + 1 = 2

x = 1

Ordered triplesolution:(1, -1, 3)

Give it a try!

Use matrices to solve: 3 5

3 3 5

2 2 9

x y z

x y z

x y z

Ordered triple solution: (1, 2, -2)