Reviewing Systems of Equations • Substitution • Elimination • Matrices Some Important Points • Several (2+) variables need to be solved for • To find an exact solution, you need to generate the same number of equations as you have variables • For example, you’ll need 3 equations to work with if you’re going to try and solve for 3 variables Three Methods for Solving • Substitution – substituting variables to form equations with single variables • Elimination – combining equations to eliminate variables (convenient only in certain situations) • Matrices – use of matrices and their operations to arrive at a solution Example: Substitution (2) 4x + 2y - z = 20 x + 0y - z = 2 (3) 3x + y - 0z =15 (1) Solve for x, y, and z Example: Substitution (2) 4x + 2y - z = 20 x + 0y - z = 2 (3) 3x + y - 0z =15 (1) x + 0y - z = 2 x = 2+z z = x-2 Solve for x, y, and z Transform equation (2) to have z in terms of x. Example: Substitution (1) 4x + 2y - z = 20 (2) z = x-2 (3) 3x + y - 0z =15 Solve for x, y, and z Replace the original equation (2) with the new equation. Example: Substitution (1) 4x + 2y - z = 20 (2) z = x-2 (3) 3x + y - 0z =15 3x + y - 0z =15 y =15- 3x Solve for x, y, and z Use the same technique on equation (3) to get y in terms of x Example: Substitution (1) 4x + 2y - z = 20 (2) z = x-2 (3) y =15- 3x Solve for x, y, and z Replace equation (3) with the new equation Example: Substitution (1) 4x + 2y - z = 20 (2) z = x-2 (3) y =15- 3x Solve for x, y, and z Now substitute the expression for z in terms of x from equation (2) into equation (1). 4x + 2y - z = 20 4x + 2y - (x - 2) = 20 Example: Substitution (1) 4x + 2y - z = 20 (2) z = x-2 (3) y =15- 3x Solve for x, y, and z Continue to modify this equation by substituting equation (3) into equation (1). 4x + 2y - z = 20 4x + 2y - (x - 2) = 20 4x + 2(15- 3x) - (x - 2) = 20 Example: Substitution (1) 4x + 2y - z = 20 (2) z = x-2 (3) y =15- 3x Solve for x, y, and z You’ll notice that this new equation has only 1 variable (x) in it. We can readily solve for x and use this result in further calculations 4x + 2y - z = 20 4x + 2y - (x - 2) = 20 4x + 2(15- 3x) - (x - 2) = 20 4x +30 - 6x - x + 2 = 20 4x - 6x - x = 20 -30 - 2 -3x = -12 x=4 Example: Substitution (1) 4x + 2y - z = 20 (2) z = x-2 (3) y =15- 3x Solve for x, y, and z Now, we can use the result of x=4 in equation (3) to solve for y. y =15- 3x y =15- 3(4) y=3 y=3 x=4 Example: Substitution (1) 4x + 2y - z = 20 (2) z = x-2 (3) y =15- 3x z = x-2 z = (4) - 2 z=2 Solve for x, y, and z Finally, we’ll use the result of x=4 in equation (2) to determine the value for z. z=2 y=3 x=4 Example: Substitution (2) 4x + 2y - z = 20 x + 0y - z = 2 (3) 3x + y - 0z =15 (1) Solve for x, y, and z Now we’ve successfully solved a system of equations z=2 y=3 x=4 Example: Elimination (2) 4x + 2y - z = 20 x + 0y - z = 2 (3) 3x + y - 0z =15 (1) Solve for x, y, and z Example: Elimination (2) 4x + 2y - z = 20 x + 0y - z = 2 (3) 3x + y - 0z =15 (1) Solve for x, y, and z We’ll use elimination to verify our work from before. We can start be subtracting equation (2) from equation (1) Example: Elimination (2) 4x + 2y - z = 20 x + 0y - z = 2 (3) 3x + y - 0z =15 (1) (1) -(2) 4x + 2y - z = 20 -x - 0y + z = -2 Solve for x, y, and z Start by multiplying equation (2) by -1. Example: Elimination (2) 4x + 2y - z = 20 x + 0y - z = 2 (3) 3x + y - 0z =15 (1) 4x + 2y - z = 20 -(2) -x - 0y + z = -2 (1) - (2) 3x + 2y =18 (1) Solve for x, y, and z Add equation (1) and equation –(2). Notice that the z term is eliminated. Example: Elimination (2) 3x + 2y =18 x + 0y - z = 2 (3) 3x + y - 0z =15 (1) Solve for x, y, and z Replace equation (1) with this new equation. Example: Elimination (2) 3x + 2y =18 x + 0y - z = 2 (3) 3x + y - 0z =15 (1) 3x + 2y =18 -3x - y = -15 (1) -(3) Solve for x, y, and z Now subtract equation (3) from equation (1) using a similar approach, start with multiplying equation (3) by -1 Example: Elimination (2) 3x + 2y =18 x + 0y - z = 2 (3) 3x + y - 0z =15 (1) 3x + 2y =18 -3x - y = -15 y=3 (1) -(3) (1) – (3) Solve for x, y, and z Add equation (1) and equation –(3). Notice that the x terms cancel. y=3 Example: Elimination (2) 3x + 2y =18 x + 0y - z = 2 (3) 3x + y - 0z =15 (1) Solve for x, y, and z Use the result of y=3 in equation (1) to determine the value of x. 3x + 2y =18 3x + 2(3) =18 3x =12 x=4 x=4 y=3 Example: Elimination (2) 4x + 2y - z = 20 x + 0y - z = 2 (3) 3x + y - 0z =15 (1) Solve for x, y, and z Use the result of x=4 in equation (2) to find z. x + 0y - z = 2 (4) - z = 2 4-2 = z z=2 z=2 x=4 y=3 Example: Matrices (2) 4x + 2y - z = 20 x + 0y - z = 2 (3) 3x + y - 0z =15 (1) x (1) (2) (3) y z - - - - - - - Solve for x, y, and z The first step is to set up a matrix describing this system of equations. This matrix will be manipulated so that there is a diagonal of 1’s and corresponding values on the other side of the bar RHS - 1 0 0 0 1 0 0 0 1 ? ? ? Example: Matrices (2) 4x + 2y - z = 20 x + 0y - z = 2 (3) 3x + y - 0z =15 (1) 1 0 0 0 1 0 0 0 1 ? ? ? Solve for x, y, and z In this form, the top row will contain the solution for x x solution Example: Matrices (2) 4x + 2y - z = 20 x + 0y - z = 2 (3) 3x + y - 0z =15 (1) 1 0 0 0 1 0 0 0 1 ? ? ? Solve for x, y, and z In this form, the middle row will contain the solution for y y solution Example: Matrices (2) 4x + 2y - z = 20 x + 0y - z = 2 (3) 3x + y - 0z =15 (1) 1 0 0 0 1 0 0 0 1 ? ? ? Solve for x, y, and z In this form, the bottom row will contain the solution for z z solution Example: Matrices (2) 4x + 2y - z = 20 x + 0y - z = 2 (3) 3x + y - 0z =15 (1) x (1) (2) (3) 4 1 3 Solve for x, y, and z The first step is to set up a matrix describing this system of equations. To do this, each equation will be transcribed into a row. These 3 rows will be stacked on top of each other to form the matrix. The first entry in a row will be the x coefficient. Example: Matrices (2) 4x + 2y - z = 20 x + 0y - z = 2 (3) 3x + y - 0z =15 (1) x (1) (2) (3) y 4 2 1 0 3 1 Solve for x, y, and z The second entry in each row will be the y coefficient Example: Matrices (2) 4x + 2y - z = 20 x + 0y - z = 2 (3) 3x + y - 0z =15 (1) x (1) (2) (3) y z 4 2 -1 1 0 -1 3 1 0 Solve for x, y, and z The third entry in each row will be the z coefficient Example: Matrices (2) 4x + 2y - z = 20 x + 0y - z = 2 (3) 3x + y - 0z =15 (1) x (1) (2) (3) y z 4 2 -1 1 0 -1 3 1 0 RHS 20 2 15 Solve for x, y, and z The final entry is the right hand side (RHS) of each equation. Example: Matrices (2) 4x + 2y - z = 20 x + 0y - z = 2 (3) 3x + y - 0z =15 (1) (1) (2) (3) 4 2 -1 1 0 -1 3 1 0 20 2 15 Solve for x, y, and z For matrix operations, we are allowed to do the following things in succession: 1. We can swap rows at any time so long as all entries retain their position within a row Swap (1) and (2) (1) (2) (3) 1 0 -1 4 2 -1 3 1 0 2 20 15 Example: Matrices (2) 4x + 2y - z = 20 x + 0y - z = 2 (3) 3x + y - 0z =15 (1) (1) (2) (3) 1 0 -1 4 2 -1 3 1 0 2 20 15 Solve for x, y, and z For matrix operations, we are allowed to do the following things in succession: 2. We can multiply any row by a constant so long as it’s applied to each entry within the row Multiply (3) by -1 (1) (2) (3) 1 0 -1 4 2 -1 -3 -1 0 2 20 -15 Example: Matrices (2) 4x + 2y - z = 20 x + 0y - z = 2 (3) 3x + y - 0z =15 (1) (1) (2) (3) 1 0 -1 4 2 -1 -3 -1 0 2 20 -15 Solve for x, y, and z For matrix operations, we are allowed to do the following things in succession: 3. We add equations together and replace one of those equations with the results of the addition Replace (2) with (3)+(2) (1) (2) (3) 1 0 -1 1 1 -1 -3 -1 0 2 5 -15 Example: Matrices (2) 4x + 2y - z = 20 x + 0y - z = 2 (3) 3x + y - 0z =15 (1) Solve for x, y, and z 1. We can swap rows at any time so long as all entries retain their position within a row 2. We can multiply any row by a constant so long as it’s applied to each entry within the row 3. We add equations together and replace one of those equations with the results of the addition (1) (2) (3) 1 0 -1 1 1 -1 -3 -1 0 2 5 -15 Replace (2) with 3(2)+(3) (1) 1 0 -1 (2) 0 2 -3 (3) -3 -1 0 2 0 -15 Example: Matrices (2) 4x + 2y - z = 20 x + 0y - z = 2 (3) 3x + y - 0z =15 (1) Solve for x, y, and z 1. We can swap rows at any time so long as all entries retain their position within a row 2. We can multiply any row by a constant so long as it’s applied to each entry within the row 3. We add equations together and replace one of those equations with the results of the addition (1) (2) (3) 1 0 -1 0 2 -3 -3 -1 0 2 0 -15 Replace (3) with 3(1)+(3) (1) 1 0 -1 (2) 0 2 -3 (3) 0 -1 -3 2 0 -9 Example: Matrices (2) 4x + 2y - z = 20 x + 0y - z = 2 (3) 3x + y - 0z =15 (1) Solve for x, y, and z 1. We can swap rows at any time so long as all entries retain their position within a row 2. We can multiply any row by a constant so long as it’s applied to each entry within the row 3. We add equations together and replace one of those equations with the results of the addition (1) (2) (3) 1 0 -1 0 2 -3 0 -1 -3 2 0 -9 Replace (2) with (2)+(3) (1) (2) (3) 1 0 -1 0 1 -6 0 -1 -3 2 -9 -9 Example: Matrices (2) 4x + 2y - z = 20 x + 0y - z = 2 (3) 3x + y - 0z =15 (1) Solve for x, y, and z 1. We can swap rows at any time so long as all entries retain their position within a row 2. We can multiply any row by a constant so long as it’s applied to each entry within the row 3. We add equations together and replace one of those equations with the results of the addition (1) (2) (3) 1 0 -1 0 1 -6 0 -1 -3 2 -9 -9 Replace (3) with (2)+(3) 1 0 -1 (2) 0 1 -6 (3) 0 0 -9 (1) 2 -9 -18 Example: Matrices (2) 4x + 2y - z = 20 x + 0y - z = 2 (3) 3x + y - 0z =15 (1) Solve for x, y, and z 1. We can swap rows at any time so long as all entries retain their position within a row 2. We can multiply any row by a constant so long as it’s applied to each entry within the row 3. We add equations together and replace one of those equations with the results of the addition (1) (2) (3) 1 0 -1 0 1 -6 0 0 -9 2 -9 -18 Replace (3) with 1/9(3) (1) (2) (3) 1 0 -1 0 1 -6 0 0 1 2 -9 2 Example: Matrices (2) 4x + 2y - z = 20 x + 0y - z = 2 (3) 3x + y - 0z =15 (1) Solve for x, y, and z 1. We can swap rows at any time so long as all entries retain their position within a row 2. We can multiply any row by a constant so long as it’s applied to each entry within the row 3. We add equations together and replace one of those equations with the results of the addition (1) (2) (3) 1 0 -1 0 1 -6 0 0 1 2 -9 2 Replace (1) with (1)+(3) (1) (2) (3) 1 0 0 0 1 -6 0 0 1 4 -9 2 Example: Matrices (2) 4x + 2y - z = 20 x + 0y - z = 2 (3) 3x + y - 0z =15 (1) Solve for x, y, and z 1. We can swap rows at any time so long as all entries retain their position within a row 2. We can multiply any row by a constant so long as it’s applied to each entry within the row 3. We add equations together and replace one of those equations with the results of the addition (1) (2) (3) 1 0 0 0 1 -6 0 0 1 4 -9 2 Replace (2) with (2)+6(3) (1) (2) (3) 1 0 0 0 1 0 0 0 1 4 3 2 Example: Matrices (2) 4x + 2y - z = 20 x + 0y - z = 2 (3) 3x + y - 0z =15 (1) Solve for x, y, and z x=4 y=3 z=2 x (1) 4 2 -1 (2) 1 0 -1 (3) 3 1 0 20 2 15 y z 1 0 0 0 1 0 0 0 1 RHS 4 3 2