Uploaded by dalwin yeap

Chapter 1 - Solution of Linear System

advertisement
Chapter 1: System of linear equations
Linear system has the general form:
a11 x1  a12 x2  a13 x3  ...  a1n xn  b1
a21 x1  a22 x2  a23 x3  ...  a2 n xn  b2
.
.
.
an1 x1  an 2 x2  an 3 x3  ...  ann xn  bn
where the a = constant coefficients
the b = right hand side value
the n = number of equations
Linear system can be written in a matrix-vector form as AX = b, where
a11 a12 ... a1n 


a21 a22 ... a2 n 

A  .


.

a a ... a 
nn 
 n1 n 2

 x1

 x2
X  .

.
x
 3








b1

b2
b  .

.
b
 3








Since the same operations are performed on the matrix A and the vector b, they are
combined in the augmented matrix.
a11 a12 ... a1n b1 


a21 a22 ... a2 n b2 
.



.

a a ... a

 n1 n 2 nn b3 
Faculty of Engineering and Built Environment, SEGi University Kota Damansara
Prepared by: Fatin Nur Diana binti Abu Samah
1.1
Gauss Elimination method
Gauss Elimination is one of the techniques to solve linear systems. It involves
combining equations to eliminate unknowns. The basic Gauss elimination procedure is
elementary row operations.
Elementary row operation is applied to the augmented matrix to yield an equivalent
linear system.
The solutions can be obtained by finding the upper-triangular matrix
Rules for the elementary row operations:
1. Interchange
:
The order of two rows can be changed
Ri  R j
2. Scaling
:
Multiplying a row by a constant,
mR j  Ri
3. Replacement
:
The row can be replaced by the sum/subtract of that row
and a nonzero multiple of any row.
mR j  Ri  Ri
Steps of elementary row operations:
1. Change the system of linear equations to an augmented matrix.
2. Find the upper triangular matrix.
3. Change back to the system of linear equations to form a back-substitution phase.
4. Solve the equations.
Faculty of Engineering and Built Environment, SEGi University Kota Damansara
Prepared by: Fatin Nur Diana binti Abu Samah
1.2
Gauss Elimination method with Partial Pivoting
Obvious problems may occur when a pivot is zero because it leads to division by zero.
2 x2  3 x3  8
Example:
4 x1  6 x2  7 x3  3
2 x1  x2  6 x3  5
The pivot element means the element locates at the top row. Therefore, it is advantageous
to determine the largest available coefficient in the column. After that, the row can be
switched to be the pivot element. This is called partial pivoting.
Steps of partial pivoting:
1. Change the system of linear equations to an augmented matrix.
2. Form a partial pivoting matrix.
3. Find the upper triangular matrix.
4. Change back to the system of linear equations to form a back-substitution phase.
5. Solve the equations.
1.3
LU Decomposition
The combination of lower triangular and upper triangular matrices.
Steps of LU decomposition:
1. Change the system of linear equations to an augmented matrix.
2. Find the upper triangular matrix (U) by using elementary row operation.
R
mR j  Ri  Ri for m  i
Rj
3. Find the lower triangular matrix (L) by putting the constant with opposite sign.
4. Solve LY  b .
5. Solve UX  Y .
Faculty of Engineering and Built Environment, SEGi University Kota Damansara
Prepared by: Fatin Nur Diana binti Abu Samah
1.4
Gauss-Seidel Iteration method
The Gauss-Seidel method is most commonly used the iterative method. It involves with a
large number of equations.
A square matrix A is said to be strictly diagonally dominant when
N
akk   akj for k  1,2,... N
j 1
This means that in each row of the matrix, the magnitude of the main diagonal element
must exceed the sum of other magnitudes of elements.
8 x1  x2  x3  8
Example:
x1  7 x2  2 x3  4
2 x1  x2  9 x3  12

8 1  1
1  7 2 


2 1
9 
Steps of Gauss-Seidel method:
1. Make sure matrix A is diagonally dominant.
2. Form the general equations for unknowns.
3. Construct a table.
4. Stop the iteration until the difference xi( k 1)  xi( k )   .
Faculty of Engineering and Built Environment, SEGi University Kota Damansara
Prepared by: Fatin Nur Diana binti Abu Samah
Download