You are on page 1of 18
Linear Systems: GAUSS ELIMINATION Extending to R” the equation az + by =c ofa line in R? and a plane At + By+Cz= Din R° we arrive at Definition 3.1: @ LINEAR EQUATION in nveiabes 2}, 2, ..., 2, is an equation ofthe form 2, +02) +...0,t, = b where the COEFFICIENTS a), da, ..., Qq and CONSTANT TERM b are real numbers. ‘A SOLUTION of this equation is a vector X in R" whose components 8), 89, ..., 8, satisfy the equation when we substitute 2) = 8), 2) = 89, ..., Zn = Sp. 8y@ Linear System of m algebraic equations in n variables we mean the set of linear equations: yt Foyt t +O, nt = by yy 2, + OT) +++ +09 n2q Hl = Op, 12, + Op,922 +--+ Omntn = by Lines and planes provide geometric illustrations of linear systems, Here is some important terminology for linear systems © 2 Solution forthe system consists ofa vector x in R that sa simultaneous soltian ofeach equation, © ‘the set ofall solution scaled, not surprisingly, the Solution Set ofthe system, © ‘two systems of linear equations are said to be Equivalent when they have the same solution set. The case m =n =2 becomes @ par of simultaneous linear equations ayz+any = b, aya + ony = by, in2 variables which can be thought of graphically as @ par of straight lines inthe plane. The solution set then consists of, the points) of intersection, ian, ofthe ines. The various pesibiities are shown in: t-y=0, 2s-Yy=0 coincident lines, infinitely many solutions a-ys-2, 2 distinct paralel lines, no solution ‘non-parallel lines, unique solution ‘The first system has a unique solution because the lines intersect in a single point. In the second and third examples, however, the lines are parallel, so the solution set will be empty when the parallel lines are distinct as in the second example, while the system will have infinitely many solutions when the parallel lines coincide as inthe third case. So fora general system one can also ask Fundamental Questions: for a genera! system of linear equations: © Is the system CONSISTENT, ie., does there exist at least one solution? © Ifa solution exists, is it the only one, i.e, is it UNIQUE? @ JF there is more than one solution, are there INFINITELY MANY solutions? If no solution exists, i.e., the solution set is empty, we say the system is INCONSISTENT. In dimensions 2 and 3 itis thus clear geometrically that the system is inconsistent or consistent and had either one or infinitely many solutions. Seeking answers beyond 3 variables, however, requires all the linear algebra we've set in place! To each system of m linear equations in n variables we associate two matrices: 1. Coefficient matrix: the coefficients are written as rows with entries aligned so that @ column consists of the coefficients of an individual variable: Mm Ay AQ On ay OR Op On Om1 Om,2 m2 °° Orn making an m xn. matrix. 2. Augmented matrix: now augment the coefficient matrix by adding the column of constant terms to the n columns of the coefficient matrix: CT a a ay Oy ay On by Gm,1 Om,2 On,2 Grn bm. making an m x (n +1) matrix. Since any matrix with m rows can be written as a row of column vectors in R™, set ay a ay ay a=|. |, a= Op, 1 On, An bb a, = we » b= » Om, Dm Then the coefficient and augmented matrices can be re-written as A= lam... a] [Ab] = fay a ... ay bj On the other hand, by scalar multiplication and addition of vectors as well as the matrix-vector rule, Ody + Oyy% +--+ One x Oy Ty + Oy2) + °°° +02 nTZn 2) 218) + Zya) +--+ +2,a, = . ey = Al "| = 4x. On, 121 + Om. 909 + °** + Om, Tn, So a general system of mt linear equations in n variables can be re-interpreted in three diferent ways: ° [Ab] e 2a; +278) +...+2,a, = b e Ax =b an augmented matrix, 2 vector equation, a matrix equation. Thus vectorX in B” willbe a solution ofthe syst oflinear equations if and ony itis a solution ofthe vector equation, andin turf and only fit isa solution ofthe matrix equation, proving Fundamental Theorem 3,1: if, 9, .., a 2nd D are vectors in R, then each of the following 4 the system of near equations wth augmented mati |g) a --- a, b], © the vector equation 2a) + 298) + +++ + 2,8, = D, thematic equation Ax=b wih d=] a, a + ay), has the same solution set, This ig huge result conceptually and computationally! In practice, a system may consist of hundreds or thousands (rilions?} of equations and variables, yet the system has Deen re-interpreted in as simile & form asthe equations tyt+ ayy = bor ap = you tute in bigh schoo, respective ofthe sie of mand More sigifcantl fom a computational point of view, the augmented matric is simply alist of lists - something e computer can understand - so pethaps eficent algorithms can be developed by transcribing for matrices the elimination of variable idea used earl, We cigply the algebraic steps side-by-side with the corresponding row operations on augmented matics, Problem 3.1: solve for 2, y in the system (I) az+ly=r (Q) cr+dy=s Algebraic Solution: So long as a + 0, we can subtract . times equation (1) from equation (2) to eliminate from equation (2) giving a new system: ()orthy=r (2) Oe+2ad—tey = 2as-cr with the same solution set. Now use (2) to solve for y: a3-cr y= ak’ if ad -be#0, and then 2 can be found by substituting back for y in (i): Matrix Solution: the corresponding augmented abr eda] Subtract Rot 1 from Row 2 to create a new Row 2: matrix is Bh fab ' ~~ i eit) ao) This is the augmented matrix associated with the linear system to the left. Crucially, the row operation did not change the solution set, the new augmented matri is in ECHELON FORM, from which solutions 2, y can be read off quickly by back substitution. So the basic idea is to perform row operations to reduce the augmented matrix to a matrix in ECHELON FORM ‘corresponding to an EQUIVALENT linear system. Problem 3.2: solve for 2, y and 2 in the system yrs = 4 Sr+6y-32 = 3, -2n-dythe = 10. Matrix Solution: The associated augmented matrix is oi1id4 [Ab=]3 6 33 2-3 7 10 Since the first entry in the first row of (A bj is 0, interchange Row 1 and Row 2: non [3 6 33 [b}—s]o 114 237 0 To simplify calculations mutiply the new Row 1 by 1/3: nag [1 2-11 — fori 4. 2-37 10 Now as before we can successively add/subtract multiples of one row to another to introduce 0 entries: amg [L211 —]0114 015 2 nna, L221 — 011 4], 0048 which is the augmented matrix associated with the equivalent system rty-2 = 1, yte = 4, do = 8. Thus 2 = 2, and hence y= 2, 2 = —I by back substitution. Wasn't that simpler and more systematic than going through the tedious algebraic details for systems of equations! Solving systems of linear equations by reducing the corresponding augmented matrix to ‘Echelon’ form applies quite generally. It is usually known as Gaussian Elimination because of its use by Gauss in the early 19th century, though it was known many years earlier to the Chinese. In fact, the same operations as before, now called Elementary Row operations, can be carried out on the rows of any matrix, whatever the size. Formally, Elementary Row Operations on a matrix: @ (Interchange) interchange two rows, @ (Scaling) multiply all entries in a row by a non-zero constant, @ (Replacement) replace one row by the sum of itself and a multiple of another row. We shall say that matrices A, B are Row Equivalent, and write A ~ B, when there is a sequence of elementary row operations that takes A into B. For later purposes, note also that elementary row operations are reversible, so if A ~ B, then B~ A. But the crucial echelon form that simplified solving the system in 2 and 3 variables carries over to general systems: the earlier examples of 12-11 : ' . o1i14 0 4ad—be) 4as—er) |’ ‘ a 0048 suggest the following Definition 3.2: 2 matrix is said to be in (Row) Echelon Form if © all non-zero rows lie above any row ofall zeros, © ‘for each non-zero row, the leading entry, i.e., the left-most non-zero entry, lies na column to the left of any leading entry below i In particular, in any column containing @ leading entry all entries below that leading entry are zero. Thus Pte ee eke OG eee ee * O0@ ee tke O00 Bee tee 000 @e eke 0000 Gk ewe d00008 ’ 00000 Be sl! 00000000 00000000 000000080 000000080 are typical structures for a general matrix in Row Echelon Form; the @ entry in a non-zero row is the leading entry, often called a pivot, and all x entries following the pivot inthe row can be zero or non-zero. Columns in which a pivot @ occurs are often called pivot columns. The terms pivot and pivot column are used because in the earlier examples of linear systems the pivots and pivot columns are what we used to row reduce the augmented matrix to echelon form (we “pivoted ‘around them’). Each matric is row equivalent to a matrix in echelon form. Let's investigate how reducing @ matrix to ‘echelon form helps solving linear systems. The first example simply makes a slight change in the third equations in 3.2: Problem 3.3: solve for 2, y and 2 in 12-41 (Ab]~ JO 1 1 4} ( =B,sy,), eos & p001 3rty-32 = 3, Ir 3y432 = 10. associated with the equivalent system Solution: the associated augmented matrix t+yy-2z = 1, ow is yte = 4, bel oiid [Abl=]3 6 -3 3], But now there is no value of 2 such that Oz = 1, so 2 33 10 the system is Inconsistent. We can see this from the echelon form B: it has three pivot columns, id by the ducti befor ae STE ON NETS 28 Se ME tut the column of right han sides is one of them! obtain a row equivalent echelon form Existence Theorem 3.2: a linear system is Consistent if and only if an echelon form of the associated augmented matrix has NO row of the form (00... b#0. Time now to begin investigating questions of Uniqueness or Infinitely many solutions for systems. Problem 3.3 simply repeats Problem 3.2, while the Problem 3.5 modifies the third equation in Problem 3.3. Problem 3.4: solve for 2, y and 2 in yee 4, 3e+6y-32 = 3, -dr-dy4Tr = 1. Solution: the associated augmented matrix is p11 b= ]3 6 3 3], 2-37 00 and by the same row reductions as before, we obtain a row equivalent echelon form 12-11 {Abl~}0 1 1 4} (= 8B, sy,) 004 8 associated with the equivalent system tt+y-2 = 1, ye = 4, 4: = 8. By Theorem 3.2, the system is consistent. Unique solutions z=), y=), r= 1 are easily calculated directly and by back substitution, Problem 3.5: solve for a, y and 2 in 12-11 [Abl~ JO 1 1 4} Bsa) yte = 4, 0000 3c+6y-32 = 3, dn By $32 = 2. associated with the equivalent system Solution: the associeted augmented a+y-z = 1, matrixis yts = 4 0114 Now there is no equation to specify z, so zis a free {A bj =|3 6 -3 3], variable: 2-332 a=3t-7, y=4-t, z=, (taitray). and by the same row reductions as before, This can also be seen from B: only the z- and ye we obtain 2 row equivalent echelon form columns are pivot columns. The examples just gone through thus provide the first of the algorithms for solving general systems of linear equations: Gauss Elimination: given a general system of m linear equations in n variables, © form the associated augmented matrix [A b] and compute an echelon form B, © if the right hand-most column of B is a pivot column, then the system is inconsistent, otherwise the system is consistent, © ifthe system is consistent, then any variable corresponding to a pivot column is called a basic variable, otherwise the variable is called 2 free variable. A typical geometric application is the following. Problem 3.6: express the plane P in Rg given in vector form by 2 1) [3 x= |-l)+s]1} +t], 2 2 -8 asa linear equation in &, y and 2. Solution: a vector x in B les in P when r 2 1 3 y) = |-l)ts|l}+t}-s], 2 2 2 -8 for some choice of 8, t, ie., when 1 3 r-) s}l]+t]-a) = Jytl 2 -8 2-2 is consistent as @ vector equation in 8, f. The associated augmented matrix is 1 -3 2-2 (Abl= ]1 -5 tl}. 2-8 2-2 Now by row reduction in the first column of [4 bj, we obtain 1-3 2-2 Abj~ |0 -2 y-243], y Q -2 2-2+2 and after row reduction in the second column, 1-3 2-2 [Abl~ ]0 -2 y-2+3 0 0 g-2-y-1 But by Existence Theorem 3.2, the vector equation will be consistent if and only if the right hand-most column is not @ pivot column, i.e. when t-t-y-1=0. Linear Systems: REDUCED ROW ECHELON FORM The Gauss Elimination method employed inthe previous lecture used elementary row operations 6 33 et P2 Alyy fet 36 33 f 8 2-3 7 10 -2 -3 0 11 4—+]0o114 7 10 2-367 10 015 2 to row reduce an augmented matrix to echelon form because then the solutions ofthe linear system could be read off by back substitution. From both a conceptual and computational point of view, however, the trouble with using the echelon form is that a matrix can be equivalent to several different echelon forms. For example, the row reduction above can be continued rene, [! 222] gree fP2 TT aay JE 2 EY) pany fh 8 2 o11.4 o1i4 0102 p10 2 0048 0012 0012 0012 producing a new echelon form at each stage «in other words, there may be NO UNIQUE echelon form for a matrix thereby complicating the writing of code for row reduction. So when should we stop before using back substitution, for instance? This leads us to introduce a key definition. Definition 4.1: 2 matrix is said to be in REDUCED ROW ECHELON FORM if it is in row echelon form and © the leading entry in each non-zero row is |, © cach leading 1 isthe only non-zero entry in its column. Typical structures for a matrix in Reduced Row Echelon Form are thus Le00e0e-% Ole 00k Oe es O01 ede we O00T0 kOe ws 0001 ede we O000L kOe es 0000018 a} O00000Ls O000000--0 O0000000-- 0 O000000+0 O0000000- 0 where the « entry can be any number, Note that such matrices are stil in echelon form but each pivot value is 1, and all the entries in & pivot colunin are 0 except for the pivot itself. What more row operations are needed? The next result should now come as no surprise: Main Reduced Row Echelon Theorem: each matrix is row equivalent to one and only one reduced row echelon matrix. This unique reduced row echelon matrix associated with a matrix A is usually denoted by rref{ A). On the other hand, with one more row operation in the earlier sequence of row operations, for instance, we see that o1i4 1004 mf}3 6 3 3)=]010 2]. 1-3 7 1 0012 Uniqueness of the reduced row echelon form is a property we'll make fundamental use of as the semester progresses because so many concepts and properties of a matrix A can then be described in terms of rref{), But fist let's investigate how the presence of the 1 and 0's in the pivot column affects the Gauss Elimination method for solving the three systems of linear equations. Problem 4.1: solve for £, y and 2 in yeaa 4, 32+6y-32 = 3, —dr-3ytTe = 10. Solution : the associated augmented matrix is o1i4 [Abl=}3 6 3 3], 237 10 whose reduced row echelon form is 100-1 mefAbl= |0 10 2 0012 But this is the eugemented matrix associated with the equivalent system t=-l, y=), f=). These solutions are exactly the same as before, of course, because elementary row operations produce equivalent systems. The point is that the 1's and 0 in the pivot columns eliminate the need for back substitution when computing 2, y and 2. Problem 4.2: solve for 2, y and 2 in yt+2 = 4, Sc+6y-32 = 3, ~dn-3y+32 = 10. Solution: the associated augmented matrix is 0114 (Abl=|3 6 -3 3], 2-303 10 and 100 mef(A bl) = }0 1 1 Of, oo01 associated with the equivalent system gz -3 = 0, y+s = 0, Qe = 1 But there is no value of z such that 02 = 1, so the system is Inconsistent. Notice that rref(/A bj) has three pivot columns, but the column of right hand sides is one of them! Problem 4.3: solve for 2, y and 2 in Thus mef[A b] is the augmented matrix associated with yes 4, the equivalent system 3r+6y-32 = 3, zo -% = 7, dr -dy tds = 2 yte = 4 Solution: the associated augmented matrix is But now there is no equation to specify z, so 2 is a free D1. variable: (Abl=]3 6 -3 3], r=T+3, y=4-t, r=, (tarbitrary). 2-33 2 Notice that in rref[A bj the a- and y-columns are the and, as calculations show, only pivot columns, while 2 is a free variable, 1lo37 neof([4b)) = Jo 1 1 4}. d000 This refinement of Gaussian Elimination using the the Reduced Row Echelon Form of the Augmented matrix instead of the Echelon Form is usually called Gauss-Jordan Elimination after the German mathematician Wilhelm Jordan who used it extensively in his writings. Whether the extra work to avoid back substitution is worthwhile in simple hand calculations is a matter of personal preference, Nonetheless, from the point of view of theory and numerical compution generally, the idea of performing row operations both downwards and upwards to produce rrel(4) will become very important as we shall soon see. Since most hand calculators and computer algebra systems like SageMath and WolframAlpha have built-in routines, it's usually quicker to compute tref(A) with technology when it's readily available. Gauss-Jordan Elimination thus puts the finishing touches to Gauss Elimination and provides the convenient algorithm that we had been seeking for solving a general system: Gauss-Jordan Elimination: given a general system of m linear equations in n variables, © form the associated augmented matrix [A b] and compute rref([A bl), © ‘ifthe right hand-most column of rref([A b}) isa pivot column, then the system is inconsistent, otherwise the system is consistent, © ifthe system is consistent, then any variable corresponding to a pivot column is called a basic variable, otherwise the variable is called a free variable. Since computation of rref([A b}) usually requires more row operations than finding an Echelon Form of [Ab] on which back substitution can be used, however, computations for huge linear systems might still use Gauss Elimination together with some ‘clever tricks' to reduce stil further the number of operations required. There's one important family of linear systems in which all the right hand sides are zero, ie. b= 0 Definition 4.2: a linear system is said to be HOMOGENEOUS when the right hand sides are all zero, i.e, when the linear system has the form Ax =0, Since AO =0, a homogeneous system always has the TRIVIAL solution x =0, hence is always consistent, but it will have infinitely many solutions when the system has a free variable, Such a system can occur, for instance, when finding the linear equation of the plane passing through three paints in R, Problem 4.5: determine as a linear equation the unique plane passing through the points Q(-2, 1,2), R(0,2,2), $(1,1,4). Solution: The general linear equation in 3 variables is az+bytez+d=0. ‘Asa plane it will contain Q, R, $ when a, b, ¢ and d satisfy the homogeneous system -lot+b+%+d = 0, 0a + 2b+2c+d a+b+4e¢d " es which as an augmented matrix is 21210 022 11410. Ag)= 2 But 100-40 mef(A 0) = |0 10 3 of. 3 oo1zo Thus dis a free variable, say d=, and b= so the equation of the plane is 92 —4y— 32-414 = 0, setting t = 14. We could have chosen any value for t,t #0. So does this mean the plane is not unique? NO!! We could cancel out the common factor from the resulting equation and still get the same equation! The inter-relation between the number of pivots in rref(A) and solutions of general systems suggests the following key conceptual definition Definition 4.3: the RANK of a matrix Ais the number of leading 1's in the rows of ref(A), i, the number of pivot colurans. For an m x n matrix A, Rank(A) < min{m, n}. Anumber of the earlier results can be expressed in terms of rank. There will be many others. Theorem 4.1: if Ais the coefficient matrix for a system of m linear equations in n variables, then the linear system © jis consistent if Rank(A) = m, © has at most one solution if Rank(A) = n, © has infinitely many solutions or no solutions if Rank(A) < n. In particular, when m

You might also like