If we perform the row operation R1↔R2 first
A1=[111011−11−1]Let's not do any more row operations:
A1=[100010−101][111011020]R3−2R2→R3A1=[100010−121][11101100−2]But, if we want to factorize A, how is A1 related to A? It follows that all row operations are linear operations:
If you do a row operation on a vector v=αv1+βv2 to get a vector ˆv it is the same as doing the row operation on v1 and v2 to get ˆv1 and ˆv2, respectively, and then ˆv=αˆv1+βˆv2.
This is important because it implies that all row operations have a matrix representation. We've already found the matrix L for Rm+αRp→Rm for m>p:
L=(lij),lij={1,i=jα,j=m, i=p,0,otherwise., L−1=(l′ij),l′ij={1,i=j−α,j=m, i=p,0,otherwise.To find the matrix representation for a (linear) transformation, you apply the transformation to each of the standard (basis) unit vectors:
[100]→[010][010]→[100][001]→[001]We assemble the resulting columns into a matrix. The R1↔R2 matrix is
P=[010100001]This is called a simple permutation matrix because it corresponds to ONE row interchange. Another way of constructing the matrix associated with a row operation is:
To construct the matrix associated with a row operation, apply that row operation to the identity matrix.
A general simple permutation matrix corresponding to Rm↔Rk is given by
P=(pij),pij={1,i=j and i≠m,p and j≠m,p1,i=m,j=p or i=p,j=m0,otherwise.It follows immediately, that pij=pji so that PT=P.
Returning to our example,
A=[011111−11−1].PA=A1=[100010−121][11101100−2]=LUA=P−1LUIt follows that P−1=P=PT.
Consider a general permutation matrix, which we define to be the product of a number of simple permulation
P=PkPk−1⋯P2P1.Notice that PT=PT1PT2⋯PTk−1PTk=P−11P−12⋯P−1k−1P−1k=P−1.
Given an invertible matrix A, we want to find a permutation matrix P such that
PA=LUA=PTLUwhere L is a lower-triangular matrix with ones on the diagonal and U is upper trianguler. Note that such a factorization is NOT unique. Different pivoting strategies give different permutation matrices.
You should check the following. If P1A swaps rows i and j of the matrix A then AP1 swaps columns i and j of A.
To compute this factorization, we first write
A=[100010001][100010001][011111−11−1]These two identity matrices will be used to capture both the P and L in the matrix factorization
We first must swap the rows one and two (following partial pivoting). Let P1 be the matrix that corresponds to this. Because P1=P−11 we can write:
A=[100010001]P1P1[100010001]P1P1[011111−11−1]The matrix P1IP1=I. As we progress, this will not always happen. Recall that multiplication on the right by P1 corresponds to column swaps:
A=[010100001][100010001][111011−11−1]Now we perform the row operation R3+R1→R3. This modifies the matrix that will become L in the A=PTLU factorization
A=[010100001][100010−101][111011020]Following the rules of partial pivoting, we must swap rows 2 and 3. Let P2 be the matrix that does this:
A=[010100001]P2P2[100010−101]P2P2[111011020]We have one final row operation: R3−1/2R2→R3
A=[001100010][100−11001/21][111020001]Naive Gaussian elimination: A=[010100001][100010−121][11101100−2]=PTLU
Partial pivoting: A=[001100010][100−11001/21][111020001]=PTLU
The entries of L for partial pivoting will always be less than one!