Lecture 2 Systems of Linear Equations and Matrices, Continued Math 19620 Outline of Lecture Algorithm for putting a matrix in row reduced echelon form - i.e. Gauss-Jordan Elimination Number of Solutions Rotation Matrices Matrix Algebra Gauss-Jordan Elimination Theorem. For any matrix A, there exists a unique matrix rref(a) which is obtained from A by a sequence of elementary row operations, and is in row reduced echelon form. I will explain the algorithm to find rref(a) given A. Let A be an m n matrix. The algorithm to put a matrix in row reduced echelon form goes column by column. We say that we have reduced to the j th column, if when we remove the (j +1) st through the n th columns, the matrix is row-reduced. For example, the following matrix is reduced to the 4th column: B = 0 0 0 0 0 2 0 0 0 0 3 6 Note that B is NOT row reduced - the fifth and sixth columns must be finished. We suppose that we have reduced to the j th th column - we will now reduce to the (j + 1) st column. Note that if j = 0, this means that we have just started the algorithm, and we are trying to reduce the first column. 1
The most recent leading 1 is the leading 1 in the first j columns furthest to the right. Let i be the row it occurs in. In our example, i = 3. The first step is to look at column j + 1, strictly below row i. If every entry there is zero, we are done with this column, and column j + 1 corresponds to a free variable. Otherwise, let row k be the highest row which is strictly below row j and has nonzero entry c in column i + 1. If all entries are zero, we are in fact finished (and that column corresponds to a free variable). In our example, k = 6 and c = 3 - since the only rows below row 3 are 4, 5, and 6, and in rows 4 and 5, column 5 has a zero entry. Thus k = 6, and the entry at row 5 column 5 is c = 3. Apply the three following elementary row operations: First, swap rows i + 1 and k. Our example is now: 0 0 0 0 3 6 Second, divide row i + 1 by c (entry (i + 1, j + 1) will be a leading 1). Our example becomes: 0 0 0 0 1 2 Add multiples of row i + 1 to all other rows to clear column j + 1 except for the leading 1. In our example, we will add row 4 to row 3, and subtract twice row 4 from row 2: 0 0 1 0 0 12 0 0 0 1 0 4 0 0 0 0 1 2 To finish this example, we have to reduce to column 6. The final answer will be 1 2 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 2
Back to Systems of Linear Equations Consider the system y + 2z = 3 x + 2z = 14 x + y = 11 Last class, we learned how to write this system as 0 1 2 1 0 2 x y = 3 14 1 1 0 z 11 This equation is also written in augmented form: 0 1 2 3 1 0 2 14 1 1 0 11 This form is even more compact, but you can forget that you are working with an equation. However, in this form, it can be easier to remember that you must apply the row operations to both the coefficient matrix A and the constant vector b. Let s apply Gauss-Jordan elimination to this matrix. Final answer: 1 0 2 x 0 0 1 2 y = 0 0 0 0 z 1 Thus we have no solutions. The system is inconsistent. The Number of Solutions to a System There are three possibili- How many solutions exist for any given system of linear equations? ties: Infinitely many solutions One unique solution. No solutions. In fact, we can read off the behavior of the solutions from the rref: Consider the following examples: 1 2 0 0 a) 0 0 1 0 0 0 0 1 0 0 0 0 3
b) 1 2 0 1 0 0 1 2 0 0 0 0 c) 1 0 0 1 0 1 0 2 0 0 1 3 These augmented matrices are all in RREF, so it should be easy to determine the solutions. The examples correspond to the systems... thus a) has no solutions, b) has infinitely many solutions, and c) has a unique solution. Definitions A system of linear equations is consistent if it has at least one solution. Otherwise, it is inconsistent. The rank rank(a) of a matrix A is the number of leading 1 s in rrefa Theorem 1.3.1 of the book: Suppose A x = b is a system of linear equations, with m equations and n variables. (That is, A has m rows and n columns.) This system is inconsistent if and only if rref(a b) contains the row [ 0 0 0 1 ]. If a linear system is consistent, then it either has a unique solution, or it has infinitely many. We have rank(a) m and rank(a) n. If rank(a) = n, then the system is consistent. If rank(a) = m, then the system has at most one solution. If rank(a) < m, then the system has either infinitely many solutions, or none. Operations and Properties of Matrices and Vectors Notation: R n, standard unit vectors e i Sum, scaling of vectors Magnitude of a vector, unit vector Dot product of vectors A linear combination of vectors sums of matrices ( ) ( ) 1 2 3 7 3 1 + = 4 5 6 5 3 1 ( 8 5 ) 4 9 8 5 scalar multiple 3 ( 2 ) 1 1 3 A x (dot product with rows, linear combination of columns) 4
The columns of A give A applied to standard unit vectors. linearity of x Ax A function from F : R n R m is a rule which to each x 1 x 2 x =. Rn x n associates a unique vector F ( x) R m. A linear function is a function which satisfies: F ( x + y) = F ( x) + F ( y) for all vectors x, y R n F (c x) = c F ( x) for all scalars c and vectors x R n. Important Fact: every linear function F : R n R m can be represented by the action of a matrix A. That is, F ( x) = A x for all x. The columns of this matrix A are given by F ( e i ). Rotation Matrix Fix an angle θ. Consider the rule which associates to a vector v R 2 to R θ v which is obtained by rotating it by an angle θ. I claim that this is linear. Why? Check scaling and addition. Thus, it is represented by a matrix A θ. What is it? Reflections 5