Professional Documents
Culture Documents
System Linear Equation
System Linear Equation
Hoang Hai Ha
HCMUT-OISP
Email: hoanghaiha@hcmut.edu.vn
a 11 a 12 . . . a 1n
0 a 22 . . . a 2n
A=
.. .. . . . ..
. . .
0 0 . . . a nn
a 11 0 0 0
a 21 a 22 . . . 0
.. .. . . .
. ..
. .
a n1 a n2 . . . a nn
LU FACTORIZATION METHOD
LU FACTORIZATION METHOD
AX = B ⇔ LU x = b
(
LY =B
⇔ .
UX =Y
1 0 0 0
`21 1 ... 0
L=
.. .. ... ..
. . .
`n1 `n2 . . . 1
u 11 u 12 . . . u 1n
0 u 22 . . . u 2n
U =
.. .. . . . ..
. . .
0 0 . . . u nn
u 1 j = a 1 j (1 É j É n)
ai 1
`i 1 = (2 É i É n)
a 11
iP
−1
u ij = a ij − `i k u k j (1 < i É j )
k=1
jP−1
µ ¶
1
`i j = `i k u k j
ai j − (1 < j < i )
ui j k=1
E XAMPLE 2.1
Factorize
matrix
A = LU by Doolittle’s method, where
1 1 −1
31 2
2
4
3
A = 5 3 8
.
2 −2 5
5 3 8
E XAMPLE 2.1
Factorize
matrix
A = LUby Doolittle’s
method, where
1 1 −1
1 0 0
31 22 34 3
A = 5 3 8 . ⇒ L = 5 1 0,
2 −2 5 6
5 3 8 5
l 32 1
E XAMPLE 2.1
Factorize
matrix
A = LUby Doolittle’s
method,
where
1 1 −1 1 1 −1
3 2 4
1 0 0 3 2 4
1 2 3 3
A = 5 3 8 . ⇒ L = 5 1 0, U = 0 u 22 u 23
2 −2 5 6
5 3 8 5
l 32 1 0 0 u 33
u 22 = a 22 − 53 · 12 = 11
30
.
E XAMPLE 2.1
Factorize
matrix
A = LUby Doolittle’s
method,
where
1 1 −1 1 1 −1
3 2 4
1 0 0 3 2 4
1 2 3 3
A = 5 3 8 . ⇒ L = 5 1 0, U = 0 u 22 u 23
2 −2 5 6
5 3 8 5
l 32 1 0 0 u 33
u 22 = a 22 − 53 · 12 = 11
30
.
u 23 = a 23 − 53 · −1
4
= 21
40
.
E XAMPLE 2.1
Factorize
matrix
A = LUby Doolittle’s
method,
where
1 1 −1 1 1 −1
3 2 4
1 0 0 3 2 4
1 2 3 3
A = 5 3 8 . ⇒ L = 5 1 0, U = 0 u 22 u 23
2 −2 5 6
5 3 8 5
l 32 1 0 0 u 33
u 22 = a 22 − 53 · 12 = 11
30
.
u 23 = a 23 − 53 · −1
4
= 2140
.
l 32 = a 32 − u122 65 · 12 =
¡ ¢
E XAMPLE 2.1
Factorize
matrix
A = LUby Doolittle’s
method,
where
1 1 −1 1 1 −1
3 2 4
1 0 0 3 2 4
1 2 3 3
A = 5 3 8 . ⇒ L = 5 1 0, U = 0 u 22 u 23
2 −2 5 6
5 3 8 5
l 32 1 0 0 u 33
u 22 = a 22 − 53 · 12 = 11
30
.
u 23 = a 23 − 53 · −1
4
= 2140
.
l 32 = a 32 − u122 65 · 12 = = −38
¡ ¢
11
.
E XAMPLE 2.1
Factorize
matrix
A = LUby Doolittle’s
method,
where
1 1 −1 1 1 −1
3 2 4
1 0 0 3 2 4
1 2 3 3
A = 5 3 8 . ⇒ L = 5 1 0, U = 0 u 22 u 23
2 −2 5 6
5 3 8 5
l 32 1 0 0 u 33
u 22 = a 22 − 53 · 12 = 11
30
.
u 23 = a 23 − 53 · −1
4
= 2140
.
l 32 = a 32 − u122 65 · 12 = = −38
¡ ¢
11
.
¡ 6 −1 ¢ 241
u 33 = a 33 − 5 · 4 + l 32 u 23 = 88 .
D EFINITION 2.1
Given a square matrix A, then the leading principal
minors D k of A are determinants of submatrices that are
generated from the upper left k × k corner of A.
D EFINITION 2.1
Given a square matrix A, then the leading principal
minors D k of A are determinants of submatrices that are
generated from the upper left k × k corner of A.
E XAMPLE 2.2
a 11 a 12 a 13
Given A = a 21 a 22 a 23 .
a 31 a 32 a 33
¯ ¯
¯a a a ¯
¯
¯a 11 a 12 ¯
¯ ¯ 11 12 13 ¯
Then D 1 = a 11 , D 2 = ¯¯ ¯, D 3 = ¯a 21 a 22 a 23 ¯¯.
¯
a 21 a 22 ¯ ¯ ¯
¯a 31 a 32 a 33 ¯
Hoang Hai Ha (HCMUT) SYSTEM OF LINEAR EQUATIONS September 19, 2022 9 / 48
Method LU factorization
T HE MAIN DIAGONAL OF U
Dk
u kk =
D k−1
where D 1 = a 11 (a 11 6= 0).
E XAMPLE 2.3
Using Doolittle’s method, find matrices L and U in the
factorization of
1 2 3
A = 3 −6 9 .
2 1 4
E XAMPLE 2.4
1.012 −2.132 3.104
Given A = −2.132 4.096 −7.013. Determine
3.104 −7.013 0.014
u 11 + u 22 + u 33 in the factorization A = LU .
D EFINITION 3.1
A square matrix is called symmetric if A = A T .
D EFINITION 3.1
A square matrix is called symmetric if A = A T .
D EFINITION 3.2
A square matrix is called positive definite if all its leading
principal minors are positive.
D EFINITION 3.1
A square matrix is called symmetric if A = A T .
D EFINITION 3.2
A square matrix is called positive definite if all its leading
principal minors are positive.
E XAMPLE 3.1
1 1 −1
Show that the matrix A = 1 2 0 is symmetric and
−1 0 4
positive definite.
F ORMULA OF B
p ai 1
b 11 = a 11 , b i 1 = (2 É i É n),
s b 11
iP
−1
bi i = ai i − b i2k (1 < i É n),
k=1
j −1
µ ¶
1
P
bi j = ai j − bi k b j k (1 < j < i ).
bj j k=1
F ORMULA OF B
p ai 1
b 11 = a 11 , b i 1 = (2 É i É n),
s b 11
iP
−1
bi i = ai i − b i2k (1 < i É n),
k=1
j −1
µ ¶
1
P
bi j = ai j − bi k b j k (1 < j < i ).
bj j k=1
T HE MAIN DIAGONAL OF B
s
Dk
b kk = , k = 1..n
D k−1
where D k are the leading principal minors of A. Note:
D 1 = a 11 .
Hoang Hai Ha (HCMUT) SYSTEM OF LINEAR EQUATIONS September 19, 2022 15 / 48
Cholesky factorization
E XAMPLE 3.2
Factor
by Cholesky’s
method the matrix
1 1 −1
A = 1 2 0 .
−1 0 4
E XAMPLE 3.2
Factor
by Cholesky’s
method the matrix
1 1 −1
A = 1 2 0 .
−1 0 4
E XAMPLE 3.3
4 −3 0
Given A = −3 4 −2 , determine b 11 + b 22 + b 33 in
0 −2 4
Cholesky’s factorization A = B B T .
E XAMPLE 3.4
Determine
all values
of α such that matrix
4 4 α
A = 4 6 2 can be factored by Cholesky.
α 2 7
V ECTOR NORM
V ECTOR NORM
D ISTANCE
Distance between two vectors X and Y is kX − Y k.
Hoang Hai Ha (HCMUT) SYSTEM OF LINEAR EQUATIONS September 19, 2022 18 / 48
Norm of vector and matrix Vector norms
D EFINITION 4.2
1-norm and ∞-norm of a vector X are defined by:
n
P
||X ||1 = |x 1 | + |x 2 | + . . . + |x n | = |x k |.
k=1
D EFINITION 4.2
1-norm and ∞-norm of a vector X are defined by:
n
P
||X ||1 = |x 1 | + |x 2 | + . . . + |x n | = |x k |.
k=1
||X ||∞ = max{|x 1 |, |x 2 |, . . . , |x n |} = max |x k |.
k=1,n
D EFINITION 4.2
1-norm and ∞-norm of a vector X are defined by:
n
P
||X ||1 = |x 1 | + |x 2 | + . . . + |x n | = |x k |.
k=1
||X ||∞ = max{|x 1 |, |x 2 |, . . . , |x n |} = max |x k |.
k=1,n
D EFINITION 4.2
1-norm and ∞-norm of a vector X are defined by:
n
P
||X ||1 = |x 1 | + |x 2 | + . . . + |x n | = |x k |.
k=1
||X ||∞ = max{|x 1 |, |x 2 |, . . . , |x n |} = max |x k |.
k=1,n
E XAMPLE 4.1
Given X = (1, 2, 3, −5)T . Then, ||X ||1 = 1 + 2 + 3 + 5 = 11 and
||X ||∞ = max{1, 2, 3, 5} = 5.
M ATRICES NORM
M ATRICES NORM
M ATRICES NORM
M ATRICES NORM
M ATRICES NORM
T HEOREM 1
If k.k is a vector norm on Rn , then kAk = max kAxk is a
kxk=1
matrix norm.
T HEOREM 1
If k.k is a vector norm on Rn , then kAk = max kAxk is a
kxk=1
matrix norm.
E XAMPLE 4.2
¶ µ
−1 2
Given the matrix A = . Compute kAk∞ .
2 3
SOLUTION. Let x = (x 1 , x 2 )T such that kxk∞ = 1. Then
Ax = (−x 1 + 2x 2 , 2x 1 + 3x 2 )T .
kAxk∞ = max{| − x 1 + 2x 2 |, |2x 1 + 3x 2 |} ≤ 5.
Then kAk∞ = 5.
Hoang Hai Ha (HCMUT) SYSTEM OF LINEAR EQUATIONS September 19, 2022 21 / 48
Norm of vector and matrix Matrices norms
T HEOREM 4.1
1-norm and ∞-norm of a matrix A are computed by:
n
P
||A||1 = max |a i j |− absolute column sum ⇒ find
1É j Én i =1
max.
T HEOREM 4.1
1-norm and ∞-norm of a matrix A are computed by:
n
P
||A||1 = max |a i j |− absolute column sum ⇒ find
1É j Én i =1
max.
n
P
||A||∞ = max |a i j |− absolute row sum ⇒ find max.
1Éi Én j =1
T HEOREM 4.1
1-norm and ∞-norm of a matrix A are computed by:
n
P
||A||1 = max |a i j |− absolute column sum ⇒ find
1É j Én i =1
max.
n
P
||A||∞ = max |a i j |− absolute row sum ⇒ find max.
1Éi Én j =1
E XAMPLE 4.3
2 −1 4
Given A = 5 3 2 . Find 1-norm and ∞-norm of A.
6 −7 3
.
Hoang Hai Ha (HCMUT) SYSTEM OF LINEAR EQUATIONS September 19, 2022 22 / 48
Norm of vector and matrix Conditional number
C ONDITIONAL NUMBER
C ONDITIONAL NUMBER
C ONDITIONAL NUMBER
C ONDITIONAL NUMBER
D EFINITION 4.3
The number k = kAkkA −1 k is called conditional number of
matrix A.
D EFINITION 4.3
The number k = kAkkA −1 k is called conditional number of
matrix A.
E XAMPLE 4.5
µ ¶µ ¶ µ ¶
1 2 x1 3
Let system = . Compute k ∞ (A) and
1 2.01 x 2 3.01
k 1 (A) for this system.
D EFINITION 4.3
The number k = kAkkA −1 k is called conditional number of
matrix A.
E XAMPLE 4.5
µ ¶µ ¶ µ ¶
1 2 x1 3
Let system = . Compute k ∞ (A) and
1 2.01 x 2 3.01
k 1 (A) for this system.
µ ¶
−1 201 −200
Ans: A = ,
−100 100
D EFINITION 4.3
The number k = kAkkA −1 k is called conditional number of
matrix A.
E XAMPLE 4.5
µ ¶µ ¶ µ ¶
1 2 x1 3
Let system = . Compute k ∞ (A) and
1 2.01 x 2 3.01
k 1 (A) for this system.
µ ¶
−1 201 −200
Ans: A = ,
−100 100
k ∞ (A) ≈ 1207.02,
D EFINITION 4.3
The number k = kAkkA −1 k is called conditional number of
matrix A.
E XAMPLE 4.5
µ ¶µ ¶ µ ¶
1 2 x1 3
Let system = . Compute k ∞ (A) and
1 2.01 x 2 3.01
k 1 (A) for this system.
µ ¶
−1 201 −200
Ans: A = ,
−100 100
k ∞ (A) ≈ 1207.02,k 1 (A) = 1207.01.
E XAMPLE 4.6
1/2 1/3 −1/3
Given A = 1/4 3/5 2/3 . Compute k ∞ (A) and k 1 (A).
3/4 2/5 −3/7
Round the result to 4 decimal places.
E XAMPLE 4.6
1/2 1/3 −1/3
Given A = 1/4 3/5 2/3 . Compute k ∞ (A) and k 1 (A).
3/4 2/5 −3/7
Round the result to 4 decimal places.
−55 1 133
6 6 18
A −1 = 85
8
5
8
−175
24
−49 7 91
8 8 24
E XAMPLE 4.6
1/2 1/3 −1/3
Given A = 1/4 3/5 2/3 . Compute k ∞ (A) and k 1 (A).
3/4 2/5 −3/7
Round the result to 4 decimal places.
−55 1 133
6 6 18
A −1 = 85 5 −175
8 8 24
−49 7 91
8 8 24
kAk∞ = 140 , kA k∞ = 445
221 −1
24
⇒ k ∞ ≈ 29.2694(Round up)
E XAMPLE 4.6
1/2 1/3 −1/3
Given A = 1/4 3/5 2/3 . Compute k ∞ (A) and k 1 (A).
3/4 2/5 −3/7
Round the result to 4 decimal places.
−55 1 133
6 6 18
A −1 = 85 5 −175
8 8 24
−49 7 91
8 8 24
kAk∞ = 140 , kA k∞ = 445
221 −1
24
⇒ k ∞ ≈ 29.2694(Round up)
kAk1 = 32 , kA −1 k1 = 311
12
⇒ k 1 = 38.875
D EFINITION 5.1
Consider a sequence of vectors (X (m) )∞
m=0 where X
(m)
∈ Rn .
We say that (X (m) )∞
m=0 converges to a vector X when
m → ∞ if and only if
I TERATIVE METHOD
X (m) = T X (m−1) +C .
D EFINITION 5.2
The n × n matrix is called strictly diagonally dominant
matrix(SDD for short) when
n
X
|a i i | > |a i j |.
j =1
j 6=i
D EFINITION 5.2
The n × n matrix is called strictly diagonally dominant
matrix(SDD for short) when
n
X
|a i i | > |a i j |.
j =1
j 6=i
E XAMPLE 5.1
7 2 0 6 4 −3
Consider 2 matrices 3 5 −1 and 4 −2 6 .
0 5 6 −3 0 1
Which one is SDD?
Hoang Hai Ha (HCMUT) SYSTEM OF LINEAR EQUATIONS September 19, 2022 29 / 48
Iterative methods Basic concepts
T HEOREM 5.1
If matrix A is strictly diagonally dominant, then the
sequence generated by the formula X (m) = T X (m−1) +C
converges to the exact solution X of system AX = B .
T HEOREM 5.1
If matrix A is strictly diagonally dominant, then the
sequence generated by the formula X (m) = T X (m−1) +C
converges to the exact solution X of system AX = B .
Since A = D − L −U ,
Since A = D − L −U ,AX = B ⇔ (D − L −U )X = B
Since A = D − L −U ,AX = B ⇔ (D − L −U )X = B
⇔ (D)X = (L +U )X + B
⇔ X = D −1 (L +U )X + D −1 B.
We denote T = D −1 (L +U ) and C = D −1 B , then the
iterative formula is
X (m) = T X (m−1) +C , m = 1, 2, . . . .
E XAMPLE 5.2
½
6.3x 1 + 2.1x 2 = 8
Given system and initial vector
1.2x 1 + 4.5x 2 = 9
µ ¶
(0) 0.5
X = . Using Jacobi’s method to determine
1.6
approximate solution X (3) . Estimate its posteriori error
with 1-norm.
µ ¶ µ ¶
0 −1/3 80/63
T= ,C = .
−4/15 0 2
µ ¶
(1) 0.73651
X = ,
1.86667
µ ¶ µ ¶
0 −1/3 80/63
T= ,C = .
−4/15 0 2
µ ¶ µ ¶
(1) 0.73651 (2) 0.64762
X = ,X = ,
1.86667 1.80360
µ ¶ µ ¶
0 −1/3 80/63
T= ,C = .
−4/15 0 2
µ ¶ µ ¶ µ ¶
(1) 0.73651 (2) 0.64762 (3) 0.66864
X = ,X = ,X =
1.86667 1.80360 1.82730
µ ¶ µ ¶
0 −1/3 80/63
T= ,C = .
−4/15 0 2
µ ¶ µ ¶ µ ¶
(1) 0.73651 (2) 0.64762 (3) 0.66864
X = ,X = ,X =
1.86667 1.80360 1.82730
kT k1 = 1/3, kX − X k1 ≈ 0.04472, then ∆ X (3) ≈ 0.0224.
(3) (2)
E XAMPLE 5.3
Given the system
4x 1 + 0.24x 2 − 0.08x 3 = 8
0.09x 1 + 3x 2 − 0.15x 3 = 9
0.04x − 0.08x + 4x = 20
1 2 3
2
(0)
With X = 3. Using Jacobi’s method, find the
5
approximate solution X (3) and its priori error with
∞-norm.
Matrix A is SDD?
Matrix A is
SDD?
0 −0.06 0.02
Matrix T = −0.03 0 0.05 ,
−0.01 0.02 0
Matrix A is
SDD?
0 −0.06 0.02 2
Matrix T = −0.03 0 0.05 , C = 3
−0.01 0.02 0 5
Matrix A is
SDD?
0 −0.06 0.02 2
Matrix T = −0.03 0 0.05 , C = 3
−0.01 0.02 0 5
X (1) = T X (0) +C ,
Matrix A is
SDD?
0 −0.06 0.02 2
Matrix T = −0.03 0 0.05 , C = 3
−0.01 0.02 0 5
1.92
(1) (0) (1)
X = T X +C , ⇒ X = 3.19
5.04
Matrix A is
SDD?
0 −0.06 0.02 2
Matrix T = −0.03 0 0.05 , C = 3
−0.01 0.02 0 5
1.92
(1) (0) (1)
X = T X +C , ⇒ X = 3.19
5.04
X (2) = T X (1) +C ,
Matrix A is
SDD?
0 −0.06 0.02 2
Matrix T = −0.03 0 0.05 , C = 3
−0.01 0.02 0 5
1.92
(1) (0) (1)
X = T X +C , ⇒ X = 3.19
5.04
1.9094
X (2) = T X (1) +C , ⇒ X (2) = 3.1944
5.0446
Matrix A is
SDD?
0 −0.06 0.02 2
Matrix T = −0.03 0 0.05 , C = 3
−0.01 0.02 0 5
1.92
(1) (0) (1)
X = T X +C , ⇒ X = 3.19
5.04
1.9094
X (2) = T X (1) +C , ⇒ X (2) = 3.1944
5.0446
X (3) = T X (2) +C ,
Matrix A is
SDD?
0 −0.06 0.02 2
Matrix T = −0.03 0 0.05 , C = 3
−0.01 0.02 0 5
1.92
(1) (0) (1)
X = T X +C , ⇒ X = 3.19
5.04
1.9094
X (2) = T X (1) +C , ⇒ X (2) = 3.1944
5.0446
1.909228
(3) (2) (3)
X = T X +C , ⇒ X = 3.194948
5.044794
Hoang Hai Ha (HCMUT) SYSTEM OF LINEAR EQUATIONS September 19, 2022 37 / 48
Iterative methods Jacobi’s method
E STIMATE OF ERROR
E STIMATE OF ERROR
0 −0.06 0.02 1.92 2
(1) (0)
T = −0.03 0 0.05, X = 3.19, X = 3.
−0.01 0.02 0 5.04 5
E STIMATE OF ERROR
0 −0.06 0.02 1.92 2
(1) (0)
T = −0.03 0 0.05, X = 3.19, X = 3.
−0.01 0.02 0 5.04 5
We need to find ∆ X (3) (A priori) with ∞ norm.
E STIMATE OF ERROR
0 −0.06 0.02 1.92 2
(1) (0)
T = −0.03 0 0.05, X = 3.19, X = 3.
−0.01 0.02 0 5.04 5
We need to find ∆ X (3) (A priori) with ∞ norm.
kT k∞ = 0.08
E STIMATE OF ERROR
0 −0.06 0.02 1.92 2
(1) (0)
T = −0.03 0 0.05, X = 3.19, X = 3.
−0.01 0.02 0 5.04 5
We need to find ∆ X (3) (A priori) with ∞ norm.
kT k∞ = 0.08= q.
E STIMATE OF ERROR
0 −0.06 0.02 1.92 2
(1) (0)
T = −0.03 0 0.05, X = 3.19, X = 3.
−0.01 0.02 0 5.04 5
We need to find ∆ X (3) (A priori) with ∞ norm.
kT k∞ = 0.08= q.
q3
∆ X (3) = kX (1) − X (0) k∞ ,
1−q
E STIMATE OF ERROR
0 −0.06 0.02 1.92 2
(1) (0)
T = −0.03 0 0.05, X = 3.19, X = 3.
−0.01 0.02 0 5.04 5
We need to find ∆ X (3) (A priori) with ∞ norm.
kT k∞ = 0.08= q.
−0.08
q3
∆ X (3) = kX (1) − X (0) k∞ , X (1) − X (0) = 0.19
1−q
0.04
E STIMATE OF ERROR
0 −0.06 0.02 1.92 2
(1) (0)
T = −0.03 0 0.05, X = 3.19, X = 3.
−0.01 0.02 0 5.04 5
We need to find ∆ X (3) (A priori) with ∞ norm.
kT k∞ = 0.08= q.
−0.08
q3
∆ X (3) = kX (1) − X (0) k∞ , X (1) − X (0) = 0.19
1−q
0.04
⇒ kX (1) − X (0) k∞ = 0.19
E STIMATE OF ERROR
0 −0.06 0.02 1.92 2
(1) (0)
T = −0.03 0 0.05, X = 3.19, X = 3.
−0.01 0.02 0 5.04 5
We need to find ∆ X (3) (A priori) with ∞ norm.
kT k∞ = 0.08= q.
−0.08
q3
∆ X (3) = kX (1) − X (0) k∞ , X (1) − X (0) = 0.19
1−q
0.04
⇒ kX (1) − X (0) k∞ = 0.19 ⇒ ∆ X (3) ≈ 0.0002.
E XAMPLE 5.4
½ µ ¶
5.4x 1 + 0.05x 2 = 1.2 (0) 1
Given system With X = .
0.08x 1 + 4x 2 = 2.4 2
Using Jacobi’s method, find approximate solution X (3) and
posteriori error of X (3) with 1-norm.
E XAMPLE 5.4
½ µ ¶
5.4x 1 + 0.05x 2 = 1.2 (0) 1
Given system With X = .
0.08x 1 + 4x 2 = 2.4 2
Using Jacobi’s method, find approximate solution X (3) and
posteriori error of X (3) with 1-norm.
Answer
X (3) ≈ (0.2167, 0.5957)T .
∆ X (3) ≈ 8.376025307241412 · 10−6 .
E XAMPLE 5.5
½ µ ¶
15x 1 − 2x 2 = 6 0.9
Given the system with X (0) = .
3x 1 + 11x 2 = 7 0.8
E XAMPLE 5.5
½ µ ¶
15x 1 − 2x 2 = 6 0.9
Given the system with X (0) = .
3x 1 + 11x 2 = 7 0.8
80
µ ¶
171 0.4678
Exact solution X = 29 ≈ .
0.5088
57
µ ¶
0.50667
The solutions by Jacobi’s method: X (1) = ,
0.39090
µ ¶ µ ¶
0.45212 0.46642
X (2) = , X (3) = .
0.49818 0.51306
Hoang Hai Ha (HCMUT) SYSTEM OF LINEAR EQUATIONS September 19, 2022 40 / 48
Iterative methods Gauss-Seidel’s method
E XAMPLE 5.6
½ µ ¶
15x 1 − 2x 2 = 6 (0) 1.5
Given the system . With X = ,
3x 1 + 11x 2 = 7 1
find the approximate solution X (2) by using the G-S
method.
S OLUTION
6 + 2x 2(m−1)
x1(m)
=
15(m) ⇒
(m) 7 − 3x 1
x
=
2
11
E XAMPLE 5.6
½ µ ¶
15x 1 − 2x 2 = 6 (0) 1.5
Given the system . With X = ,
3x 1 + 11x 2 = 7 1
find the approximate solution X (2) by using the G-S
method.
S OLUTION
6 + 2x 2(m−1)
x1(m)
= µ
0.53333
¶
15(m) (1)
⇒X = ,
(m) 7 − 3x 1 0.49091
x
=
2
11
E XAMPLE 5.6
½ µ ¶
15x 1 − 2x 2 = 6 (0) 1.5
Given the system . With X = ,
3x 1 + 11x 2 = 7 1
find the approximate solution X (2) by using the G-S
method.
S OLUTION
6 + 2x 2(m−1)
x1 (m)
= µ
0.53333
¶
15(m) (1)
⇒X = ,
(m) 7 − 3x 1 0.49091
x
=
2
µ ¶11
0.46545
X (2) = .
0.50942
MATRIX FORM
MATRIX FORM
MATRIX FORM
MATRIX FORM
E XAMPLE 5.7
½
15x 1 − 6x 2 = 5
Given the system with
−5x 1 + 8x 2 = 5
X (0) = [0.3, 0.2]T , compute approximate solution X (3) by
Gauss-Seidel and its priori error with ∞-norm.
E XAMPLE 5.7
½
15x 1 − 6x 2 = 5
Given the system with
−5x 1 + 8x 2 = 5
X (0) = [0.3, 0.2]T , compute approximate solution X (3) by
Gauss-Seidel and its priori error with ∞-norm.
S OLUTION
E XAMPLE 5.7
½
15x 1 − 6x 2 = 5
Given the system with
−5x 1 + 8x 2 = 5
X (0) = [0.3, 0.2]T , compute approximate solution X (3) by
Gauss-Seidel and its priori error with ∞-norm.
S OLUTION
µ ¶ µ ¶ µ ¶
0.413333 0.686667 0.755
1 X (1) = , X (2) = , X (3) =
0.883333 1.054167 1.096875
S OLUTION
µ ¶
0 0.4
2 T= , ⇒ kT k∞ = 0.4 = q
0 0.25
q3
3 ∆ X (3) ≤ kX (1) − X (0) k∞
1−q
µ ¶
(1) (0) 0.113333
4
X −X = ⇒ kX (1) − X (0) k∞ = 0.683333
0.683333,
S OLUTION
µ ¶
0 0.4
2 T= , ⇒ kT k∞ = 0.4 = q
0 0.25
q3
3 ∆ X (3) ≤ kX (1) − X (0) k∞
1−q
µ ¶
(1) (0) 0.113333
4
X −X = ⇒ kX (1) − X (0) k∞ = 0.683333
0.683333,
5
∆ X (3) ≈ 0.072889
E XAMPLE 5.8
Given the system
4x 1 + 0.24x 2 − 0.08x 3 = 8
0.09x 1 + 3x 2 − 0.15x 3 = 9
0.04x − 0.08x + 4x = 20
1 2 3
2
(0)
With X = 3, using G-S method to find approx solution
5
(3)
X , its posteriori error with 1-norm.
S OLUTION
1.9092
(3)
X = 3.1950
5.0448
S OLUTION
1.9092
(3)
X = 3.1950
5.0448
Error : ∆ X (3) ≈ 1.24 × 10−5
E XAMPLE 5.9
Given the system
½
4x 1 + 0.24x 2 = 8
0.09x 1 + 3x 2 = 9
µ ¶
(0) 1
With X = , find approximate solution x n such that
2
kx n − x n−1 k∞ < 10−3 by using G-S method.