Lecture 2: Elimination with matrices
讲座摘要(lecture summary)
Method of Elimination
Elimination is the technique most commonly used by computer software to solve systems of linear equations. It finds a solution to whenever the matrix is invertible. In the example used in class,
The number in the upper left corner of A is called the first pivot. We recopy the first row, then multiply the numbers in it by an appropriate value (in this case ) and subtract those values from the numbers in the second row. The first number in the second row becomes . We have thus eliminated the in row column .
The next step is to perform another elimination to get a in row column ; here this is already the case.
The second pivot is the value which now appears in row column . We find a multiplier (in this case ) by which we multiply the second row to eliminate the in row column . The third pivot is then the now in row column .
We started with an invertible matrix and ended with an upper triangular matrix ; the lower left portion of is filled with zeros. Pivots are on the diagonal of .
We repeat the multiplications and subtractions with the vector
For example, we multiply the in the first position by and subtract from to get in the second position. When calculating by hand we can do this efficiently by augmenting the matrix , appending the vector b as a fourth or final column. The method of elimination transforms the equation into a new equation . In the example above, comes from and comes from .
The equation is easy to solve by back substitution; in our example, and . This is also a solution to the original system .
The determinant of is the product of the pivots. We will see this again.
Pivots may not be . If there is a zero in the pivot position, we must exchange that row with one below to get a non-zero value in the pivot position.
If there is a zero in the pivot position and no non-zero value below it, then the matrix is not invertible. Elimination can not be used to find a unique solution to the system of equations – it doesn’t exist.
Elimination Matrices
The product of a matrix () and a column vector () is a column vector () that is a linear combination of the columns of the matrix.
The product of a row () and a matrix () is a row () that is a linear combination of the rows of the matrix.
We can subtract times row of matrix from row of by calculating the matrix product:
The elimination matrix used to eliminate the entry in row column is denoted . The calculation above took us from to . The three elimination steps leading to were: , where . Thus .
Matrix multiplication is associative, so we can also write . The product tells us how to get from to . The inverse of the matrix tells us how to get from to .
If we solve , then it is also true that . This is why the method of elimination works: all steps can be reversed.
A permutation matrix exchanges two rows of a matrix; for example,
The first and second rows of the matrix are the second and first rows of the matrix . The matrix is constructed by exchanging rows of the identity matrix.
To exchange the columns of a matrix, multiply on the right (as in ) by a permutation matrix.
Note that matrix multiplication is not commutative: .
Inverses
We have a matrix:
which subtracts times row from row . To “undo” this operation we must add times row to row using the inverse matrix:
In fact, .
Problems and Solutions(习题及答案)
Problem 2.1: In the two-by-two system of linear equations below, what multiple of the first equation should be subtracted from the second equation when using the method of elimination? Convert this system of equations to matrix form, apply elimination (what are the pivots?), and use back substitution to find a solution. Try to check your work before looking up the answer.
Solution
One subtracts times the first equation from the second equation in order to eliminate the .
To convert to matrix form, use the general format :
We then apply elimination on matrix . Using the first pivot (the number in the upper left corner of ), we subtract three times the first row from the second row to get:
where is an upper triangular matrix with pivots and . Doing the same to the right side gives a new equation of the form :
To solve our new equation, we use back substitution:
and
We know that our solution fulfills the first equation; let’s make sure that our values fulfill the second equation as a check on our work:
Problem 2.2: (2.3 #29. Introduction to Linear Algebra: Strang) Find the triangular matrix that reduces “Pascal’s matrix” to a smaller Pascal:
Which matrix (multiplying several ’s) reduces Pascal all the way to ?
Solution
The matrix is
One can eliminate the second column with the matrix
and the third column with the matrix
Multiplying these together, we get
Since reduces the Pascal matrix to must be the inverse matrix!