Consider the matrix
\overline{A}= \left|\begin{matrix}1 &2 &1 &0 \\ 0& 3& 3& 1 \\ 2& 0& 2& 0 \\ 1 &0 &0 &2 \end{matrix} \right|It is required to convert it into LU form. This is the same matrix of Example A.10.
Add an identity matrix, which will ultimately be converted into a U matrix and the \overline{A} matrix will be converted into an L matrix:
\left|\begin{matrix}1 &2 &1 &0 \\ 0& 3& 3& 1 \\ 2& 0& 2& 0 \\ 1 &0 &0 &2 \end{matrix} \right|\left|\begin{matrix}1 &0 &0 &0 \\ 0& 1& 0& 0 \\ 0& 0& 1& 0 \\ 0 &0 &0 &1 \end{matrix} \right|First step, p = 1:
Table 1 and Table 2
The shaded columns and rows are converted into L and U matrix column and row and the elements of \overline{A} matrix are modified using Equation A.101, that is,
l_{ip} = a_{1}p for ≥ p
u_{pj} = \frac{a_{pj}}{a_{pp}} for j > p (A.101)
a_{ij} = a_{1j} – l_{ip}u_{pj} for i > p, j > p
a_{32} = a_{32} – l_{31}u_{12}
= 0 – (2)(2) = -4
a_{33} = a_{33} – l_{31}u_{31}
= 2 – (2)(1) = 0
Second step, pivot column 2, p = 2:
Table 3 and Table 4
Third step, pivot column 3, p = 3:
Table 5 and Table 6
This is the same result as derived before in Example A.10.
Table 1 | |||
1 | |||
0 | 3 | 3 | 0 |
2 | -4 | 0 | 0 |
1 | -2 | -1 | 2 |
Table 2 | |||
1 | 2 | 1 | 0 |
0 | 1 | 0 | 0 |
0 | 0 | 1 | 0 |
0 | 0 | 1 | 0 |
Table 3 | |||
1 | |||
0 | 3 | 3 | 0 |
2 | -4 | 4 | 1.32 |
1 | -2 | 1 | 2.66 |
Table 4 | |||
1 | 2 | 1 | 0 |
0 | 1 | 1 | 0.33 |
0 | 0 | 1 | 0 |
0 | 0 | 0 | 1 |
Table 5 | |||
1 | 0 | 0 | 0 |
0 | 3 | 0 | 0 |
2 | -4 | 4 | 0 |
1 | -2 | 1 | 2.33 |
Table 6 | |||
1 | 2 | 1 | 0 |
0 | 1 | 1 | 0.33 |
0 | 0 | 1 | 0.33 |
0 | 0 | 0 | 1 |