Solving Linear Systems Using Gaussian Elimination

Similar documents
Section 6.2 Larger Systems of Linear Equations

Gauss-Jordan Row Reduction and Reduced Row Echelon Form

EBG # 3 Using Gaussian Elimination (Echelon Form) Gaussian Elimination: 0s below the main diagonal

5x 2 = 10. x 1 + 7(2) = 4. x 1 3x 2 = 4. 3x 1 + 9x 2 = 8

Linear Equations in Linear Algebra

Lecture 7: Introduction to linear systems

Linear Equations in Linear Algebra

Methods for Solving Linear Systems Part 2

1 - Systems of Linear Equations

Relationships Between Planes

Midterm 1 Review. Written by Victoria Kala SH 6432u Office Hours: R 12:30 1:30 pm Last updated 10/10/2015

Math 2331 Linear Algebra

Lecture 12: Solving Systems of Linear Equations by Gaussian Elimination

Row Reduction and Echelon Forms

Pre-Calculus I. For example, the system. x y 2 z. may be represented by the augmented matrix

M 340L CS Homework Set 1

1 Last time: linear systems and row operations

MAC1105-College Algebra. Chapter 5-Systems of Equations & Matrices

Chapter 1. Vectors, Matrices, and Linear Spaces

Matrices and RRE Form

Math "Matrix Approach to Solving Systems" Bibiana Lopez. November Crafton Hills College. (CHC) 6.3 November / 25

Chapter 5. Linear Algebra. Sections A linear (algebraic) equation in. unknowns, x 1, x 2,..., x n, is. an equation of the form

Problem Sheet 1 with Solutions GRA 6035 Mathematics

Section 1.1 System of Linear Equations. Dr. Abdulla Eid. College of Science. MATHS 211: Linear Algebra

9.1 - Systems of Linear Equations: Two Variables

MATH 54 - WORKSHEET 1 MONDAY 6/22

System of Linear Equations

Chapter 5. Linear Algebra. A linear (algebraic) equation in. unknowns, x 1, x 2,..., x n, is. an equation of the form

Lecture 3: Gaussian Elimination, continued. Lecture 3: Gaussian Elimination, continued

Exercise Sketch these lines and find their intersection.

Section Gaussian Elimination

Chapter 2. Systems of Equations and Augmented Matrices. Creighton University

Chapter 5. Linear Algebra. Sections A linear (algebraic) equation in. unknowns, x 1, x 2,..., x n, is. an equation of the form

CHAPTER 9: Systems of Equations and Matrices

10.3 Matrices and Systems Of

Chapter 1: Systems of Linear Equations and Matrices

0.0.1 Section 1.2: Row Reduction and Echelon Forms Echelon form (or row echelon form): 1. All nonzero rows are above any rows of all zeros.

Extra Problems: Chapter 1

Lectures on Linear Algebra for IT

Elementary matrices, continued. To summarize, we have identified 3 types of row operations and their corresponding

Review for Exam Find all a for which the following linear system has no solutions, one solution, and infinitely many solutions.

3. Replace any row by the sum of that row and a constant multiple of any other row.

Math 1314 Week #14 Notes

DM559 Linear and Integer Programming. Lecture 2 Systems of Linear Equations. Marco Chiarandini

Lecture 2e Row Echelon Form (pages 73-74)

March 19 - Solving Linear Systems

Algebra & Trig. I. For example, the system. x y 2 z. may be represented by the augmented matrix

CHAPTER 9: Systems of Equations and Matrices

Chapter 4. Solving Systems of Equations. Chapter 4

POLI270 - Linear Algebra

Handout 1 EXAMPLES OF SOLVING SYSTEMS OF LINEAR EQUATIONS

Linear Algebra I Lecture 8

Linear Algebra I Lecture 10

Lecture 6 & 7. Shuanglin Shao. September 16th and 18th, 2013

Solutions to Exam I MATH 304, section 6

4 Elementary matrices, continued

MA 242 LINEAR ALGEBRA C1, Solutions to First Midterm Exam

4 Elementary matrices, continued

Solving Linear Systems

MathQuest: Linear Algebra. 1. Which of the following operations on an augmented matrix could change the solution set of a system?

1111: Linear Algebra I

Section 5.3 Systems of Linear Equations: Determinants

Solving Systems of Linear Equations Using Matrices

Lectures on Linear Algebra for IT

Chapter 1: Systems of linear equations and matrices. Section 1.1: Introduction to systems of linear equations

Matrix equation Ax = b

Section 1.2. Row Reduction and Echelon Forms

Determine whether the following system has a trivial solution or non-trivial solution:

Linear Equations in Linear Algebra

Notes on Row Reduction

Topics. Vectors (column matrices): Vector addition and scalar multiplication The matrix of a linear function y Ax The elements of a matrix A : A ij

Applied Matrix Algebra Lecture Notes Section 2.2. Gerald Höhn Department of Mathematics, Kansas State University

Section 6.3. Matrices and Systems of Equations

Lecture 4: Gaussian Elimination and Homogeneous Equations

1.4 Gaussian Elimination Gaussian elimination: an algorithm for finding a (actually the ) reduced row echelon form of a matrix. A row echelon form

Example: 2x y + 3z = 1 5y 6z = 0 x + 4z = 7. Definition: Elementary Row Operations. Example: Type I swap rows 1 and 3

System of Linear Equations

MATH 2331 Linear Algebra. Section 1.1 Systems of Linear Equations. Finding the solution to a set of two equations in two variables: Example 1: Solve:

SYMBOL EXPLANATION EXAMPLE

Elementary Linear Algebra

MAC Module 1 Systems of Linear Equations and Matrices I

Homework 1.1 and 1.2 WITH SOLUTIONS

GAUSSIAN ELIMINATION AND LU DECOMPOSITION (SUPPLEMENT FOR MA511)

6-2 Matrix Multiplication, Inverses and Determinants

Linear Algebra Practice Problems

Section 1.1: Systems of Linear Equations

Chapter 1: Systems of Linear Equations

Row Reduced Echelon Form

MA 1B PRACTICAL - HOMEWORK SET 3 SOLUTIONS. Solution. (d) We have matrix form Ax = b and vector equation 4

8.4. Systems of Equations in Three Variables. Identifying Solutions 2/20/2018. Example. Identifying Solutions. Solving Systems in Three Variables

Homework Set #8 Solutions

Linear Methods (Math 211) - Lecture 2

Linear Algebra Math 221

Math 313 Chapter 1 Review

Matrices and Systems of Equations

Chapter 3. Directions: For questions 1-11 mark each statement True or False. Justify each answer.

Chapter 2 Notes, Linear Algebra 5e Lay

4.3 Row operations. As we have seen in Section 4.1 we can simplify a system of equations by either:

MODEL ANSWERS TO THE THIRD HOMEWORK

MATH 2050 Assignment 6 Fall 2018 Due: Thursday, November 1. x + y + 2z = 2 x + y + z = c 4x + 2z = 2

Transcription:

Solving Linear Systems Using Gaussian Elimination DEFINITION: A linear equation in the variables x 1,..., x n is an equation that can be written in the form a 1 x 1 +...+a n x n = b, where a 1,...,a n and b are constants, x 1,...,x n are variables. EXAMPLE: The equation is linear. The equation is NOT linear. 2x 1 +x 2 7x 3 = 5 3x 1 x 2 +2x 2 3 = 1 DEFINITION: A system of linear equations (or a linear system) is a collection of one or more linear equations. EXAMPLE: 3x 1 +2x 2 +7x 3 x 4 = 6 x 1 +x 2 x 3 +x 4 = 1 4x 1 +3x 2 +6x 3 = 8 Solving a Linear System in Two Variables EXAMPLE: Solve the following system of linear equations: { x1 2x 2 = 1 x 1 +3x 2 = 3 Solution: We have { x1 2x 2 = 1 x 1 +3x 2 = 3 { x1 2x 2 = 1 x 2 = 2 { x1 = 3 x 2 = 2 1

EXAMPLE: Solve the system of equations. Solution: Begin by solving for in Equation 1. Next, substitute this expression for y into Equation 2 and solve the resulting single-variable equation for x. Finally, you can solve for by back-substituting x = 3 into the equation y = 4 x, to obtain The solution is the ordered pair (3,1). You can check this solution as follows. 2

EXAMPLE: Solve the system of equations. Solution: You can eliminate the y-terms by adding the two equations. So, x = 12 8 = 3. By back-substituting into Equation 1, you can solve for y. 2 The solution is ( ) 3 2, 1. You can check the solution algebraically by substituting into the original system. 4 3

EXAMPLE: Find all solutions of the system 2x+y = 1 3x+4y = 14 Solution 1(Substitution Method): We solve for y in the first equation. 2x+y = 1 y = 1 2x Now we substitute for y in the second equation and solve for x: 3x+4y = 14 3x+4(1 2x) = 14 3x+4 8x = 14 5x = x = 2 Finally, we back-substitute x = 2 into the equation y = 1 2x: y = 1 2( 2) = 5 Solution 2(Elimination Method): We have 2x+y = 1 8x+4y = 4 3x+4y = 14 3x+4y = 14 5x = 3x+4y = 14 x = 2 3x+4y = 14 Next we substitute x = 2 into the equation 3x+4y = 14: 3( 2)+4y = 14 6+4y = 14 4y = 20 y = 5 4

EXAMPLE: Find all solutions of the system 2x+3y = 4 5x 7y = 1 Solution 1(Substitution Method): We solve for x in the first equation. 2x+3y = 4 2x = 4 3y x = 4+3y 2 Now we substitute for x in the second equation and solve for y: 5x 7y = 1 5 4+3y 2 7y = 1 Finally, we back-substitute y = 22 29 5(4+3y) 14y = 2 20 15y 14y = 2 29y = 22 y = 22 29 into the equation x = 4+3y: 2 x = 4+3( ) 22 29 = 25 2 29 Solution 2(Elimination Method): On the one hand, we have 2x+3y = 4 x+15y = 20 5x 7y = 1 x 14y = 2 = 29y = 22 y = 22 29 On the other hand, we have 2x+3y = 4 5x 7y = 1 14x+21y = 28 15x 21y = 3 = 29x = 25 x = 25 29 EXAMPLE: Find all solutions of the system 3 5 x+ 1 2 y = 7 2 1 3 x+ 4 5 y = 3 2 5

EXAMPLE: Find all solutions of the system Solution (Elimination Method): We have 3 5 x+ 1 2 y = 7 2 On the one hand, we have 6x+5y = 35 x+24y = 45 On the other hand, we have 6x+5y = 35 x+24y = 45 1 3 x+ 4 5 y = 3 2 3 5 x+ 1 2 y = 7 2 1 3 x+ 4 5 y = 3 2 30x+25y = 175 30x+72y = 135 144x+120y = 840 50x+120y = 225 EXAMPLE: Solve the system of linear equations 6x+5y = 35 x+24y = 45 = 97y = 3 y = 3 97 = 194x = 615 x = 615 194 Solution: Because the coefficients in this system have two decimal places, you can begin by multiplying each equation by 0 to produce a system with integer coefficients. Now, to obtain coefficients that differ only by sign, multiply revised Equation 1 by 3 and multiply revised equation 2 by -2. So, you can conclude that y = 322 23 the following. = 14. Back-substitution this value into revised Equation 2 produces 6

EXAMPLE: Find all solutions of the system Answer: No solution. EXAMPLE: Find all solutions of the system x+y = 1 x+y = 2 3x 2y = 4 6x+4y = 7 Solution: We have 3x 2y = 4 6x+4y = 7 3x 2y = 4 3x 2y = 7 2 It follows that the system has no solution (inconsistent). EXAMPLE: Find all solutions of the system x+y = 1 x+y = 1 Answer: The system has infinitely many solutions (dependent). EXAMPLE: Find all solutions of the system Solution: We have 8x 2y = 4 4x+y = 2 8x 2y = 4 4x+y = 2 8x 2y = 4 8x 2y = 4 It follows that the system has infinitely many solutions (dependent). 7

EXAMPLE: Solve the system of linear equations. Larger Systems of Linear Equations Solution: From Equation 3, you know the value z. To solve for y, substitute z = 2 into Equation 2 to obtain Finally, substitute y = 1 and z = 2 into Equation 1 to obtain The solution is x = 1, y = 1 and z = 2. EXAMPLE: Solve the system of linear equations. Solution: Because the leading coefficient of the first equation is 1, you can begin by saving the x at the upper left and eliminating the other x-terms from the first column. Now that all but the first x have been eliminated from the first column, go to work on the second column. (You need to eliminate y from the third equation.) Finally, you need a coefficient of 1 for z in the third equation. This is the same system that was solved in Example 1. As in that example, you can conclude that the solution is x = 1, y = 1, and z = 2. 8

EXAMPLE: Find all solutions of the system x 2y +z = 1 2x 3y z = 2 Solution (Elimination Method): We have x 2y +z = 1 2x 3y z = 2 2x 4y +2z = 2 2x 3y z = 2 3y z = 1 2y 4z = 1 12y 4z = 4 2y 4z = 1 therefore so 12y 4z = 4 y = 3 12y 4z = 4 y = 3 ( 2x 3 ) ( +3 1 ) = 1 z = 1 y = 3 ( 12 3 ) 4z = 4 y = 3 x = 1 2 z = 1 y = 3 z = 1 y = 3 EXAMPLE: Solve the system of linear equations. Solution: Because 0 = 2 is false statement, you can conclude that this system is inconsistent and so has no solution. Moreover, because this system is equivalent to the original system, you can conclude that the original system also has no solution. 9

EXAMPLE: Solve the system of linear equations. Solution: This result means that Equation 3 depends on Equations 1 and 2 in the sense that it gives us no additional information about the variables. So, the original system is equivalent to the system { x+y 3z = 1 y z = 0 In the last equation, solve for y in terms of z to obtain y = z. Back-substituting y = z in the first equation produces x = 2z 1. Finally, letting z = a, where a is a real number, the solutions to the given system are all of the form x = 2a 1, y = a, and z = a So, every ordered triple of the form (2a 1,a,a) is a solution of the system.

The Augmented Matrix of a Linear System We can write a system of linear equations as a matrix, called the augmented matrix of the system, by writing only the coefficients and constants that appear in the equations. Here is an example. The next Example demonstrates the elementary row operations described above. EXAMPLE: (a) Add 2 times the first row of the original matrix to the third row. (b) Multiply the first row of the original matrix by 1 2. (c) Interchange the first and second rows of the original matrix. 11

EXAMPLE: Solve the system of linear equations. x y +3z = 4 x+2y 2z = 3x y +5z = 14 Solution: Our goal is to eliminate the x-term from the second equation and the x- and y-terms from the third equation. For comparison, we write both the system of equations and its augmented matrix. Now we use back-substitution to find that The solution is (2,7,3). EXAMPLE: Solve the system of linear equations. z = 3 y 2z = 1 x y +3z = 4 y 2(3) = 1 x 7+3(3) = 4 y 6 = 1 x+2 = 4 y = 7 x = 2 x 2y +3z = 9 x+3y +z = 2 2x 5y +5z = 17 12

EXAMPLE: Solve the system of linear equations. Solution: x 2y +3z = 9 x+3y +z = 2 2x 5y +5z = 17 Now we use back-substitution to find that z = 2 y +4z = 7 x 2y +3z = 9 y +4(2) = 7 x 2( 1)+3(2) = 9 y +8 = 7 x+8 = 9 y = 1 x = 1 The solution is (1, 1,2). 13

EXAMPLE: Show that the following system has no solutions. Solution: We have x 3y +2z = 12 2x 5y +5z = 14 x 2y +3z = 20 Now if we translate the last row back into equation form, we get 0x + 0y + 0z = 1, or 0 = 1, which is false. No matter what values we pick for x, y, and z, the last equation will never be a true statement. This means the system has no solution. EXAMPLE: Show that the following system has infinitely many solutions. Solution: We have 3x 5y +36z = x+7z = 5 x+y z = 4 The third row corresponds to the equation 0 = 0. This equation is always true, no matter what values are used for x, y, and z. The complete solution of this system will be discussed in the next section. 14

Gaussian Elimination In general, to solve a system of linear equations using its augmented matrix, we use elementary row operations to arrive at a matrix in a certain form. This form is described in the following box. REMARK: Some authors say that a leading entry in a row-echelon form is 1, others say that it is just a nonzero number. Echelon Form Reduced Echelon Form 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 In the following matrices the first matrix is in reduced row-echelon form, but the second one is just in row-echelon form. The third matrix is not in row-echelon form. The entries in red are the leading entries. 15

EXAMPLE: Solve the system of linear equations using Gaussian elimination. 4x+8y 4z = 4 3x+8y +5z = 11 2x+y +12z = 17 Solution: We first write the augmented matrix of the system, and then use elementary row operations to put it in row-echelon form. We now have an equivalent matrix in row-echelon form, and the corresponding system of equations is x+2y z = 1 y +4z = 7 z = 2 We use back-substitution to solve the system. So the solution of the system is ( 3,1, 2). 16

DEFINITION: A pivot position in a matrix is a location in A that corresponds to a leading 1 in the reduced echelon form of A. A pivot column is a column of A that contains a pivot position. DEFINITION: The variables corresponding to pivot columns are called basic variables. The other variables are called free variables. EXAMPLE: Solve { x1 + 3x 2 + 4x 3 = 7 3x 1 + 9x 2 + 7x 3 = 6 Solution: We have [ 1 3 4 7 3 9 7 6 Therefore our system can be rewritten as ] [ 1 3 4 7 0 0 5 15 ] { x1 +3x 2 = 5 x 3 = 3 [ 1 3 4 7 0 0 1 3 ] [ 1 3 0 5 0 0 1 3 ] which gives This implies that x 1 x 2 x 3 = 5 3x 2 x 2 3 = x 1 = 5 3x 2 x 3 = 3 x 2 is free 5 3 x 2 0+1 x 2 3+0 x 2 = 5 0 3 +x 2 3 1 0 The Effect of Row Operations on Matrix Multiplication We conclude this section with a property involving row operations and matrix multiplication that will be useful later. The following notation is helpful: if a row operation R is performed on a matrix A, we represent the resulting matrix by R(A). Theorem 2.1 Let A and B be matrices for which the product AB is defined. (1) If R is any row operation, then R(AB) (R(A))B. (2) If R 1,...,R n are row operations, then R n ( (R 2 (R 1 (AB))) ) (R n ( (R 2 (R 1 (A))) ))B. Part(1)ofthistheoremassertsthatwheneverarowoperationisperformedontheproductoftwomatrices, the same answer is obtained by performing the row operation on the first matrix alone before multiplying. Part (1) is proved by considering each type of row operation in turn. Part (2) generalizes this result to any finite number of row operations, and is proved by using part (1) and induction. 17