Lecture Notes 2: Matrices as Systems of Linear Equations



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

Solutions to Math 51 First Exam January 29, 2015

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

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

Solving Linear Systems, Continued and The Inverse of a Matrix

1 Introduction to Matrices

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

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS

MAT 242 Test 2 SOLUTIONS, FORM T

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

Linearly Independent Sets and Linearly Dependent Sets

Systems of Linear Equations

Solving Systems of Linear Equations Using Matrices

Methods for Finding Bases

Similarity and Diagonalization. Similar Matrices

Solving Systems of Linear Equations

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

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

( ) which must be a vector

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

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

A =

Notes on Determinant

Vector Spaces 4.4 Spanning and Independence

Math 312 Homework 1 Solutions

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

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.

Linear Algebra Notes for Marsden and Tromba Vector Calculus

These axioms must hold for all vectors ū, v, and w in V and all scalars c and d.

Name: Section Registered In:

Math 215 HW #6 Solutions

MATH APPLIED MATRIX THEORY

Arithmetic and Algebra of Matrices

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

Mathematics Course 111: Algebra I Part IV: Vector Spaces

1 VECTOR SPACES AND SUBSPACES

Chapter 19. General Matrices. An n m matrix is an array. a 11 a 12 a 1m a 21 a 22 a 2m A = a n1 a n2 a nm. The matrix A has n row vectors

1 Sets and Set Notation.

NOTES ON LINEAR TRANSFORMATIONS

Lecture 3: Finding integer solutions to systems of linear equations

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

Orthogonal Diagonalization of Symmetric Matrices

Linear Algebra Review. Vectors

x y The matrix form, the vector form, and the augmented matrix form, respectively, for the system of equations are

Linear Codes. Chapter Basics

Linear Programming. March 14, 2014

Lecture 1: Systems of Linear Equations

Chapter 6. Orthogonality

α = u v. In other words, Orthogonal Projection

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

1.2 Solving a System of Linear Equations

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

MATH 304 Linear Algebra Lecture 9: Subspaces of vector spaces (continued). Span. Spanning set.

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

1.5 SOLUTION SETS OF LINEAR SYSTEMS

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.

T ( a i x i ) = a i T (x i ).

Systems of Equations

Linear Algebra Notes

Lecture 2 Matrix Operations

University of Lille I PC first year list of exercises n 7. Review

Solving Systems of Linear Equations

Solution to Homework 2

THE DIMENSION OF A VECTOR SPACE

Brief Introduction to Vectors and Matrices

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

Chapter 20. Vector Spaces and Bases

Matrix Representations of Linear Transformations and Changes of Coordinates

MA106 Linear Algebra lecture notes

Introduction to Matrix Algebra

Lecture L3 - Vectors, Matrices and Coordinate Transformations

Elementary Matrices and The LU Factorization

2.2/2.3 - Solving Systems of Linear Equations

Lecture notes on linear algebra

Part 1 Expressions, Equations, and Inequalities: Simplifying and Solving

Orthogonal Projections and Orthonormal Bases

Inner Product Spaces

5 Homogeneous systems

MAT188H1S Lec0101 Burbulla

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

Systems of Linear Equations

1 Solving LPs: The Simplex Algorithm of George Dantzig

Linear Algebra and TI 89

CS3220 Lecture Notes: QR factorization and orthogonal transformations

How To Understand And Solve A Linear Programming Problem

4.5 Linear Dependence and Linear Independence

GENERATING SETS KEITH CONRAD

x + y + z = 1 2x + 3y + 4z = 0 5x + 6y + 7z = 3

LINEAR ALGEBRA. September 23, 2010

Notes on Orthogonal and Symmetric Matrices MENU, Winter 2013

LINEAR ALGEBRA W W L CHEN

160 CHAPTER 4. VECTOR SPACES

Vector and Matrix Norms

Linear Equations in Linear Algebra

Solution of Linear Systems

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

Applied Linear Algebra

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

Transcription:

2: Matrices as Systems of Linear Equations 33A Linear Algebra, Puck Rombach Last updated: April 13, 2016 Systems of Linear Equations Systems of linear equations can represent many things You have probably come across such a problem before Here are some examples; in each case, write down the system of linear equations that needs to be solved Balance the following chemical reaction C 7 H 10 N + O 2 CO 2 + H 2 O + NO 2 Find the exact time between 2 and 3 o clock that the minute and hour hands of a clock make a 180 angle A mother gave to her three children 30 boxes of candy, of which 10 were full, 10 were half full, and the last 10 were empty Divide the candy and boxes so that there will be equal division among the three children of both candy and boxes Find all the solutions of this problem You probably already know how to solve systems of linear equations via substitution or addition/elimination We will start doing this in a more standardized way, using matrices Matrix basics A matrix is an n-by-m array of numbers We refer to the elements of a matrix A by a i j, meaning the p 28-30 element in the ith row and jth column We can add an subtract matrices, if they have the same dimensions, by adding/subtracting elementwise We have that if C = A + B, and A and B are n-by-m matrices, then c i j = a i j + b i j, for all 1 i n and for all 1 j m We can also multiply a matrix by a scalar (a single real number) If C = za, then c i j = za i j, for all 1 i n and for all 1 j m Multiplying matrices takes a little more work If A is an n-by-k matrix, and B is a k-by-m matrix, p 78-81 Thm 232-8 then C = AB is an n-by-m matrix with c i j = k l=1 a il b l j, for all 1 i n and for all 1 j m As shown in class, we can also think of matrix multiplication in terms of dot products of vectors First of all, we denote vectors as follows:

2 v 1 v 2 v = The dot product of two vectors v w is defined as follows: v n v w = v 1 w 1 + v 2 w 2 + + v n w n Note that the dot product of two vectors is a scalar, and that it is only defined if the two vectors have the same dimension When we multiply a matrix with a vector, we can think of that in terms of ordinary matrix multiplication (since a vector is an n-by-1 matrix), or we can think of it in terms of dot products, either by thinking of A as a set of horizontal row vectors: w 1 w 1 x w 2 A x = x =, w n w n x or as a set of vertical column vectors: p 31-32 Thm 138-10 x 1 A x = v 1 v 2 v m = x 1 v 1 + + x n v n x n Reduced row echelon form We will start representing systems of linear equations as matrices, and then solving them using p 8-15 matrix operations This method is known as Gauss-Jordan elimination For example, the system 3x + 6y z = 3 2x 4y + 3z = 2 can be represented by its coefficient matrix, which contains the coefficients of each variable in the equations: ( 3 6 ) 1 2 4 3 or its augmented matrix, which contains all of the information in the system of equations:

3 ( ) 3 6 1 3 2 4 3 2 Exercise 21 In the lecture, we showed that a system of linear equations can be interpreted as a question about linear combinations of vectors Show by yourself, ( ) that the system above can 3 be phrased as the question: how can we write the vector as a linear combination of the 2 ( ) ( ) ( ) 3 6 1 vectors,, and? 2 4 3 In order to solve the system of equations, we would like to write the augmented matrix into a p 16-18 standardized form, the so-called reduced row echelon form A matrix in reduced row echelon form satisfies the following properties: The leading (first non-zero) entry in each row is 1 A column that contains such a leading entry has 0 everywhere else The rows are in order of the position of their leading coefficients The reduced row echelon form of a matrix is unique, and can be achieved by using a series of the following elementary row operations Swapping two rows Multiplying a row by a non-zero scalar Adding a multiple of one row to another row We will introduce a general algorithm for rewriting a matrix into its RREF in lecture 4 Let s first get familiar with the RREF and discover why it is useful Example 22 Here are some examples of matrices in RREF, together with solutions to the system Write down the corresponding equations yourself In the last example, the variable z does not have its own leading 1, and is therefore free We give it an arbitrary value t The variable y is then dependent on z = t (We could have let z depend on y = t instead, but the rref gives us a canonical method in which the earlier variable receives the leading 1 and is named as the dependent variable) 1 2 0 0 0 0 1 0 0 0 0 1 1 0 0 1 0 1 0 2 0 0 1 3 - Inconsistent - 0 solutions (one of the equations is 0=1) - Consistent - Independent - 1 solution x = 1 y = 2 z = 3

4 1 0 0 1 0 1 2 2 0 0 0 0 - Consistent - Dependent - solution x = 1 y + 2z = 2 y = 2 2t z = t Exercise 23 Try to find the augmented matrices for the problems given at the start of these notes Finding the right system of equations is hard! Exercise 24 Suggested exercises from Bretscher: 12: 1, 8, 18, 27, 29, 32, 36, 46, 77 13: 7, 22, 24, 25, 47, 50, 53 The RREF algorithm We use the following general algorithm for rewriting a matrix into its RREF Algorithm 1 RREF for row i = 1 n do let a i j be the leading coefficient of row i; divide row i by a i j so that a i j becomes 1; subtract row i a k j times from all other rows so that a k j becomes 0 for all k i; end for arrange the rows in order of the position of their leading coefficients; Once you have written your system of linear equations as an augmented matrix, and then written the augmented matrix into reduced row echelon form, you can find the solutions Note that a diagonal matrix is a matrix in which all entries outside the main diagonal are 0 So, A is diagonal whenever a i, j = 0 for all i j If the RREF matrix contains a row where the final entry is non-zero and all other entries are 0, then the system is inconsistent and there are no solutions If the RREF is a diagonal matrix if you ignore the last column, then the system is consistent and independent, and it has exactly one solution Else, if the RREF is not a diagonal matrix (ignoring the last column), then the system is consistent and dependent, and it has infinitely many solutions

5 The rank of a matrix The rank of a matrix A, denoted rank(a), is the number of leading 1s in the RREF of A We will p 26 learn other, equivalent definitions for the rank of A later In a system of n linear equations in m variables, where A is the coefficient matrix: If the system is inconsistent, then rank(a) < n If the system is consistent and independent, then rank(a) = m If the system is consistent and dependent, then rank(a) < m Conversely: If rank(a) = n, then the system is consistent If rank(a) < m, then the system is either inconsistent or consistent and dependent If rank(a) = m, then the system is either inconsistent or consistent and independent If n = m, then { system has unique solution } rank(a) = n Exercise 25 Examine the statements above until they feel natural and you can explain them intuitively Using the RREF to answer questions about independence Suppose that we have an n m matrix A Then we can think of this matrix either in terms of a set of column vectors v 1, v 2,, v m or in terms of row vectors w 1, w 2,, w n w 1 A = v 1 v 2 v m = w 2 w n We may be interested in the vector spaces spanned by either the set of columns of A or the set of rows of A We call these the column span of A (= span( v 1, v 2,, v m )) and the the row span of A (= span( w 1, w 2,, w n )) The following properties related to linear dependence among the rows and columns of A are extremely useful (The row-related facts are much easier to intuit than the column-related facts)

6 Theorem 26 The following properties related to linear dependence among the rows and columns of A are extremely useful (The row-related facts are much easier to intuit than the column-related facts) The set of column vectors of A which receive a pivot in rref(a) form a basis for the column span of A (This is a subset of { v 1, v 2,, v m }!) The set of rows in rref(a) that contain a pivot form a basis for the row span of A (This is not necessarily a subset of { w 1, w 2,, w n }!) Exercise 27 Is the set of vectors linearly independent? 1 2 1 2, 0, 0 1 1 2 1 1 Exercise 28 Find equations that describe the subspace of R 3 spanned by the vectors 1 and 2 1 4 0 0 Exercise 29 Find equations that describe the subspace of R 3 spanned by the vectors 1 and 2 2 4 Solutions to Exercises Solution 21 Exactly the same as the example from the lecture Solution 23 :) Solution 24 These will be discussed on Piazza and in the sections, and you may also ask about them in office hours Solution 27 We use this set as the columns for a matrix A and look at its rref: 1 2 1 rref 2 0 0 = I 3 1 1 2 Therefore, the full set is a basis and they are linearly independent Solution 28 In order to find equations we first find an alternate basis in reduced form (It is easy to see that these vectors are independent and are therefore already a basis for the span We use rref ( ) 1 1 1 = 1 2 4 ( ) 1 0 2 0 1 3

1 0 Therefore, the space can also be expressed by the basis 0, 1 This means that vectors 2 3 in this space are of the form 1 0 s s 0 + t 1 = t, 2 3 2s + 3t and we see they must satisfy the equation 2x 1 + 3x 2 x 3 = 0 Solution 29 You probably notice immediately that this is not an independent set, and this space is 0 0 1-dimensional, with basis 1 Vectors must be of the form s, giving us two equations: 2 2s x 1 = 0 2x 2 x 3 = 0 7