Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Numerical Methods
Chapter 1
Systems of Linear Algebraic Equations
Systems of Linear
Algebraic Equations
Consider the system of linear algebraic equations of the form
(i = 1, 2,…,n; j = 1, 2,…,m)
Special Types of Matrices
Vectors are a special type of matrix which has only one column or one row.
A column vector is an n x 1 matrix. Thus,
x1
x
x = [xj] = 2 (i = 1, 2,…,n)
...
xn
A row vector is a 1 x n matrix. For example,
y = [yj] = y y ... y (j = 1, 2,…,n)
1 2 n
A square matrix S is a matrix which has the same number of rows and
columns, that is, m = n. For example,
a11 a12 ... a1n
a a22 ... a2 n
21
... ... ... ...
an1 an 2 ... ann
is a square n x n matrix.
Special Types of Matrices
A diagonal matrix D is a square matrix with all elements equal to zero except
the elements on the major diagonal. For example,
a11 0 0 0
0 a 0 0
22
0 0 a33 0
0 0 0 a 44
is a 4 x 4 diagonal matrix.
The identity matrix I is a diagonal matrix with unity diagonal elements. The
matrix
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
0 0 a33 a34
0 0 0 a44
is a 4 x 4 upper triangular matrix. A lower triangular matrix L has all zero elements
above the major diagonal. The matrix
a11 0 0 0
a a 0 0
21 22
a31 a32 a33 0
41 42 43 44
a a a a
is a 4 x 4 lower triangular matrix.
Special Types of Matrices
The transpose of an m x n matrix A is the n x m matrix, AT,
which has elements aijT = aji.
The transpose of a column vector, is a row vector and vice
versa.
Symmetric square matrices have identical corresponding
elements on either side of the major diagonal. That is,
aij = aji. In that case, A = AT.
1 1 3 2 3 5
A
5 3 1
B
3 1 2
2 3 1
1 3 4
Example: Evaluate (A + 3B)T using the matrices given in the previous example.
Matrix Algebra
Matrices that are suitably conformable are associative on multiplication. Thus,
A(BC) = (AB)C
Square matrices are conformable in either order. Thus, if A and B are n x n
matrices,
AB = C and BA = D
where C and D are n x n matrices. However square matrices in general are not
commutative on multiplication. That is, in general
AB ≠ BA
Matrices A, B, and C are distributive if B and C are the same size and A is
conformable to B and C. Thus,
A(B + C) = AB + AC
Matrix Algebra
Consider the two square matrices A and B. If AB = I, then B is the inverse of A,
which is denoted as A-1. Matrix inverses commute on multiplication. Thus,
AA-1 = A-1A = I
aii j 1 j i 1
1 n
(k )
bi aij x j
( k 1)
xi
(k )
(8) xi (i = 1, 2,…,n)
aii j 1
(10)
Ri ( k ) bi j 1
aij x j ( k )
(i = 1, 2,…,n)
1/ 2
n
n
2
xi max x i or xi
i 1 i 1
For a relative error criterion, the following choices are possible:
x
1/ 2
nxi n x
2
i m ax
or i
xi i 1 xi i 1 xi
Gauss-Seidel Iteration Method
This method is similar to the Jacobi method, except that the most recently
calculated values of all xi are used in all computations. Thus,
(11) 1 i 1 n
(k )
i ij j ij j
( k 1) ( k 1)
xi b a x a x
aii j 1 j i 1
or,
(k )
( k 1) Ri
xi
(k )
(12) xi
aii
i 1 n
bi aij x j aij x j
(13) (k ) ( k 1) (k )
Ri
j 1 j 1
Gauss-Seidel Iteration Method
Example:
Solve