88 Linear equations
(b) For Gauss elimination with pivoting, we start with
1 3 2 6
The biggest entry is the second row, so we swap
132 6
and then eliminate the first column
0 7/4 1/23/2
In the second column, we see that we have to pivot again because the bottom
entry is bigger than the second row. (Remember that you don’t have to pivot,
only if the diagonal is the biggest entry.)
0 3/4 3/23/2
Eliminating the second column gives
0 0 9/79/7
The back-substitution gives the same result as above.
(c) For LU decomposition, we just need to know the values we used for the naive
Gauss elimination. For the first elimination we used m21 =4/1 and m31 =1/1.
For the second elimination we used m32 =1/−3. This means that the lower
triangular matrix is
1 0 0
We already know the upper triangular matrix
If you want to be sure that this is correct, just check that
1−1/3 1
0 0 −3
132