1 SYSTEMS OF LINEAR EQUATIONS
Introduction
Elimination Methods
Decomposition Methods
Matrix Inverse and Determinant
Errors, Residuals and Condition Number
Iteration Methods
Incomplete and Redundant Systems
Chapter 1 Systems of Linear Equations / 2
1.1 Introduction
• The system of linear equations is formed by the addition of the products of a variable with a coefficient, which is also a constant.
• The system of linear equation can be solved via matrix approach.
• The general form of a set of a linear equation having n linear equations and n unknowns is
nnnnnn
nn
nn
bxaxaxa
bxaxaxabxaxaxa
=+++
=+++=+++
L
MMOMM
L
L
2211
22222121
11212111
(1.1)
where are variables or unknowns, anxxx ,,, 21 K ij and bj are coefficient or constant (real or complex).
• Eq. (1.1) can be written in a more compact form:
bxA =⋅=⋅ }{}{][ ijij bxa (1.2)
where A is a matrix [aij] of size n×n, x is a variable vector {xj} and b is a right-hand side vector {bj}.
• The process of solving Eq. (1.2) yield three possible solutions:
1. Unique solution — e.g.:
41
2121
21
1313
===+=+
xxxxxx
2. No solution — e.g.:
11
21
21
=−=+−
xxxx
3. Infinite solutions — e.g.:
2221
21
21
=+=+
xxxx
Chapter 1 Systems of Linear Equations / 3
1.2 Elimination Methods
• The most popular method is the Gauss elimination method, which comprises of two steps:
1. Forward elimination to form an upper triangular system via row-based transformation process,
2. Back substitution to produce the solution of xj.
• Consider the following system:
nnnnnn
nn
nn
bxaxaxa
bxaxaxabxaxaxa
=+++
=+++=+++
L
MMOMM
L
L
2211
22222121
11212111
If , for i = 2,3,…,n, substract the i-th equation with the product of 011 ≠a
111 aai with the first equation to produce the first transformed system:
( ) ( ) ( )
( ) ( ) ( )112
12
12
122
122
11212111
nnnnn
nn
nn
bxaxa
bxaxabxaxaxa
=++
=++=+++
L
MMOM
L
L
where
( )j
iijij a
aaaa 1
11
11 −= for i, j = 2,3,…,n
( )
111
11 baabb i
ii −= for i = 2,3,…,n
The process can be repeated for (n−1) times until the (n−1)-th transformed system is formed as followed, which completes the forward eliminations:
(1.3)
( ) ( ) ( ) ( )
( ) ( ) ( )
( ) ( )11
22
233
233
12
123
1232
122
11313212111
−− =
=++=+++=++++
nnn
nnn
nn
nn
nn
bxa
bxaxabxaxaxabxaxaxaxa
MMO
L
L
L
Chapter 1 Systems of Linear Equations / 4
where
( ) ( )( )
( )( 1
1
11 −
−
−− −= k
kjkkk
kikk
ijk
ij aaaaa ) for i, j = k+1,…,n (1.4a)
( ) ( )
( )
( )( 1
1
11 −
−
−− −= k
kkkk
kikk
ik
i baabb )
for i = k+1,…,n (1.4b)
Back substitutions can then be executed so that xj are solved:
( )
( )1
1
−
−
= nnn
nn
n abx (1.5a)
( )( ) ( )
⎥⎦
⎤⎢⎣
⎡−= ∑
+=
−−−
n
kjj
kkj
kkk
kkk xab
ax
1
111
1 for k = n−1,…,1 (1.5b)
• The above method can fail if akk → 0, the row has to be interchanged, which is referred to as pivoting:
23
32
2
21Pivoting
21
2
==+
⎯⎯⎯ →⎯=+=
xxx
xxx
where the new diagonal element is called a pivot, which can be selected among the maximum absolute value of a
∗kka
ik.
• The pivotal Gauss elimination gives a more accurate solutions, e.g. consider these systems (values to be rounded up to 3 significant figures):
Original Gauss elimination:
( ) ( ) ( )
125.1999.0908.443184.4440.0418.0417.000126.0
632.0708.034.1418.0417.000126.0
12
2100126.0
34.12
==
⎥⎦
⎤⎢⎣
⎡−−
⎯⎯⎯⎯⎯ →⎯⎥⎦
⎤⎢⎣
⎡−
⇒−
xx
Pivotal Gauss elimination:
( ) ( ) ( )
999.0998.0417.0418.00.0632.0708.034.1
418.0417.000126.0632.0708.034.1
12
2134.1
00126.02
==
⎥⎦
⎤⎢⎣
⎡ −⎯⎯⎯⎯⎯ →⎯⎥
⎦
⎤⎢⎣
⎡ − ⇒−
xx
Exact solution:
x1 = 1 x2 = 1
Chapter 1 Systems of Linear Equations / 5
Example 1.1
Solve the following system using the Gauss elimination method:
39521744132
321
321
321
=++=++=++
xxxxxxxxx
Solution
The system can be rewritten in matrix form as:
⎪⎭
⎪⎬
⎫
⎪⎩
⎪⎨
⎧=
⎪⎭
⎪⎬
⎫
⎪⎩
⎪⎨
⎧
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡
311
952744312
3
2
1
xxx
or [ ]⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡≡
395217441312
bA
First step of forward elimination:
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡−⎯⎯⎯⎯ →⎯ ⇒−
⇒−
264011201312
)3()1()3()2()1(2)2(
Second step of forward elimination:
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡−⎯⎯⎯⎯ →⎯ ⇒−
440011201312
)3()2(2)3(
Hence, the transformed upper triangular system is:
4412132
3
32
321
=−=+
=++
xxxxxx
Back substitutions are as follows
2132
1
32
3
231
12
1144
−=−−
=
−=−−
=
==
xxx
xx
x
Chapter 1 Systems of Linear Equations / 6
Example 1.2
Perform the pivotal Gauss elimination to the system given in Example 1.1. Solution
The pivotal Gauss elimination can be performed as followed:
( ) ( )
( ) ( ) ( )
( ) ( ) ( )
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡−−⎯⎯⎯⎯ →⎯
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡⎯⎯ →⎯
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡⇒−
⇒−
⇔
25
211
21
21
31423
21422
21
3010
1744
395213121744
395217441312
( ) ( ) ( ) ( ) ( )
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡⎯⎯⎯⎯ →⎯
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡
−−⎯⎯⎯ →⎯
⇒−
−⇔
34
34
25
211
32313
21
21
25
21132
0030
1744
1030
1744
Hence, the upper triangular system is:
34
334
25
3211
2
321
31744
==+=++
xxxxxx
Then, back substitution can be performed:
( )
( ) ( ) .4
17141
,13
1
,1
21
1
211
25
2
34
34
3
−=−−−
=
−=−
=
==
x
x
x
Chapter 1 Systems of Linear Equations / 7
1.3 Decomposition Methods
• In some cases, the left-hand side matrix A is frequently used while the right-hand side vector b is changed depending on the case.
• The overall system can be transformed to an upper triangular form so that it can be used repeatedly for different b, thus matrix A has to be decomposed.
• For a general non-symmetric system, the popular method is the Doolitle or LU decomposition:
LUA = (1.6)
where L and U are the lower and upper triangular matrices, respectively:
memory)(in
000
101001
333231
232221
131211
33
2322
131211
3231
21
333231
232221
131211
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡≡
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡⋅
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡=
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡
ulluuluuu
uuuuuu
lll
aaaaaaaaa
The solution steps of the system are as followed:
bxLUbxA =⋅⇒=⋅
By taking an intermediate vector y:
yxU =⋅ (1.7)
Hence,
byL =⋅ (1.8)
• The elements for L and U can be obtained from the Gauss elimination:
( ) ( )
( ) ( ) ( ) ⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡=
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡=
101001
000
122
1321131
11212
33
123
122
131211
aaaaaa
aaaaaa
LU
Chapter 1 Systems of Linear Equations / 8
• Another variation of the LU decomposition is the Crout decomposition, which maintains uii = 1 for i = 1,2,…,n in U instead of L:
For the first row and column:
for i = 1,2,…,n (1.9a) 11 ii al =
11
11 l
au j
j = for j = 2,3,…,n (1.9b)
For j = 2,3,…,n−1:
for i = j, j+1,…,n (1.9c) ∑−
=
−=1
1
j
kkjikijij ulal
jj
j
iikjijk
jk l
ulau
∑−
=
−=
1
1 for k = j+1, j+2,…,n (1.9d)
dan,
(1.9e) ∑−
=
−=1
1
n
kknnknnnn ulal
• If the system is symmetric, the Cholesky decomposition can be used, where matrix A can be decomposed such that:
TLLA = (1.10)
For the k-th row:
ii
i
jkjijki
ki l
llal
∑−
=
−=
1
1 for i = 1,2,…,k−1 (1.11a)
∑−
=
−=1
1
2k
jkjkkkk lal (1.11b)
This method optimises the use of computer memory in storing the decomposed form of A.
Chapter 1 Systems of Linear Equations / 9
Example 1.5
Decompose the following matrix using the Doolittle LU decomposition:
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡=
952744312
A
Solution
With reference to the matrix elements derived in Example 1.1:
.121012001
124220124001
,400120312
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡=
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡=
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡= LU
Example 1.7
Decompose the following matrix using the Cholesky decomposition:
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡=
953541312
A
Solution
By using Eq. 1.11:
.1,27
,27,23,21,2
232
2313333
22
31213232
2212222113131
1121211111
=−−==−
=
=−===
====
llall
llal
lallallalal
Maka,
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡=
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡
=187083.112132.2087083.170712.00041421.1
1272302721002
L
Chapter 1 Systems of Linear Equations / 10
1.4 Matrix Inverse and Determinant
• The Gauss elimination can be used to generate the inverse of a square matrix A by replacing the left-hand side vector b with an identity matrix I.
• By using the following identity:
IAA =⋅ −1 (1.12)
If all columns of A−1 are written as ( ) ( ) ( )nxxx ,,, 21 K and the columns of the I as , respectively, thus Eq. (1.12) can be rewritten as: ( ) ( ) ( )neee ,,, 21 K
( ) ( ) ( )( ) ( ) ( ) ( )( )nn eeexxxA ,,,,,, 2121 KK =⋅
Then, a set of n linear systems can be assembled:
( ) ( )
( ) ( )
( ) ( )nn exA
exA
exA
=⋅
=⋅
=⋅
M
22
11
(1.13)
• Consequently, the determinant of matrix A can simply be calculated using:
( ) ( ) ( ) ( ) ( ) ( ) ( )∏=
−− −=−=≡n
i
iii
pnnn
p aaaaa1
11233
12211 11det KAA (1.14)
where p is the number of row interchange operation during pivoting.
Chapter 1 Systems of Linear Equations / 11
Example 1.8
Determine the inverse of the following matrix using the Gauss elimination:
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡
−−
−=
112111124
A
Solution
The combination of A and I can be represented in an augmented form:
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡
−−
−⎯⎯⎯ →⎯
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡
−−
−
1400010001124
100112010111001124
23
29
41
45
21neliminatio
forwardGauss
Upon back substitution:
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡−=
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡−=
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡
−=
92
95
31
)3(
98
92
31
)2(
31
31)1(
0xxx
Hence, the inverse of A is
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡
−−−=−
92
98
31
95
92
31
31
31
1
0A
Example 1.9
Calculate the determinant of the matrix given in Example 1.8. Penyelesaian
In Example 1.0, there is no row interchange performed, thus p = 0. Hence,
( ) ( ) ( )( )( ) 9400
0124
1112
111124
det 29
21
2945
210 ==
−×−=
−−
−=A
Chapter 1 Systems of Linear Equations / 12
1.5 Errors, Residuals and Condition Number
• If x∗ is an approximate solution of a linear system , then the system error is defined as
bxA =⋅
(1.16) ∗−= xxe
• On the other hand, the system residue r is defined as
eAr ⋅= (1.17)
or, ∗∗ ⋅−=⋅−⋅= xAbxAxAr
• For a well-conditioned system, the residue can represent the error.
• Moreover, for comparison, a matrix or vector can be expressed in form of a scalar known as norm.
• For a vector , the p-norm is defined as ( T21 ,,, nxxx K=x )
( )pn
i
pi
ppn
pp
pxxxx
1
1
1
21 ⎟⎠
⎞⎜⎝
⎛=+++= ∑
=
Lx (1.20)
If p = 1, it is known as 1-norm:
∑=
=+++=n
iin xxxx
1211
Lx (1.19)
If p = 2, it is known as Euclidean norm:
∑=
=+++==n
iine
xxxx1
2222
212
Lxx (1.18)
If p → ∞, it is known as a maximum norm:
{ } ininnixxxx
≤≤≤≤∞==
1211max,,,max Kx (1.21)
• For a matrix of size m×n, the Frobenius norm, which is equivalent to the Euclidean norm for vectors, is defined as
][ ija=A
∑∑= =
=m
i
n
jije
a1 1
2A (1.22)
Chapter 1 Systems of Linear Equations / 13
and, the equivalent 1-norm and maximum norm for a matrix are defined as
columns of sum maximummax111
== ∑=
≤≤
n
iijnj
aA (1.23)
rows of sum maximummax11
== ∑=
≤≤∞
n
jijni
aA (1.24)
• The properties of norms of a vector or matrix A are as followed:
1. 0≥A and 0=A if, and only if, . 0A =
2. AA ⋅= cc where c is a scalar quantity.
3. BABA +≤+ Triangular inequality, where B is a vector or matrix of the same dimension of A.
4. BABA ⋅≤⋅ Schwarz inequality, where B is a vector or matrix which forms a valid product with A.
• The concept of norms can be used to calculate the condition number represents the ‘health’ of a linear system, either ill- or well-conditioned.
• If e is the error for the system bxA =⋅ , from the relations and , the following inequality can be established:
reA =⋅rAe ⋅= −1
rAeAr
rAereA ⋅≤≤⇒⋅≤≥⋅ −− 11and
Also, from bxA =⋅ and : bAx ⋅= −1
bAxAb
bAxbxA ⋅≤≤⇒⋅≤≥⋅ −− 11and
Thus, the combination of both inequality relations yields the range of the relative error xe , i.e.
( )b
AAxe
br
AAr
⋅⋅≤≤⋅⋅
−−
11
1
• Hence, the condition number is defined as
( ) 1−⋅= AAAκ (1.25)
Chapter 1 Systems of Linear Equations / 14
where the range of the relative error is.
( ) ( )b
Axe
br
Ar
⋅≤≤⋅ κκ
1 (1.26)
• The characteristics of the condition number are that:
1. ( ) 1≥Aκ — the smaller the better, and otherwise. 2. If ( ) 1→Aκ , the relative residual br can represent the relative
errors xe .
• If the error is solely contributed by matrix A, the inequality becomes:
( )A
EA
xe A⋅≤∗
κ (1.27)
• On the other hand, if the error is solely contributed by vector b, the inequality becomes:
( )be
Axe b⋅≤ κ (1.28)
• Therefore, from Eqs. (1.26-8), it can be seen that the condition number can determine the range of error and thus the health of a system.
Chapter 1 Systems of Linear Equations / 15
1.7 Iteration Methods
• For large systems (size > 200), the elimination and decomposition methods are not efficient due to increasing number of arithmetic operations.
• The number of arithmetic operations can be reduced via iteration methods, such as the Jacobi iteration and the Gauss-Seidel iteration methods.
• In the Jacobi iteration, Eq. (1.1) can be written for xi from the i-th equation:
( )
( )
( )nnnnnnnn
n
nn
nn
bxaxaxaa
x
bxaxaxaa
x
bxaxaxaa
x
−+++−=
−+++−=
−+++−=
−− 11,2211
2232312122
2
1131321211
1
1
1
1
L
M
L
L
(1.29)
Eq. (1.29) needs initial values ( )T)0()0(2
)0(1
)0( ,,, nxxx K=x , which yield
, and the computation continues as followed: ( T)1()1(2
)1(1
)1( ,,, nxxx K=x )
( )
( )
( )nk
nnnk
nk
nnn
kn
knn
kkk
knn
kkk
bxaxaxaa
x
bxaxaxaa
x
bxaxaxaa
x
−+++−=
−+++−=
−+++−=
−−+
+
+
)(11,
)(33
)(11
)1(
2)(
2)(
323)(
12122
)1(2
1)(
1)(
313)(
21211
)1(1
1
1
1
L
M
L
L
(1.30)
For k → ∞, vector x(k) converges to its exact solution if the diagonal domain condition is followed, i.e.
niaan
ijj
ijii ,,2,1for 1
K=>∑≠=
(1.31)
and the matrix which follows this condition is called a diagonal domain matrix.
Chapter 1 Systems of Linear Equations / 16
• To terminate the iteration process, a convergence or termination criterion can be specified, i.e.
( ) ( ) ε<−+ kk xx 1 (1.32)
• The Gauss-Siedel iteration method uses the most current known solution after each arithmetic operation in order to speed up convergence:
( )
( )
( )nk
nnnk
nk
nnn
kn
knn
kkk
knn
kkk
bxaxaxaa
x
bxaxaxaa
x
bxaxaxaa
x
−+++−=
−+++−=
−+++−=
+−−
+++
++
+
)1(11,
)1(33
)1(11
)1(
2)(
2)(
323)1(
12122
)1(2
1)(
1)(
313)(
21211
)1(1
1
1
1
L
M
L
L
(1.33)
• As of the Jacobi method, the Gauss-Siedel method must also observe the diagonal domain condition for convergence to be possible (see Fig. 1.1).
2222
21
21
=+−=−
xxxx
2222
21
21
−=−=+
xxxx
x1
x2
x1 − 2x2 = −2 2x1 + x2 = 2
x1
x2
x1 − 2x2 = −2
2x1 + x2 = 2
( )56
52 ,
( )56
52 ,
(a) The off-diagonal domain system (b) The diagonal domain system
FIG. 1.1 Divergence and convergence in the Gauss-Seidel method
Chapter 1 Systems of Linear Equations / 17
Example 1.10
Use the Jacobi iteration method to solve the following system up to 5 decimal points:
5902204014364
321
321
321
−=+−=++=−−
xxxxxxxxx
Solution
First of all, form a diagonal domain system:
20405902
14364
321
321
321
=++−=+−
=−−
xxxxxxxxx
Then, rewrite the system according to Eq. (1.30):
( ) ( ) ( )( )( ) ( ) ( )( )( ) ( ) ( )( )20
401
52901
143641
211
3
311
2
321
1
−++−=
++++=
−−−−=
+
+
+
kkk
kkk
kkk
xxx
xxx
xxx
By taking an initial values x(0) = (0, 0, 0)T, thus the method converges within 5 iterations:
Iteration no. 1: x(1) = (0.21875, 0.05556, 0.50000)T,
Iteration no. 2: x(2) = (0.22917, 0.06597, 0.49592)T,
Iteration no. 3: x(3) = (0.22955, 0.06613, 0.49262)T,
Iteration no. 4: x(4) = (0.22955, 0.06613, 0.49261)T,
Iteration no. 5: x(5) = (0.22955, 0.06613, 0.49261)T.
Chapter 1 Systems of Linear Equations / 18
Example 1.11
Repeat problem given in Example 1.10 using the Gauss-Seidel iteration method. Solution
First of all, form a diagonal domain system:
20405902
14364
321
321
321
=++−=+−
=−−
xxxxxxxxx
By taking an initial values x(0) = (0, 0, 0)T, the first solution in the first iteration:
( )[ ] 21875.014003641)1(
1 =−−−−=x
Use to calculate and so on, i.e. )1(1x )1(
2x
[ ] 06042.050)21875.0(2901)1(
2 =++=x
( ) 49302.02006042.021875.0401)1(
3 =−+−=x
Hence, the method converges within 4 iterations:
x(1) = (0.21875, 0.06042, 0.49302)T,
x(2) = (0.22929, 0.06613, 0.49262)T,
x(3) = (0.22955, 0.06613, 0.49261)T,
x(4) = (0.22955, 0.06613, 0.49261)T.
Chapter 1 Systems of Linear Equations / 19
1.8 Incomplete and Redundant Systems
• If , there will be two situations: nm ≠
1. m < n — incomplete system. 2. m > n — redundant system.
• For incomplete system, no solution is possible since additional (n − m) equations from other independent sources are required until m = n.
• For redundant system, a unique solution is not possible, and the system has to be optimised via least square method (also known as linear regression):
( ) ( )( ) ( ) ( ) ( )
( ) ( ) ( ) .
,
,
,
TT
TTTT
T
T2
bxAxAxA
xAxAxAbbxAbb
xAbxAb
eee
⋅−⋅⋅=
⋅⋅+⋅−⋅−=
⋅−⋅−=
== eS
Using the identity ( ) : TTT ABAB =
bAxxAAx ⋅⋅−⋅⋅= TTTTS
Minimising S:
bAxAAx
⋅−⋅==∂∂ TT
T 0S
forms an approximate system of n equations, i.e.
(1.34) bAxAA ⋅=⋅ TT
where the left-hand side matrix ATA is symmetry and the standard deviation σ can be calculated from the Euclidean norm of e, i.e.:
nmnm
S e
−=
−=
eσ (1.35)
Chapter 1 Systems of Linear Equations / 20
Example 1.12
Calculate the best approximate solution for the following system:
415107295539521744132
321
321
321
321
321
=++=++=++=++=++
xxxxxxxxxxxxxxx
Also, calculate the resulting standard deviation. Solution
The above system can be rewritted in form of bxA =⋅ as:
⎪⎪⎪
⎭
⎪⎪⎪
⎬
⎫
⎪⎪⎪
⎩
⎪⎪⎪
⎨
⎧
=⎪⎭
⎪⎬
⎫
⎪⎩
⎪⎨
⎧
⎥⎥⎥⎥⎥⎥
⎦
⎤
⎢⎢⎢⎢⎢⎢
⎣
⎡
42311
15107955952744312
3
2
1
xxx
By using Eq. (1.34):
⎪⎪⎪
⎭
⎪⎪⎪
⎬
⎫
⎪⎪⎪
⎩
⎪⎪⎪
⎨
⎧
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡=
⎪⎭
⎪⎬
⎫
⎪⎩
⎪⎨
⎧
⎟⎟⎟⎟⎟⎟
⎠
⎞
⎜⎜⎜⎜⎜⎜
⎝
⎛
⎥⎥⎥⎥⎥⎥
⎦
⎤
⎢⎢⎢⎢⎢⎢
⎣
⎡
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡
42311
15997310554175242
15107955952744312
15997310554175242
3
2
1
xxx
⎪⎭
⎪⎬
⎫
⎪⎩
⎪⎨
⎧=
⎪⎭
⎪⎬
⎫
⎪⎩
⎪⎨
⎧
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡
1007050
44527120227116712320212398
3
2
1
xxx
where its solutions are .42914.0,01996.0,34930.0 321 −=−=−= xxx
Chapter 1 Systems of Linear Equations / 21
The standard deviation can be obtained from the Euclidean norm of the error e:
⎪⎪⎪
⎭
⎪⎪⎪
⎬
⎫
⎪⎪⎪
⎩
⎪⎪⎪
⎨
⎧
−−−
=⎪⎭
⎪⎬
⎫
⎪⎩
⎪⎨
⎧−−
⎥⎥⎥⎥⎥⎥
⎦
⎤
⎢⎢⎢⎢⎢⎢
⎣
⎡
−
⎪⎪⎪
⎭
⎪⎪⎪
⎬
⎫
⎪⎪⎪
⎩
⎪⎪⎪
⎨
⎧
=
20758.001597.006387.052695.043114.0
42914.001996.034930.0
15107955952744312
42311
e
( ) ( ) ( ).71483.0
,20758.001597.006387.052695.043114.0 22222
=
+−+−+−+=ee
Therefore,
50546.035
71483.0=
−=σ
Chapter 1 Systems of Linear Equations / 22
Exercises
1. Consider the following system:
⎪⎪⎭
⎪⎪⎬
⎫
⎪⎪⎩
⎪⎪⎨
⎧−
=
⎪⎪⎭
⎪⎪⎬
⎫
⎪⎪⎩
⎪⎪⎨
⎧
⎥⎥⎥⎥
⎦
⎤
⎢⎢⎢⎢
⎣
⎡
5.18.02.02.1
11111241032108421
4
3
2
1
xxxx
a. Use the Gauss elimination method to obtain the solution of xi. b. Calculate the determinant for the left-hand side matrix. c. Generate the lower and upper triangular matrices using the Doolittle factorisation.
2. Consider the following system of 2 complex equations:
⎭⎬⎫
⎩⎨⎧
+−
=⎭⎬⎫
⎩⎨⎧⎥⎦
⎤⎢⎣
⎡−−+−+
ii
zz
iiii
4241
2332122
2
1
By writing , solve the equation using the Gauss-Siedel iteration method using Microsoft Excel until it converges up to 5 decimal points.
iyxz kkk +=
3. Consider the following set of redundant equations:
2222553223
321
21
321
321
321
=+−−=+−=−+
=+−=+−
xxxxx
xxxxxxxxx
a. Derive an approximate system of linear equations and solve it via the Gauss elimination.
b. Calculate the corresponding standard deviation.