2. Echelon form It is time to make some more definitions and actually prove that Gaussian elimination works: Definition 2.1. Let m and n Z be two

Similar documents
MATH10212 Linear Algebra. Systems of Linear Equations. Definition. An n-dimensional vector is a row or a column of n numbers (or letters): a 1.

Row Echelon Form and Reduced Row Echelon Form

Systems of Linear Equations

a 11 x 1 + a 12 x a 1n x n = b 1 a 21 x 1 + a 22 x a 2n x n = b 2.

Notes on Determinant

1.2 Solving a System of Linear Equations

2x + y = 3. Since the second equation is precisely the same as the first equation, it is enough to find x and y satisfying the system

Reduced echelon form: Add the following conditions to conditions 1, 2, and 3 above:

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 2. x n. a 11 a 12 a 1n b 1 a 21 a 22 a 2n b 2 a 31 a 32 a 3n b 3. a m1 a m2 a mn b m

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS

Lecture 3: Finding integer solutions to systems of linear equations

Direct Methods for Solving Linear Systems. Matrix Factorization

Solutions to Math 51 First Exam January 29, 2015

Abstract: We describe the beautiful LU factorization of a square matrix (or how to write Gaussian elimination in terms of matrix multiplication).

Math 312 Homework 1 Solutions

THE DIMENSION OF A VECTOR SPACE

Solution to Homework 2

Solving Systems of Linear Equations Using Matrices

1 Solving LPs: The Simplex Algorithm of George Dantzig

Section 8.2 Solving a System of Equations Using Matrices (Guassian Elimination)

I. GROUPS: BASIC DEFINITIONS AND EXAMPLES

Solving Systems of Linear Equations

1 VECTOR SPACES AND SUBSPACES

Practical Guide to the Simplex Method of Linear Programming

MATH 304 Linear Algebra Lecture 18: Rank and nullity of a matrix.

MAT 200, Midterm Exam Solution. a. (5 points) Compute the determinant of the matrix A =

NOTES ON LINEAR TRANSFORMATIONS

Chapter 7. Matrices. Definition. An m n matrix is an array of numbers set out in m rows and n columns. Examples. (

Mathematics Course 111: Algebra I Part IV: Vector Spaces

Lemma 5.2. Let S be a set. (1) Let f and g be two permutations of S. Then the composition of f and g is a permutation of S.

Matrix Algebra. Some Basic Matrix Laws. Before reading the text or the following notes glance at the following list of basic matrix algebra laws.

Lecture Notes 2: Matrices as Systems of Linear Equations

by the matrix A results in a vector which is a reflection of the given

Au = = = 3u. Aw = = = 2w. so the action of A on u and w is very easy to picture: it simply amounts to a stretching by 3 and 2, respectively.

Math 115A HW4 Solutions University of California, Los Angeles. 5 2i 6 + 4i. (5 2i)7i (6 + 4i)( 3 + i) = 35i + 14 ( 22 6i) = i.

5 Homogeneous systems

7 Gaussian Elimination and LU Factorization

SYSTEMS OF EQUATIONS AND MATRICES WITH THE TI-89. by Joseph Collison

The Determinant: a Means to Calculate Volume

Methods for Finding Bases

December 4, 2013 MATH 171 BASIC LINEAR ALGEBRA B. KITCHENS

GENERATING SETS KEITH CONRAD

Recall that two vectors in are perpendicular or orthogonal provided that their dot

Similarity and Diagonalization. Similar Matrices

1 Sets and Set Notation.

( ) which must be a vector

Linear Codes. Chapter Basics

it is easy to see that α = a

v w is orthogonal to both v and w. the three vectors v, w and v w form a right-handed set of vectors.

The Characteristic Polynomial

1.5 SOLUTION SETS OF LINEAR SYSTEMS

Elementary Matrices and The LU Factorization

Factorization Theorems

8 Primes and Modular Arithmetic

Linear Algebra I. Ronald van Luijk, 2012

1 Introduction. Linear Programming. Questions. A general optimization problem is of the form: choose x to. max f(x) subject to x S. where.

MA106 Linear Algebra lecture notes

Vector Spaces 4.4 Spanning and Independence

Name: Section Registered In:

8 Square matrices continued: Determinants

Lecture 1: Systems of Linear Equations

a(1) = first.entry of a

Continued Fractions and the Euclidean Algorithm

Unit 18 Determinants

Matrix Representations of Linear Transformations and Changes of Coordinates

Vector and Matrix Norms

Linear Algebra Notes for Marsden and Tromba Vector Calculus

7. LU factorization. factor-solve method. LU factorization. solving Ax = b with A nonsingular. the inverse of a nonsingular matrix

MATH2210 Notebook 1 Fall Semester 2016/ MATH2210 Notebook Solving Systems of Linear Equations... 3

Homogeneous systems of algebraic equations. A homogeneous (ho-mo-geen -ius) system of linear algebraic equations is one in which

Here are some examples of combining elements and the operations used:

3. INNER PRODUCT SPACES

DETERMINANTS IN THE KRONECKER PRODUCT OF MATRICES: THE INCIDENCE MATRIX OF A COMPLETE GRAPH

LINEAR ALGEBRA. September 23, 2010

Solution of Linear Systems

13 MATH FACTS a = The elements of a vector have a graphical interpretation, which is particularly easy to see in two or three dimensions.

LINEAR ALGEBRA W W L CHEN

LS.6 Solution Matrices

HOMEWORK 5 SOLUTIONS. n!f n (1) lim. ln x n! + xn x. 1 = G n 1 (x). (2) k + 1 n. (n 1)!

Linearly Independent Sets and Linearly Dependent Sets

Chapter 6. Linear Programming: The Simplex Method. Introduction to the Big M Method. Section 4 Maximization and Minimization with Problem Constraints

Solving Linear Systems, Continued and The Inverse of a Matrix

Lecture 5 Principal Minors and the Hessian

UNCOUPLING THE PERRON EIGENVECTOR PROBLEM

Suk-Geun Hwang and Jin-Woo Park

5.3 The Cross Product in R 3

Solving Systems of Linear Equations

DETERMINANTS TERRY A. LORING

Systems of Linear Equations

Linear Algebra Notes

The Assignment Problem and the Hungarian Method

MAT188H1S Lec0101 Burbulla

MATH 423 Linear Algebra II Lecture 38: Generalized eigenvectors. Jordan canonical form (continued).

Chapter 6. Orthogonality

Arithmetic and Algebra of Matrices

6. Cholesky factorization

Linear Equations ! $ & " % & " 11,750 12,750 13,750% MATHEMATICS LEARNING SERVICE Centre for Learning and Professional Development

WRITING PROOFS. Christopher Heil Georgia Institute of Technology

AN ALGORITHM FOR DETERMINING WHETHER A GIVEN BINARY MATROID IS GRAPHIC

Linear Programming. March 14, 2014

Transcription:

2. Echelon form It is time to make some more definitions and actually prove that Gaussian elimination works: Definition 2.1. Let m and n Z be two positive integers. Let I = { i Z 0 < i m } and J = { j Z 0 < i n }. A real m n matrix is a function A: I J R. Let A be an m n matrix. Let i I and j J be two indices, so that 1 i m and 1 j n. The (i, j) entry of the matrix A is the value of the function A at (i, j), that is A(i, j). It is customary to write A = (a ij ) which means that A(i, j) = a ij and we refer to this as the entry in the ith row and j column (in the usual fashion). Note however that the definition given in (2.1) is convenient for two reasons. First it is immediate that two matrices are equal if and only if they have the same entries (since this is what it means for two functions to be the same). It is also straightforward to generalise this definition to complex matrices, integer matrices and so on (the possibilities are endless); just change the range of the function to the appropriate set. Now let us define the end product of Gaussian elimination. This is a little harder to define than one might first imagine: Definition 2.2. Let A be a matrix. We say that A is in echelon form if A satisfies the following properties: The first (reading left to right) non-zero entry in every row is a one. Such entries are called pivots. Every row which contains a pivot occurs before every row which does not contain a pivot. Pivots in earlier rows (again, reading left to right) come in earlier columns (reading top to bottom). One can express the first and third rules using indices. The first rule says that if we fix i, and j has the property that a ij 0 whilst a ij = 0 for all j < j then a ij = 1. The third rule says that if there is a pivot at position (i, j) and there is a pivot at position (i, j ), where i < i then j < j. Okay, so what are the basic steps of Gaussian elimination? Definition 2.3. Let A be a matrix. An elementary row operation is one of three operations: (1) Multiply a row by a non-zero scalar. (2) Multiply a row by a non-zero scalar and add the result to another row. 1

(3) Swap two rows. We say that two matrices A 1 and A 2 are row equivalent if we can get from A 1 to A 2 by a (finite) sequence of elementary row operations. So Gaussian elimination takes any matrix A, performs a sequence of elementary row operations until A is in echelon form. By definition this means that A is row equivalent to a matrix in echelon form. Let us first see that performing row operations does not change the set of solutions: Theorem 2.4. Let C 1 = (A 1 b 1 ) and C 2 = (A 2 b 2 ) be two row equivalent augmented matrices. Then the system of equations A 1 v = b 1 and A 2 v = b 2 have the same solution set. Proof. By an obvious induction it suffices to prove this result if C 2 is obtained from C 1 by an elementary row operation. Note first that all of the elementary row operations are reversible. If we multiply the ith row of C 1 by λ to get C 2 then if we multiply the ith row of C 2 by 1/λ we get C 1. If we swap the ith row and jth row of C 1 to get C 2 then we simply swap the same rows to get from C 2 to C 1. Finally if we take the ith row of C 1, multiply by λ and add it to the jth row then, to get back, take the ith row of C 2, multiply by λ and add it to the jth row. In other words if there is an elementary row operation to get from C 1 to C 2 then there is an elementary row operation to get from C 2 to C 1 (of the same type even). Let S 1 be the solution set of A 1 v = b 1 and let S 2 be the solution set of A 2 v = b 2. Then it suffices to show that S 1 S 2. Indeed by symmetry, S 2 S 1 and in this case S 1 = S 2. Note that swapping rows has no effect on the solutions. Swapping rows of both C 1 and C 2, we may therefore assume that the elementary row operation only acts on the first two rows. Let F i be the solution set of the equations corresponding to those rows of C i and let L i be the solution set of the remaining rows. Then the solutions sets are precisely S 1 = F 1 L 1 and S 2 = F 2 L 2. But L 1 = L 2 since they are the solutions sets corresponding to the same rows and so to the same equations. So we might as well assume that m 2 (the two cases, m = 1 and m = 2 depend on which elementary row operation we use). Consider multiplying the first row by a non-zero scalar λ. In this case m = 1 and the two equations read, a 1 x 1 +a 2 x 2 + +a n x n = b (λa 1 )x 1 +(λa 2 )x 2 + +(λa n )x n = λb. 2

Suppose that v = (r 1, r 2,..., r n ) S 1. By definition this means Multiply both sides by λ to get a 1 r 1 + a 2 r 2 + + a n r n = b. (λa 1 )λr 1 + (λa 2 )r 2 + + (λa n )r n = λb. But then v is a solution of the second equation, that is v S 2. Hence S 1 S 2 and so by symmetry S 1 = S 2. Now consider the only remaining case, multiplying the first row by a non-zero scalar λ and adding it to the second row. In this case m = 2. If the equations corresponding to C 1 are a 11 x 1 + a 12 x 2 + + a 1n x n = b 1 a 21 x 1 + a 22 x 2 + + a 2n x n = b 2, then the equations corresponding to C 2 are a 11 x 1 + a 12 x 2 + + a 1n x n = b 1 (λa 11 + a 21 )x 1 + (λa 11 + a 22 )x 2 + + (λa 1n + a 2n )x n = (λb 1 + b 2 ). Suppose that v = (r 1, r 2,..., r n ) S 1. By definition this means But then a 11 r 1 + a 12 r 2 + + a 1n r n = b 1 a 21 r 1 + a 22 r 2 + + a 2n r n = b 2. (λa 11 + a 21 )r 1 + (λa 11 + a 22 )r 2 + + (λa 1n + a 2n )r n = λa 11 r 1 + a 21 r 1 + λa 11 r 2 + a 22 r 2 + + λa 1n r n + a 2n r n = λ(a 11 r 1 + a 11 r 2 + + a 1n r n ) + (a 21 r 1 + a 22 r 2 + + a 2n r n ) = λb 1 + b 2, so that v satisfies the second equation of the second system. Since v clearly satisfies the first equation of the second system (which is nothing but the first equation of the first system), v S 2. Hence S 1 S 2 and so S 1 = S 2 by symmetry. Now we describe Gaussian elimination as an algorithm. Algorithm 2.5 (Gaussian elimination). Let A be an m n matrix. (1) Let l = 0. (2) Set i = l+1. If there is no row below the lth row which contains a non-zero entry then STOP. (3) Otherwise pick the smallest j such that there is an index i > i such that a i j 0. (4) Swap rows i and i. (a) Let λ = 1/a ij and multiply the ith row by λ = 1/µ. 3

(b) If there are no non-zero elements below the ith row in the jth column then increase l by 1 and then return to (2). (c) Pick the smallest j such that there is an index i > i with λ = a i j 0. Multiply the ith row by λ and add it to the row i and return to (b). The basic idea is that the index l measures how many rows are in echelon form. At the beginning we don t know any rows are in echelon form, so we put l = 0. If the only rows left are rows of zeroes then we are done. Otherwise we pick the first non-zero entry to the left below row l and we put this in the next row (row l + 1). We make this number a pivot and eliminate all the entries in the same column below this entry. At this stage we know that the first l +1 rows are in echelon form and we repeat the whole process. We need a little notation. Let A = (a ij ) a matrix. A submatrix B of A is any matrix which is obtained from A by deleting rows and columns. Theorem 2.6. Gaussian elimination always terminates with a matrix in echelon form. In particular every matrix is row equivalent to a matrix in row echelon form. Proof. Let B l be the l n submatrix of A obtained by deleting the last m = l rows of A. I claim that at every stage of the algorithm the matrix B l is in echelon form. This is certainly true at the beginning (since then l = 0 and this is a vacuous statement). On the other hand, the steps of the algorithm never alter the first l rows, so if don t change l we never lose the fact that B l is in echelon form. Finally every time we increase l by one then it easy to see that the matrix B l+1 is in echelon form. Suppose that Gaussian elimination stops. The only place we can stop is at step (2) in which case all the entries below the lth row are zeroes. But then the matrix A is in echelon form. Therefore it suffices to prove that Gaussian elimination always terminates. Note that there are two places where the algorithm loops (and this is of course the only reason the algorithm could continue indefinitely). Suppose that we are at step (c). Every time we go to step (b), we create one more zero in the jth column in a row below the ith row. Since there are at most m i rows below the ith row, this can only happen at most m i times. 4

Now suppose that we are at step (b) and we return to step (2). Since l increases by one every time and l m this can only happen at most m times. 5