660 likes | 915 Views
W&C - Chapter 2. Matrices. Using Matrices to Solve Systems of Equations. Matrices are arrays of numbers that can represent many things and have many uses. Matrices can be used to represent systems of equations and to solve them systematically . 1 10 1000 – 1 20 500
E N D
W&C - Chapter 2 Matrices
Using Matrices to Solve Systems of Equations • Matrices are arrays of numbers that can represent many things and have many uses. • Matrices can be used to representsystems of equations and to solve themsystematically.1 10 1000 – 1 20 500 • The horse in the previous PowerPoint really liked this approach. I’m lazy. Tell me more!
The Coefficient Row of an Equation • Consider the following linear equation: 2x – y = 3 • Notice that the equation is entirely defined by its coefficients (2 and 1) and by its constant term (3).
The Coefficient Row of an Equation • Consider the following linear equation: 2x – y = 3 • Notice that the equation is entirely defined by its coefficients (2 and 1) and by its constant term (3). • If we were simply given the row of numbers [2 – 1 3] we could easily reconstruct the original linear equation as follows: (2) x + (– 1) y = (3) 2x – y = 3
The Coefficient Row of an Equation • Consider the following linear equation: 2x – y = 3 • Notice that the equation is entirely defined by its coefficients (2 and 1) and by its constant term (3). • If we were simply given the row of numbers [2 – 1 3] we could easily reconstruct the original linear equation as follows: (2) x + (– 1) y = (3) 2x – y = 3 • We call such a row the coefficient row of an equation.
Multiplying The Coefficient Rows • Multiplying both sides of an equation by a number corresponds to multiplying the coefficient row by the same number. • Example:
Adding The Coefficient Rows • Adding two equations corresponds to adding their coefficient rows. • Example:
Elementary Row Operations • There are three types of row operations: • Type 1:Replacing Riby aRi (where a = 0), also known as “multiplying” • Example: 3R2
Elementary Row Operations • There are three types of row operations: • Type 1:Replacing Riby aRi (where a = 0) • Example: 3R2
Elementary Row Operations • There are three types of row operations: • Type 2:Replacing Riby aRi +bRj • Example: 4R1 – 3R2
Elementary Row Operations • There are three types of row operations: • Type 2:Replacing Riby aRi +bRj • Also known as “adding a multiple of one row to another” • Example: 4R1 – 3R2 This example is about as complicated as it gets. Watch the slow demonstration on the chalkboard
Elementary Row Operations • There are three types of row operations: • Type 3:Switching the order of the rows. • Example: R1R2
Elementary Row Operations • There are three types of row operations: • Type 3:Switching the order of the rows. • Example: • You can use Excel to perform row operations. • The text shows you how to do this on W&C pages 99 and 100, but don’t do it. R1R2 • It’s important to note that row operations do not change the solutions of the corresponding systems of equations: • The new system of equations that we get by applying these row operations has the same solutions as the original one.
Solving Systems of Equations Using Row Operations • Consider this system of equations:
Solving Systems of Equations Using Row Operations • Consider this system of equations: • This system corresponds to the following augmented matrix: • We will use this matrix to solve the system of equations.
Solving Systems of Equations Using Row Operations • Step 1: Fractions are messy and annoying. Clear the fractions and/or decimals (if any) using operations of type 1: 6R1 4R2
Solving Systems of Equations Using Row Operations • Step 2: Designate the first nonzero entry in the first row as the pivot: Pivot row Pivot column
Solving Systems of Equations Using Row Operations • Step 3:Clear the pivot column using operations of type 2. • “Clearing the column” means changing the matrix so that the pivot is the only nonzero number in the column. Focusing on the pivot column, multiply each row by the absolute value of the entry currently in the other. Pivot row 4R2 1R1 Pivot column
Solving Systems of Equations Using Row Operations • Step 3: Use the pivot to clear the pivot column using operations of type 2. • “Clearing the column” means changing the matrix so that the pivot is the only nonzero number in the column. If the entries in the pivot column have opposite signs, insert a plus (+). Otherwise insert a negative (–). Pivot row 4R2 1R1 + Pivot column
Solving Systems of Equations Using Row Operations • Step 3: Use the pivot to clear the pivot column using operations of type 2. • “Clearing the column” means changing the matrix so that the pivot is the only nonzero number in the column. Pivot row 4R2 1R1 + Pivot column
Solving Systems of Equations Using Row Operations • Optional: if all the numbers in a row are multiples of an integer, divide by that integer to simplify:
Solving Systems of Equations Using Row Operations • Step 4: Select the first nonzero number in the second row as the pivot and clear its column: 1R1 3R2 + Pivot row Pivot column
Solving Systems of Equations Using Row Operations • Step 5: (Final Step) Using operations of type 1, turn each pivot into a 1: • Turning this reduced matrix back into a system of equations we find the solution to the original system of equations: or: • This procedure is called the Gauss-Jordan reduction or row reduction.
Using Matrices to Solve a System of Three Equations • Solve the system using the Gauss-Jordan reduction method:
Using Matrices to Solve a System of Three Equations • Convert the system of equations into an augmented matrix: • Note that there are no fractions or decimals to be cleared in this system.
Using Matrices to Solve a System of Three Equations • Use the pivot to clear the first column using operations of type 2.
Using Matrices to Solve a System of Three Equations • Use the pivot to clear the first column using operations of type 2. Pivot row 1R2 3R1 – 1R3 1R1 – Pivot column
Using Matrices to Solve a System of Three Equations • Simplify:
Using Matrices to Solve a System of Three Equations • Use the pivot of the second row to clear the second column using operations of type 2:
Using Matrices to Solve a System of Three Equations • Use the pivot of the second row to clear the second column using operations of type 2: 3R1 1R2 + Pivot row 3R3 4R2 – Pivot column
Using Matrices to Solve a System of Three Equations • Simplify:
Using Matrices to Solve a System of Three Equations • Use the pivot of the third row to clear the third column using operations of type 2:
Using Matrices to Solve a System of Three Equations • Use the pivot of the third row to clear the third column using operations of type 2: 1R1 7R3 – 1R2 8R3 + Pivot row Pivot column
Using Matrices to Solve a System of Three Equations • Using operations of type 1, turn each pivot into a 1: W&C pages 105-106 shows you how to use Excel for row reduction, but don’t bother yet. • Transform matrix back into a system of equations and find the solution: or: • Check the solution by substituting in the original system.
The Main Diagonal • The goal in the Gauss-Jordan reduction is to reduce the matrix to the following form: • This method aims to place 1s into all the elements in the main diagonal, with all 0s above and below. • Once the matrix has this form, returning it to a system of equations yields the solution.
Example: Using Gauss-Jordan Reduction • Bring out a blank sheet of scrap paper and use it to solve the system: Step 0: Convert the system of equations into an augmented matrix. Step 1: Clear any fractions and/or decimals using operations of type 1. Step 2: Designate the first nonzero entry in the first row as the pivot. Step 3:Clear the pivot column using operations of type 2. Step 4: Select the first nonzero number in the second row as the pivot and clear its column. (Do the same for the following rows, if any) Step 5: Using operations of type 1, turn each pivot into a 1. Optional at any point: if all the numbers in a row are multiples of an integer, divide by that integer to simplify.
Example: Using Gauss-Jordan Reduction • Convert the system of equations into an augmented matrix: • There are no fractions or decimals to be cleared in this system, but the second row can be simplified:
Example: Using Gauss-Jordan Reduction • Use the pivot to clear the first column using operations of type 2. Pivot row 2R2 2R1 – 2R3 1R1 – Pivot column
Example: Using Gauss-Jordan Reduction • Switch rows two and three to ensure the main diagonal remains nonzero: R2R3
Example: Using Gauss-Jordan Reduction • Use the pivot of the second row to clear the second column using operations of type 2:
Example: Using Gauss-Jordan Reduction • Use the pivot of the second row to clear the second column using operations of type 2: 3R1 1R2 – Pivot row R3 Pivot column
Example: Using Gauss-Jordan Reduction • Use the pivot of the third row to clear the third column using operations of type 2:
Example: Using Gauss-Jordan Reduction • Use the pivot of the third row to clear the third column using operations of type 2: 2R1 10R3 + – 2R2 1R3 Pivot row Pivot column
Example: Using Gauss-Jordan Reduction • Using operations of type 1, turn each pivot into a 1: • Transform matrix back into a system of equations and find the solution: or: • Check the solution by substituting in the original system.
Example: An Inconsistent System • Solve the system:
Example: An Inconsistent System • Use the pivot of the second row to clear the second column using operations of type 2: 3R1R2 + Pivot row R3R2 – Pivot column • The last row translates into 0 = 1, which is nonsense. • This system has no solution: There are no numbers for x, y and z that will lead to 0 = 1. • We say that the system is inconsistent.
Example: Infinitely Many Solutions • Solve the system:
Example: Infinitely Many Solutions • There are no nonzero entries in the third row, so there can be no pivot in the third row. • Se we skip to the final step by turning the pivots into 1s:
Example: Infinitely Many Solutions • Translating back into equations we obtain: • Solving for x and y we get the solution: • You can choose any value you like for z. • For any value of z, we can obtain the corresponding values for x and y, all of which would be solutions to the system. • This system has infinitely many solutions.