Chapter 3 System of Linear Equations 3.1 Linear Equations in Two Variables Forms of Linear Equation ax + by = c y = mx + b (a, b, c are constants) (b = y-intercept, m = slope) Solution of System of Linear Equations Given: a) x + y = 7 b) x - y = -1 What are the coordinate values such that both equations are satisfied? Answer: (3, 4) x – y = -1 x+y=7 Solution: Substitution Method Given: y = -2x + 4 7x – 2y = 3 Solve the system of equations 7x – 2(-2x + 4) = 3 7x + 4x – 8 = 3 11 x = 11 x=1 y = -2(1) + 4 = 2 Solution (1, 2) Check solution Solution: Substitution Method Given: 5x + 2y = 1 x – 3y = 7 Solve the system of equations x = 3y + 7 5(3y + 7) + 2y = 1 15y + 35 + 2y = 1 17y = -34 y = -2 x = 3(-2) + 7 = 1 Solution (1, -2) Check solution Solution: Eliminating One Variable Given: 3x + 4y = -10 5x – 2y = 18 Solve the system of equations 3x + 4y = -10 2(5x – 2y) = 2(18) 3x + 4y = -10 10x – 4y = 36 13x x = 26 =2 3(2) + 4y = -10 4y = -16 y = -4 Solution (2, -4) Lines with No Solutions Given 3x – 2y = 6 6x – 4y = 18 -2(3x – 2y) = -2(6) -6x + 4y = 12 6x – 4y = 18 0 =6 Are there values of (x, y) for which 0 = 6? Lines with No Solutions Given 3x – 2y = 6 6x – 4y = 18 y = (2/3)x - 3 y = (2/3)x – (9/2) a) x - 3(2x - 9) = 8 x – 6x + 27 = 8 -5x = -19 x = 19/5 y = 2(19/5) – 9 Solve by substitution = 38/5 – 9 method = (38 – 45)/5 = -7/5 a) x – 3y = 8 Solution: (19/5, -7/5) y = 2x - 9 b) 2x + 3y = 6 Solve by elimination 2x – 3y = 6 Your Turn method b) 2x + 3y = 6 2x – 3y = 6 4x = 12 x=3 2(3) + 3y = 6 3y = 0 y=0 Solution: (3, 0) Your Turn Solve by elimination method 2x – 5y = 13 5x + 3y = 17 3(2x – 5y) = 3(13) 5(5x + 3y) = 5(17) 6x – 15y = 39 25x + 15y = 85 -------------------32x = 124 x=4 6(4) – 15y = 39 24 – 15y = 39 -15y = 15 y = -1 Solution: (4, -1) 3.3 Systems of Linear Equations in Three Variables {(x, y, z) | ax + by + cz = d} y-axis (x, y, z) x-axis z-axis Graph of Linear Equation in 3 Variables {(x, y, z) | 2x + 3y + z = 1} Set of all points (x, y, z) in a particular plane in 3-D. y-axis B(0, 1/3, 0) A(1/2, 0, 0) z-axis C(0, 0, 1) x-axis X-Y Plane y-axis x-axis {(x, y, z) | z = 0} z-axis X-Z Plane y-axis {(x, y, z) | y = 0} x-axis z-axis Y-Z Plane y-axis {(x, y, z) | x = 0} x-axis z-axis Systems of Linear Equations in 3 Variables Given: air fare + hotel + car for $210 hotel + car for $112 air fare + hotel for $180 What is the cost of air fare only, hotel only, or car only? Solution Let x = air fare y = hotel z = car x + y + z = 210 y + z = 112 x + y = 180 Solution: (x, y, z) = (98, 82, 30) Solving Equations in 3 Variables (1) Given: 5x – 2y – 4z = 3 3x + 3y + 2z = -3 -2x + 5y + 3z = 3 5x–3y–4z=3 3x+3y+2z=-3 5x – 2y – 4z = 3 2(3x + 3y + 2z) = 2(-3) 5x – 2y – 4z = 3 6x + 6y + 4z = -6 11x + 4y = -3 3x+3y+2z=-3 -2x+5y+3z=3 3(3x + 3y + 2z) = 3(-3) -2(-2x + 5y + 3z) = -2(3) Solving Equations in 3 Variables (2) 11x + 4y 3x+3y+2z=-3 -2x+5y+3z=3 3(3x + 3y + 2z) = 3(-3) -2(-2x + 5y + 3z) = -2(3) 9x + 9y + 6z 4x - 10y - 6z 13x y 11x+4y=-3 13x- y=-15 = -3 = -9 = -6 = -15 11x + 4y = -3 4(13x – y) = 4(-15) 11x + 4y = -3 52x – 4y = -60 63x = -63 Solving Equations in 3 Variables (3) 63x = -63 x = -1 We had: 11x + 4y = -3 11(-1) + 4y = -3 4y = -3 + 11 = 8 y = 2 We had: 3x + 3y + 2z = -3 3(-1) + 3(2) + 2z = -3 -3 + 6 + 2z = -3 2z = -6 z = -3 Solution: (-1, 2, -3) Check the solution Solving Equations in 3 Variables (4) Given: x + z = 8 x + y + 2z = 17 x + 2y + z = 16 x+y+2z = 17 x+2y+z = 16 -2(x + y + 2z) = -2(17) x + 2y + z) = 16 -2x - 2y - 4z = -34 x + 2y + z = 16 -x - 3z = -18 x -x + z - 3z 2z z = = 8 = 18 = 10 5 Solving Equations in 3 Variables (5) z = 5 We had: x + z = 8 x + (5) = 8 x = 3 We had: x + y + 2z = 17 (3) + y + 2(5) = 17 3 + y + 10 = 17 y = 4 Solution: (3, 4, 5) Check your solution Incosistent Systems Given: 2x + 5y + z = 12 x – 2y + 4z = -10 -3x + 6y – 12z = 20 x-2y+4z=10 -3x+6y-12z=20 3(x – 2y + 4z) = 3(-10) -3x + 6y – 12z = 20 3x – 6y + 12z = -30 -3x + 6y – 12z = 20 0 = -10 ??? •No (x, y, z) to satisfy this condition. •No common point of intersection •System of equations is inconsistent Solution to air-hotel-car problems Let x = air fare y = hotel z = car a) x + y + z = 210 b) y + z = 112 c) x + y = 180 • a) x + y + z = 210 b) y + z = 112 c) x + y = 180 • Use a) and b) to eliminate z x + y + z = 210 -1( y + z) = -(112) x + y + z = 210 - y - z = -112 -----------------------d) x = 98 • a) x + y + z = 210 b) y + z = 112 c) x + y = 180 • Use b) and c) to eliminate y y + z = 112 -(x + y) = -(180) y + z = 112 -x – y = -180 -----------------------e) -x + z = -68 • a) x + y + z = 210 b) y + z = 112 c) x + y = 180 • Use d) and e) to find z d) x = 98 e) –x + z = -68 -(98) + z = -68 z = -68 + 98 z = 30 • a) x + y + z = 210 b) y + z = 112 c) x + y = 180 • Use c) and d) to find y c) x + y = 180 d) x = 98 98 + y = 180 y = 180 – 98 = 82 Solution: (98, 82, 30) … (x: air, y: hotel, z: car) Your Turn Solve the following system x + y + 2z = 11 x + y + 3z = 14 x + 2y – z = 5 Is it consistent or inconsistent Your Turn a) x + y + 2z = 11 b) x + y + 3z = 14 c) x + 2y – z = 5 To rid of x a) –(x + y + 2z) = -(11) b) x + y + 3z = 14 a) x + y + 2(3) = 11 b) x + y + 3(3) = 14 5 = 9 -x – y – 2z = -11 x + y + 3z = 14 ----------------z = 3 x + y = 5 x + y = 9 No values of x, y will make this true. Thus, no solution. (Inconsistent system) 3.4 Matrix Solution to Linear Systems Matrix Arrangement of number in rows and columns Population (in mil.) 2000 2002 2004 2006 men 52 54 55 57 women 53 54 54 57 Augmented Matrix 4x + 4y = 19 2y + 3z = 8 4x - 5z = 7 4 4 0 0 2 3 4 0 -5 19 8 7 1 0 0 a 1 0 b d 1 c e f Matrix Row Operations 4x + 3y = -15 x + 2y = -1 Row-echelon form 4 1 3 2 -15 -1 1 0 •Interchange i th and j th rows: Ri a 1 b c Rj •Multiply each element in the ith row by k: kRi •Add k times the elements in row i to corresponding elements in Row j: kRi + Rj Matrix Row Operations Given a 2 x 3 matrix: 4 1 3 2 -15 -1 Interchange R1 and R2: R1 1 4 2 3 R2 -1 -15 Multiply each element in the 1st row by 3: 3R1 3(4) 3(3) 3(-15) 12 9 = 1 2 -1 1 2 -45 -1 Matrix Row Operations 4 1 3 2 -15 -1 Add 3 times the elements in row 1 to corresponding elements in Row 2: 3R1 + R2 4 3 3(4)+1 3(3)+2 4 3 -15 = 13 11 -46 -15 3(-15)-1 Your Turn Given: 3 4 -2 -3 5 1 Perform the following operation: R1 4 3 -3 1 -2 5 R2 Your Turn Given: 3 4 -2 5 -3 1 Perform the following operation: 2R2 3 -2 5 2(4) 2(-3) 2(1) = 3 -2 8 -6 5 2 Your Turn 3 Given: 4 -2 5 -3 1 Perform the following operation: 3R1 + R2 3 -2 5 3(3)+4 3(-2)-3 3(5)+1 3 -2 5 = 13 -9 16 Matrix Row Operations 4x + 4y = 19 2y + 3z = 8 4x - 5z = 7 R1 R2 kR2 (k = -2) kR1+R3 (k = -1) 0 4 4 2 3 4 0 0 -5 4 0 4 4 0 2 3 0 -5 8 19 7 0 2 3 -8 -8 0 4 0 -5 0 2 3 -8 -8 0 4 -2 -8 8 -38 7 8 -38 -1 19 8 7 Solving Linear System in 2 Variables 4x – 3y = -15 x + 2y = -1 4 -3 1 2 -15 -1 Recall the strategy. 4 1 3 2 -15 -1 1 0 a 1 Then, the last row says: y = c The first row says: x + ay = b b c Solving thy Linear System in 2 Variables 4x – 3y = -15 x + 2y = -1 R2 (to make e11 = 1) R1 4 -3 1 2 (-1/11)R2 1 0 4 -3 1 2 2 -11 -15 -1 -4R1 + R2 (to make e21 = 0) -15 -1 1 2 4 -3 -1 -15 2 1 -1 1 (to make e12 = 1) -1 -11 1 0 Solving System in 2 Variables 1 0 2 1 -1 1 y = 1 x + 2(1) = -1 x = -3 Check: 4x – 3y = -15 4(-3) – 3(1) = -12 – 3 = -15 x + 2y = -1 Solution: (-3, 1) (-3) + 2(1) = -3 + 2 = -1 Your Turn Solve the following using matrix method. 3x – 6y = 1 2x – 4y = 2/3 3 -6 2 -4 1 2/3 1 a 0 1 b c (1/3)R1 (to make e11 = 1) (1/3)3 (1/3(-6) (1/3)1 2 -4 2/3 = 1 -2 1/3 2 -4 2/3 Your Turn (1/3)3 (1/3(-6) (1/3)1 2 -4 2/3 = 1 -2 1/3 2 -4 2/3 2R1-R2 (to make e21 = 0) 1 2(1)-2 -2 1/3 = 2(-2)-4 2(1/3) – 2/3 1 -2 1/3 0 -8 0 (-1/8)R2 (to make e22 = 1) 1 (-1/8)0 -2 1/3 (-1/8)(-8) (-1/8)0 = 1 -2 1/3 0 1 0 Your Turn Check: 1 -2 1/3 0 1 0 y=0 x – 2y = 1/3 x – 0 = 1/3 x = 1/3 Solution: (1/3, 0) 3x – 6y = 1 3(1/3) – 6(0) = 1 1=1 2x – 4y = 2/3 2(1/3) – 4(0) = 2/3 2/3 – 0 = 2/3 2/3 = 2/3 Your Turn Solve the following using matrix method. -3x + 4y = 12 2x + y = 3 Solving System in 3 Variables x + y + z = 210 y + z = 112 x + y = 180 (-1)R1+R3 1 0 0 (-1)R3 x + y + z = 210 y + z = 112 z = 30 1 0 1 1 1 1 1 0 -1 1 0 0 1 1 0 1 1 1 1 1 0 210 112 180 210 112 -30 1 1 1 210 112 30 z = 30 y + 30 = 112 → y = 82 x + 82 + 30 = 210 → z = 98 Your Turn Solve the following system of equations 3x + y + 2z = 31 x + y + 2z = 19 x + 3y + 2z = 25 3.5: 2 x 2 Matrix a1 a2 Determinants b1 b2 Determinant a1 a2 b1 b2 = a1b2 – a2b1 Determinants 2 4 -3 -5 = 2(-5) – (-3)4 = -10 + 12 = 2 10 6 9 5 = ? 4 3 -5 -8 = ? Cramer’s Rule Given: a1x + b1y = c1 a2x + b2y = c2 x = Dx x = ------D c1 c2 b1 b2 a1 a2 b1 b2 y = Dy y = ------D a1 a2 c1 c2 a1 a2 b1 b2 Cramer’s Rule Given: 5x - 4y = 2 6x - 5y = 1 2 1 -4 -5 5 6 -4 -5 5 6 2 1 5 6 -4 -5 x = y = -10 – (-4) -6 = ------------ = ---- = 6 -25 – (-24) -1 5 – 12 -7 = -------- = ---- = 7 -1 -1 (6, 7) Your Turn Use Cramer’s rule to solve 1. 12x + 3y = 15 2x – 3y = 13 2. x – 3y = 4 3x – 4y = 12 Solution for 1 12x + 3y = 15 2x – 3y = 13 D 12 3 = 2 -3 15 3 Dx = 12 -3 = 12(-3) – 2(3) = -42 = 15(-3) – 3(12) = -84 Dx -84 x = ---- = ----- = 2 D -42 Solution for 1 12x + 3y = 15 2x – 3y = 13 D 12 3 = 2 -3 12 15 Dy = 2 13 = 12(-3) – 2(3) = -42 = 12(13) – 2(15) = 126 Dy 126 y = ---- = ----- = -3 D -42 Solution: (2, -3) Solution for 2 x 3x D - 36 = 4 – 3y = 12 = 1 -3 3 -3 4 -3 Dx = 12 -3 = 1(-3) – 3(-3) = 6 = 4(-3) – 12(-3) = 24 Dx 24 y = ---- = ---- = 4 D 6 Solution for 2 x 3x - 36 = 4 – 3y = 12 = 1 -3 3 -3 = 1(-3) – 3(-3) = 6 Dy = 1 4 3 12 = 1(12) – 3(4) = 0 D Dy 0 y = ---- = ---- = 0 D 6 Solution: (4, 0) Determinant of a 3 x 3 Matrix a1 b1 c1 b2 c2 b1 c1 b1 c1 a2 b2 c2 = a1 b3 c3 – a2 b3 c3 + a3 b2 c2 a3 b3 c3 E.g. 2 3 4 5 2 1 4 3 6 = ? Determinant of a 3 x 3 Matrix Given: a1x + b1y + c1z = d1 a2x + b2y + c2z = d2 a3x + b3y + c3z = d3 Dx x = ---D a1 b1 c1 D = a2 b2 c2 a3 b3 c3 Dx Dy y = ---D d1 b2 c3 = d2 b2 c3 d3 b3 c3 a1 d1 c1 Dy = a2 d2 c2 a3 d3 c3 Dz = a1 b1 d1 a2 b2 d2 a3 b3 d3 Dz z = ---D Example Given: x + 2y - z = -4 x + 4y - 2z = -6 2x + 3y + z = 3 1 D = 1 2 Dx 2 -1 4 -2 3 1 -4 2 -1 = -6 4 -2 3 3 1 1 -4 -1 Dy = 1 -6 -2 2 3 1 Dz = 1 1 2 2 -4 4 -6 3 3 Example 1 D = 1 2 2 -1 4 -2 4 -2 = 1 3 1 3 1 2 -1 2 -1 - 1 3 1 + 2 4 -2 = (4 – (-6)) – (2 – (-3)) + 2(-4 – (-4)) = 10 - 5 - 0 = 5 Dx -4 2 -1 4 -2 2 -1 2 -1 = -6 4 -2 = -4 3 1 - (-6) 3 1 + 3 4 -2 3 3 1 = (-4)(4 + 6) – (-6)(2 + 3) + (3)(-4 + 4) = -40 + 30 + 0 = 10 -10 x = ----- = -2 5 Your Turn Calculate 1. y = Dy / D 2. Z = Dz / D