86 2
2 2
1
2 1
1
n n
n n
i
n i
− =
− =
∑
− =
Back substitution is the same as for Gauss elimination: n
2
2 – n2 subtractions and n
2
2 + n2 multiplicationsdivisions. The entire number of flops can be summarized as
MultDiv AddSubtr
Total Forward elimination
3 3
3
n n −
6 2
3
2 3
n n
n +
− 6
2 3
2
2 3
n n
n −
−
Forward substitution
2 2
2
n n −
2 2
2
n n −
n n
−
2
Back substitution
2 2
2
n n +
2 2
2
n n −
2
n
Total
3 3
2 3
n n
n −
+ 6
5 2
3
2 3
n n
n −
+ 6
7 2
3 3
2
2 3
n n
n −
+ The total number of flops is identical to that obtained with standard Gauss elimination.
9.2 Equation 9.6 is
{ }
} {
} ]{
[ }
{ }
]{ [
] [
b x
A d
x U
L −
= −
9.6 Matrix multiplication is distributive, so the left-hand side can be rewritten as
} {
} ]{
[ }
]{ [
} ]{
][ [
b x
A d
L x
U L
− =
− Equating the terms that are multiplied by {x} yields,
} ]{
[ }
]{ ][
[ x
A x
U L
= and, therefore, Eq. 9.7 follows
] [
] ][
[ A
U L
= 9.7
Equating the constant terms yields Eq. 9.8 }
{ }
]{ [
b d
L =
9.8
9.3 The matrix to be evaluated is
⎥ ⎥
⎦ ⎤
⎢ ⎢
⎣ ⎡
− −
− 5
1 1
2 6
3 1
2 10
Multiply the first row by f
21
= –310 = –0.3 and subtract the result from the second row to eliminate the a
21
term. Then, multiply the first row by f
31
= 110 = 0.1 and subtract the result from the third row to eliminate the a
31
term. The result is
87 ⎥
⎥ ⎦
⎤ ⎢
⎢ ⎣
⎡ −
− 1
. 5
8 .
7 .
1 4
. 5
1 2
10 Multiply the second row by f
32
= 0.8–5.4 = –0.148148 and subtract the result from the third row to eliminate the a
32
term.
⎥ ⎥
⎦ ⎤
⎢ ⎢
⎣ ⎡
− −
351852 .
5 7
. 1
4 .
5 1
2 10
Therefore, the LU decomposition is
⎥ ⎥
⎦ ⎤
⎢ ⎢
⎣ ⎡
− −
⎥ ⎥
⎦ ⎤
⎢ ⎢
⎣ ⎡
− −
= 351852
. 5
7 .
1 4
. 5
1 2
10 1
148148 .
1 .
1 3
. 1
] ]{
[ U
L Multiplying [L] and [U] yields the original matrix as verified by the following MATLAB
session, L = [1 0 0;-0.3 1 0;0.1 -0.148148 1];
U = [10 2 -1;0 -5.4 1.7;0 0 5.351852]; A = LU
A = 10.0000 2.0000 -1.0000
-3.0000 -6.0000 2.0000 1.0000 1.0000 5.0000
9.4 The LU decomposition can be computed as
⎥ ⎥
⎦ ⎤
⎢ ⎢
⎣ ⎡
− −
⎥ ⎥
⎦ ⎤
⎢ ⎢
⎣ ⎡
− −
= 351852
. 5
7 .
1 4
. 5
1 2
10 1
148148 .
1 .
1 3
. 1
] ]{
[ U
L Forward substitution:
⎪⎭ ⎪
⎬ ⎫
⎪⎩ ⎪
⎨ ⎧
− −
⎥ ⎥
⎦ ⎤
⎢ ⎢
⎣ ⎡
− −
= 5
. 21
5 .
61 27
1 148148
. 1
. 1
3 .
1 }
{d 27
1
= d
4 .
53 27
3 .
5 .
61
2
− =
+ −
= d
11111 .
32 4
. 53
148148 .
27 1
. 5
. 21
3
− =
− −
− −
− =
d Back substitution:
88 ⎪⎭
⎪ ⎬
⎫ ⎪⎩
⎪ ⎨
⎧ −
− =
⎪⎭ ⎪
⎬ ⎫
⎪⎩ ⎪
⎨ ⎧
⎥ ⎥
⎦ ⎤
⎢ ⎢
⎣ ⎡
− −
= 11111
. 32
5 .
53 27
351852 .
5 7
. 1
4 .
5 1
2 10
} {
3 2
1
x x
x x
6 351852
. 5
11111 .
32
3
− =
− =
x
8 4
. 5
6 7
. 1
4 .
53
2
= −
− −
− =
x
5 .
10 6
1 8
2 27
1
= −
− −
− =
x For the alternative right-hand-side vector, forward substitution is implemented as
⎪⎭ ⎪
⎬ ⎫
⎪⎩ ⎪
⎨ ⎧
− ⎥
⎥ ⎦
⎤ ⎢
⎢ ⎣
⎡ −
− =
6 18
12 1
148148 .
1 .
1 3
. 1
} {d
12
1
= d
6 .
21 12
3 .
18
2
= +
= d
4 18
148148 .
12 1
. 6
3
− =
− −
− −
= d
Back substitution:
⎪⎭ ⎪
⎬ ⎫
⎪⎩ ⎪
⎨ ⎧
− ⎥
⎥ ⎦
⎤ ⎢
⎢ ⎣
⎡ −
− =
4 6
. 21
12 351852
. 5
7 .
1 4
. 5
1 2
10 }
{x
747405 .
351852 .
5 4
3
− =
− =
x
235294 .
4 4
. 5
747405 .
7 .
1 6
. 21
2
− =
− −
− =
x
972318 .
1 10
747405 .
1 235294
. 4
2 12
1
= −
− −
− −
= x
9.5 The system can be written in matrix form as