You are about to erase your work on this activity. Are you sure you want to do this?
Updated Version Available
There is an updated version of this activity. If you update to the most recent version of this activity, then your current progress on this activity will be erased. Regardless, your record of completion will remain. How would you like to proceed?
Now that we know the answer, we will turn to the original question and consider the
advantages of the format of the original problem. Observe that the two matrices have
a distinct pattern. The matrix on the left has zeros above the main diagonal, while
the matrix on the right has zeros below the main diagonal. Matrices that follow
such a pattern are called lower triangular and upper triangular matrices,
respectively.
Let \(\vec {y}=\begin{bmatrix}2&-1&2\\0&4&-1\\0&0&3\end{bmatrix}\vec {x}\). Then we can write the original equation as
Thus, \(\vec {x}=\begin{bmatrix}2\\1\\-1\end{bmatrix}\). Observe that this is the same answer that we obtained in the beginning of the
problem using Gaussian elimination.
of Exploration init:LUfactorization, often in practice we express the matrix on the left as a product of
an upper triangular matrix \(U\) and a lower triangular matrix \(L\) and use substitution to
solve the equation instead of using Gaussian elimination to find the solution. In
Exploration init:LUfactorization,
The process of taking a matrix \(A\) and expressing it as a product \(A=LU\) of a lower triangular
matrix \(L\) and an upper triangular matrix \(U\) is called \(LU\) factorization. We also adopt the
(common) convention that \(L\) is a matrix with a diagonal consisting entirely of \(1\)’s, which
is often called a lower unit triangular matrix.
Not every matrix has an \(LU\) factorization, but we will see that we can correct for
that.
Unfortunately, for reasons we will explain below, it is not possible to find an \(LU\)
factorization of this coefficient matrix. However, if we simply swap the first two
equations:
(How we actually
come up with an \(LU\) factorization of \(A\) will be discussed after this example.)
To understand how an \(LU\) factorization can be used, it is helpful to think of this system
of equations as a matrix equation.
\[A\vec {x}=\vec {b}\]
\[(LU)\vec {x}=\vec {b}\]
\[L(U\vec {x})=\vec {b}\]
So if we let \(\vec {y}=U\vec {x}\) and also write \(\vec {y}=\begin{bmatrix} y_1 \\ y_2 \\ y_3 \end{bmatrix}\), then we are able to solve for \( y_1, y_2, \text { and } y_3\) using forward-substitution.
Once we have the values of \(\vec {y}\), since \(\vec {y}=U\vec {x}\), all that remains is to solve the following matrix
equation using back-substitution.
In the matrix on the right, we
begin with the left row and zero out the entries below the top using the row
operation which involves adding a multiple of a row to another row. You
do this and also update the matrix on the left so that the product will be
unchanged.
Here is the first step. We take \(-2\) times the top row and add to the second. Then take \(2\)
times the top row and add to the second in the matrix on the left. This gives us
The next step is to take \(2\) times the top row and add to the bottom in the matrix
on the right. To ensure that the product is unchanged, we place a \(-2\) in the
bottom left corner in the matrix on the left. Thus the second step yields
For our final step, we take \(7\) times the middle row on right and add to bottom row.
Updating the matrix on the left in the manner we did earlier, we get
At this point,
we can stop. We have an \(LU\) factorization of the original matrix. We can always multiply
the matrices to check, if we wish.
Notice that when we perform the multiplier method, we are making repeated use of a
certain type of elementary row operation, namely, we are adding a scalar multiple of
one row to a row below it. The reason this helps to create an \(LU\) factorization
depends upon the fact that the elementary matrices corresponding to such
operations are lower triangular. To understand how this works, we begin with a
lemma.
Let \(L\) be a lower (upper) triangular matrix \(m\times m\) which has ones down the main diagonal.
Then \(L^{-1}\) also is a lower (upper) triangular matrix which has ones down the
main diagonal. In the case that \(L\) is of the form
where all entries are zero
except for the left column and main diagonal, it is also the case that \(L^{-1}\) is
obtained from \(L\) by simply multiplying each entry below the main diagonal in \(L\)
by \(-1\). The same is true if the single nonzero column is in another position.
Consider the usual setup for finding the inverse \(\begin{bmatrix} L &|& I \end{bmatrix}\). Each row operation used on \(L\) to
transform this matrix to reduced row echelon form changes only the entries in \(I\) below
the main diagonal. Whether we have the special case of \(L\) given in 1 where the nonzero
nondiagonal entries are in the left column, or if the single nonzero column is in
another position, it is clear that multiplication by \(-1\) as described in the lemma gives us
\(L^{-1}\).
and assume \(A\) can be row reduced to an upper triangular
form using only row operation 3. Thus, in particular, \(a_{11}\neq 0\). Multiply on the left by
This is the product of elementary matrices which make modifications in
the first column only. It is equivalent to taking \(-a_{21}/a_{11}\) times the first row and
adding to the second. Then taking \(-a_{31}/a_{11}\) times the first row and adding to the
third and so forth. The quotients in the first column of the above matrix
are the multipliers. Thus the result is of the form
By assumption, \(a_{22}^{\prime }\neq 0\) and so
it is possible to use this entry to zero out all the entries below it in the
matrix on the right by multiplication by a matrix of the form
Again, the entries in the first column below the
1 are the multipliers. Continuing this way, zeroing out the entries below
the diagonal entries, finally leads us to
where \(U\) is upper triangular. Each \(E_{j}\)
has all ones down the main diagonal and is lower triangular. Now we can
multiply both sides by the inverses of the \(E_{j}\) in the reverse order. This yields
which we obtained in building \(E_{1}\), and which we denote respectively by \(M_{21},\cdots ,M_{m1}\) to
save notation, are the multipliers. Therefore, according to the lemma, to find \(E_{1}^{-1}\) we
simply write
where each factor has at most one nonzero column, the position of
which moves from left to right as we scan the above product of matrices from
left to right. It follows from what we know about the effect of multiplying
on the left by an elementary matrix that the above product is of the form
To sum up the procedure, beginning at the left column and moving toward
the right, you simply insert, into the corresponding position in the identity
matrix, \(-1\) times the multiplier which was used to zero out an entry in that
position below the main diagonal in \(A,\) while retaining the main diagonal which
consists entirely of ones. This will give us \(L\) as we create \(U\) using row operation
3.
We now return to Example 1, to understand why we could not use the multiplier
method to find an \(LU\) factorization of the coefficient matrix. Suppose we had
written
Our first step of Gaussian elimination would require a row swap to get a
nonzero entry into the top left corner (we swapped rows 1 and 2 in Example 1).
Unfortunately, the elementary matrix that accomplishes this, \(P=\begin{bmatrix}0&1&0\\1&0&0\\0&0&1\end{bmatrix}\) is NOT lower
triangular. So we cannot apply Lemma 5 to generate a lower triangular
\(L\).
If the elementary matrices used to reduce our matrix to row-echelon form are all
lower triangular, then we can find an \(LU\) factorization. But what about the general
case?
Suppose an \(m \times n\) matrix \(A\) is transformed to a row-echelon matrix \(U\) using Gaussian
elimination. Let \(P_1, P_2, \ldots , P_s\) be the elementary matrices corresponding (in order) to
the row interchanges used, and write \(P=P_s \cdots P_2 P_1\). (If no interchanges are used take \(P = I_M\).)
Then:
(a)
\(PA\) is the matrix obtained from \(A\) by doing these interchanges (in order) to A.
(b)
\(PA\) has an \(LU\) factorization.
For a proof of the above theorem, the reader is referred to [Nicholson].
The matrix \(P\) in the above theorem is called a permutation matrix. These matrices
have other important applications, as we will see later.
Practice Problems
Use the given \(LU\) factorization of the coefficient matrix to solve the system of
equations.
\[\begin{array}{ccccccc} x & +&2y&+&3z&= &5 \\ 2x&+&3y&+&z&=&6\\ 3x& +&5y&+&4z&=&11 \end{array}\]
Observe that an \(LU\) factorization of the coefficient matrix is
Can you show that every permutation matrix is invertible? If so, What does the
inverse of a permutation matrix look like? (Recall that a permutation matrix is
matrix \(P\) of Theorem 7.)