Professional Documents
Culture Documents
Lec#10 Crouts and Dolittle
Lec#10 Crouts and Dolittle
Lec#10 Crouts and Dolittle
𝑨𝑿 = 𝑩
For Example:
𝟏𝟎𝒙𝟏 + 𝟑𝒙𝟐 + 𝟏𝒙𝟑 = 𝟏𝟗
𝟑𝒙𝟏 + 𝟏𝟎𝒙𝟐 + 𝟐𝒙𝟑 = 𝟐𝟗
𝟏𝒙𝟏 + 𝟐𝒙𝟐 + 𝟏𝟎𝒙𝟑 = 𝟑𝟓
𝟏𝟎 𝟑 𝟏 𝒙𝟏 𝟏𝟗
𝑨=[𝟑 𝟏𝟎 𝟐 ] , 𝑿 = [𝒙𝟐 ] , 𝑩 = [𝟐𝟗]
𝟏 𝟐 𝟏𝟎 𝒙𝟑 𝟑𝟓
Direct Methods for Linear systems
3. LU Decomposition:
Decompose / factorize the coefficient matrix A into a lower triangular matrix L
and upper triangular matrix U.
𝐴𝑋 = 𝐵 … (1)
Take 𝐴 = 𝐿𝑈
Put 𝐴 in (1)
⟹ 𝐿𝑈𝑋 = 𝐵
Take 𝑈𝑋 = 𝑌
⟹ 𝐿𝑌 = 𝐵
• Dolittle’s Method
• Crout’s Method
• Cholesky Method
1. Dolittle’s Method:
Consider a general 3 x 3 coefficient matrix
𝑎11 𝑎12 𝑎13 𝑙11 0 0 𝑢11 𝑢12 𝑢13
[𝑎21 𝑎22 𝑎23 ] = [𝑙21 𝑙22 0 ][ 0 𝑢22 𝑢23 ]
𝑎31 𝑎32 𝑎33 𝑙31 𝑙32 𝑙33 0 0 𝑢33
Set 𝑙𝑖𝑖 = 1
𝑎11 𝑎12 𝑎13 1 0 0 𝑢11 𝑢12 𝑢13
[𝑎21 𝑎22 𝑎23 ] = [𝑙21 1 0] [ 0 𝑢22 𝑢23 ]
𝑎31 𝑎32 𝑎33 𝑙31 𝑙32 1 0 0 𝑢33
2 4 −6 𝑥1 −4
𝐴 = [1 5 3 ] , 𝑋 = [𝑥2 ] , 𝐵 = [ 10 ]
1 3 2 𝑥3 5
From Column 2:
𝑎32 − 𝑙31 𝑢12 1
𝒍𝟑𝟐 = =
𝑢22 3
From Row 3:
𝒖𝟑𝟑 = 𝑎32 − 𝑙31 𝑢13 − 𝑙32 𝑢23 = 3
𝑨 = 𝑳𝑼
𝟐 𝟒 −𝟔 𝟏 𝟎 𝟎 𝟐 𝟒 −𝟔
[𝟏 𝟓 𝟑 ] = [𝟏/𝟐 𝟏 𝟎] [𝟎 𝟑 𝟔]
𝟏 𝟑 𝟐 𝟏/𝟐 𝟏/𝟑 𝟏 𝟎 𝟎 𝟑
Step 2: Solving 𝐿𝑌 = 𝐵
1 0 0 𝑦1 −4
[1/2 1 0] [𝑦2 ] = [ 10 ]
1/2 1/3 1 𝑦3 5
𝑦1 + 3𝑥2 − 1𝑥3 = −4
1
𝑦 + 𝑦2 + 0.5𝑥3 = +10
2 1
1 1
𝑦1 + 𝑦2 + 𝑦3 = 5
2 3
By applying forward substitution
10 − 0.5(−4)
⟹ 𝑦1 = −4 , 𝑦2 = = 12
1
1
5 − 0.5(−4) − ( )(12)
⟹ 𝑦3 = 3 =3
1
𝑦1 −4
[𝑦2 ] = [ 12 ]
𝑦3 3
2 4 −6 𝑥1 −4
[0 3 6 ] [𝑥2 ] = [ 12 ]
0 0 3 𝑥3 3
2𝑥1 + 4𝑥2 − 6𝑥3 = −4
3𝑥2 + 6𝑥3 = 12
3𝑥3 = 3
By applying back substitution
12 − 6(1)
⟹ 𝑥3 = 1 , 𝑥2 = =2
3
−4 + 6(1) − 4(2)
⟹ 𝑥1 = = −3
2
So, Solution of given system of linear equations is:
𝑥1 −3
[𝑥2 ] = [ 2 ]
𝑥3 1
2. Crout’s Method:
Consider a general 3 x 3 coefficient matrix
𝑎11 𝑎12 𝑎13 𝑙11 0 0 𝑢11 𝑢12 𝑢13
[𝑎21 𝑎22 𝑎23 ] = [𝑙21 𝑙22 0 ][ 0 𝑢22 𝑢23 ]
𝑎31 𝑎32 𝑎33 𝑙31 𝑙32 𝑙33 0 0 𝑢33
Set 𝑢𝑖𝑖 = 1
2 4 −6 𝑥1 −4
𝐴 = [1 5 3 ] , 𝑋 = [𝑥2 ] , 𝐵 = [ 10 ]
1 3 2 𝑥3 5
From Row 2:
𝑎23 − 𝑙21 𝑢13
𝒖𝟐𝟑 = =2
𝑙22
From Column 3:
𝒍𝟑𝟑 = 𝑎33 − 𝑙31 𝑢13 + 𝑙32 𝑢23 = 3
𝑨 = 𝑳𝑼
𝟐 𝟒 −𝟔 𝟐 𝟎 𝟎 𝟏 𝟐 −𝟑
[𝟏 𝟓 𝟑 ] = [𝟏 𝟑 𝟎] [𝟎 𝟏 𝟐]
𝟏 𝟑 𝟐 𝟏 𝟏 𝟑 𝟎 𝟎 𝟏
Step 2: Solving 𝐿𝑌 = 𝐵
2 0 0 𝑦1 −4
[1 3 0] [𝑦2 ] = [ 10 ]
1 1 3 𝑦3 5
1 2 −3 𝑥1 −2
[0 1 2 ] [𝑥2 ] = [ 4 ]
0 0 1 𝑥3 1
𝑥1 + 2𝑥2 − 3𝑥3 = −2
𝑥2 + 2𝑥3 = 4
𝑥3 = 1
By applying back substitution
4 − 2(1)
⟹ 𝑥3 = 1 , 𝑥2 = =2
1
−2 + 3(1) − 2(2)
⟹ 𝑥1 = = −3
1
So, Solution of given system of linear equations is:
𝑥1 −3
[𝑥2 ] = [ 2 ]
𝑥3 1
Computational Cost:
• Computational cost of Gauss-Elimination Method is 𝑂(𝑛3 ). Since it must
2𝑛3
perform steps to solve 𝑛𝑥𝑛 system.
3