A A A A A A: Solution of Linear System
A A A A A A: Solution of Linear System
a n1 x1 a n 2 x 2 a nn x n bn
(En)
where aij , bi .
Exactly one of the following three cases must occur:
(a) The system has a unique solution.
(b) The system has no solution.
(c) The system has an infinite number of solutions
A=
(2)
. . .
aij
X x1 x 2 . . .
xn T
B b1 b2
bn T
. . .
Gaussian Elimination
The process which eliminates an unknown from succeeding equations using elementary operations
is known as Gaussian elimination.
The equation which is used to eliminate an unknown from the succeeding equations is known as the
pivotal equation. The coefficient of the eliminated variable in a pivotal equation is known as the
pivot. If the pivot is zero, it cannot be used to eliminate the variable from the other equations.
However, we can continue the elimination process by interchanging the equation with a nonzero
pivot.
Solution of a Linear System
A systematic procedure for solving a linear system is to reduce a system that is easier to solve. One
such system is the echelon form. The back substitution is then used to solve the system in reverse
order.
A system is in echelon form or upper triangular form if
(i) all equations containing nonzero terms are above any equation with zeros only.
(ii) the first nonzero term in every equation occurs to the right of the first nonzero term term
in the equation above it.
Example: Solve the following linear system by the Gaussian elimination with partial pivoting,
giving your answers to 3 decimal places.
5 x 12 y 9 z 5,
Operation
x
5
8
16
1
1
1
Eq3/16
Eq1/5
Eq2/8
Eq5Eq4
Eq6Eq4
Eq7/2.0875
Eq8/1.0625
Eq10Eq9
8 x 11 y 20 z 35, 16 x 5 y 7 z 29
Coefficient of
R. H. S.
y
z
12
9
5
11
20
35
5
7
29
0.3125 0.4375 1.8125
2.4000 1.8000 1.0000
1.3750 2.5000 4.3750
2.0875 1.3625 0.8125
1.0625 2.0625
2.5625
1
0.6527 0.3892
1
1.9412
2.4118
1.2885
2.8010
Eq. #
Eq1
Eq2
Eq3
Eq4*
Eq5
Eq6
Eq7
Eq8
Eq9*
Eq10
Eq11*
Check
Sum
31
74
57
3.5625
6.2000
9.2500
2.6375
5.6875
1.2635
5.3530
4.0895
Eq2/20
Eq3/7
Eq1/9
Eq5Eq4
Eq6Eq4
Eq7/1.8857
Eq8/0.1556
Eq10Eq9
Coefficient of
x
y
5
12
8
11
16
5
0.4000 0.5500
2.2857 0.7143
0.5556 1.3333
1.8857
0.1643
0.1556
0.7833
1
0.0871
1
5.0341
0
4.9470
z
9
20
7
1
1
1
0
0
0
0
0
R. H. S.
Eq. #
5
35
29
1.7500
4.1429
0.5556
2.3929
1.1944
1.2690
7.6761
8.9451
Eq1
Eq2
Eq3
Eq4*
Eq5
Eq6
Eq7
Eq8
Eq9*
Eq10
Eq11*
Check
Sum
31
74
57
3.7000
8.1429
3.4445
4.4429
0.2555
2.3561
1.6420
3.9981
8.9451
1.8082
4.9470
x 1.2690 0.0871 ( 1.8082) 1.4265
z 1.75 0.4 1.4265 0.55 ( 1.8042) 2.1739
Solutions of the system are summarized below for comparison.
y
x
y
z
using
Mathematica
1.4265
1.8081
2.1739
With
Partial Pivoting
1.4264
1.8080
2.1738
with
Total Pivoting
1.4265
1.8082
2.1739
11 1
112 2 0 2 2
0 4 2 0 4 0 10 1
2
6 3 1 6 0 4 100
001 2 1 1
010 0 4 0
103 0 0 4
001 2 1 1
020 0 2 0
103 0 0 4
and so on.
1 2 3
1 0 2
form.
Example:
Given that
1 2 3
A = 3 4 11 ,
5 14 12
5
B = 21 ,
15
x
X=
y
z
(i) Determine a lower triangular matrix L and an upper triangular matrix U such that L U = A.
(ii) Use the above factorization to solve the equation A X = B.
Solution:
(i)
1 2 3
A = 3 4 11 = L U =
5 14 12
Let
a 00 1 ml
cb 0 10 n
fed 100
a al am
= b bl c
bm cn
d d l e d m en f
1 0
L = 3 2
5 4
0
1
1 2 3
U = 0 1 1
0 0 1
UX = Y
and
Y=
y1
y2
y
3
or
1 0
3 2
5 4
0
1
y1
y2
y3
=
21
15
or
1 2 3 x
0 1 1 y
0 0 1 z
5
= 3
2
y 1,
z2
and hence
1
X = 1
2
3.5.1. Cholesky Method (Square Root Method)
8
Positive Definite
A symmetric matrix A is positive definite if X * AX 0, X 0 . Here X * X T and X is the
complex conjugate of X.
2 1
A
1 2
1 2
B
2 1
is not.
A 1 L LT
1 LT 1 L1 L1 T L1
Recall that inverse of a lower triangular matrix is also a lower triangular matrix. This property may
be used to find L1 .
For a third order lower triangular matrix L, we may write the relation LL1 I as
a1 00 b1 0 1 0
21 aa 2 0 21 bb 2 0 0 1 0
aaa b bb 0 1
1 2 3 1 2 3
derive a new sequence of approximations. Repeat the calculations till the required accuracy is
obtained.
An iterative method converges, for any choice of the first approximation, if every equation satisfies
the condition that the magnitude of the coefficient of solving variable is greater than the sum of the
absolute values of the coefficients of the other variables. A system satisfying this condition is called
diagonally dominant. A linear system can always be reduced to diagonally dominant form by
elementary operations.
12 2 5
5 4 11
10 7 12
we have
12 x 2 y 5 z 20
3 x 7 y z 19
4 x 5 y 11z 8
12 2 5
7 3 1
11 4 5
y n 1 1 19 3 x n z n
7
z n 1 1 8 4 x n 5 y n
11
y1 1 [19 0 0] 2.71
7
z1 1 [8 0 0] 0.73
11
Second approximation is
x 2 1 [ 20 2( 2.71) 5(0.73)] 1.81
12
y 2 1 [19 3(1.67) 0.73] 2.10
7
z 2 1 [8 4(1.67) 5( 2.71)] 1.11
11
xn
yn
zn
0
0
0
1. 67
2.71
0.73
2.48
1.78
0.89
2.33
1.52
0.98
10
2.29
1.62
0.84
10
11
2.29
1.61
0.84
2.29
1.61
0.84
y n 1 1 19 3 x n 1 z n
7
z n 1 1 8 4 x n 1 5 y n 1
11
12
y1 1 [19 3(1.67) 0] 2.00
7
z1 1 [8 4(1.67) 5( 2)] 0.79
11
Second approximation:
x 2 1 [ 20 2( 2.00) 5( 0.79)] 2.33
12
y 2 1 [19 3(2.33) 0.79] 1.60
7
z 2 1 [8 4( 2.33) 5(1.60] 0.89
11
Third approximation:
x3 1 [ 20 2(1.60) 5( 0.85)] 2.29
12
Fourth approximation:
x 4 1 [20 2(1.61) 5(0.84)] 2.29
12
z4
7
1 [8
11
11