University of Palestine Gaza Strip Civil Engineering College Numerical Analysis CIVL 3309 Dr. Suhail Lubbad
University of Palestine Gaza Strip Civil Engineering College Numerical Analysis CIVL 3309 Dr. Suhail Lubbad
Gaza Strip
f(x)=0
We were looking for the value(s) of x that satisfies the above equation:
Those values were called the roots
In this part we will be dealing with a set of equations in
n-unknowns or variables
In 2 variables: y= ax + b
A straight line (thus the name)
HOW?
What is a matrix?
Properties of matrices
Special Matrices
And
What are the defined mathematical operations on matrices?
(refreshing students with Linear algebra)
0
Column
[ ]
a11 a12 a13 ⋯ a 1m
A = [ A ]= ⋮
a21 a 22 a23 ⋯ a 2m -
row
⋮
an−1,1 an−1, 2 an−1, 3 ⋯ a n−1, m
an , 1 an2 an3 ⋯ a nm
[]
C11
C21
B= [ B ] = [ b11 b12 ⋯ b1m ] [ ]
C= C =
⋯
Size(B) =1×m
Cn1
Size(C) =n×1
Square matrices
A symmetric matrix is one where aij = aji for all i’s and j’s
Notice symmetry around the main diagonal
[ ]
5 1 2
M= [ M ] = 1 3 7
2 7 8
[ ]
5 1 2
M= [ M ] = 1 3 7
2 7 8
An upper triangular matrix: A lower triangular matrix:
Elements below the main Elements above the main
diagonal are zero diagonal are zero
[ ] [ ]
a 11 a 12 a13 a14 a 11 0 0 0
0 a 22 a23 a 24 a 21 a 22 0 0
M= [ M ] = M= [ M ] =
0 0 a33 a34 a 31 a 32 a33 0
0 0 0 a 44 a 41 a 42 a 43 a 44
A diagonal matrix square matrix
Elements off the main diagonal are equal to zero
[ ]
a11 0 0 0
0 a 22 0 0
M= [ M ] =
0 0 a33 0
0 0 0 a 44
[ ]
1 0 0 0
0 1 0 0
M= [ M ] =
0 0 1 0
0 0 0 1
A banded matrix
has all elements equal to zero, with the exception of a band centered on
the main diagonal
[ ]
a 11 a 12 0 0
a 21 a 22 a 23 0
M= [ M ] =
0 a 32 a33 a34
0 0 a 43 a 44
tridiagonal matrix
Matrix Operations
C=[A][B]
k=n
C ij= ∑ a ik bkj
k =1
Multiplication is NOT commutative
[ A ][ B]≠[ B][A ]
BUT associative,
.[ A][ B]/[C]=[A ].[B][C]/
And distributive
[ A ].[ B],[C ]/=[ A ][ B],[A ][C ]
.[ A ],[B ]/[C]=[ A ][C],[ B][C ]
If a matrix [A] is square and nonsingular,
there is another matrix [A]−1, called the inverse of [A]
Such that
−1 −1
[A][A ] =[A] [A ]=[I]
Transpose of a matrix:
ROWS become Columns
[ ]
5 1 9
F= [ F ] = 6 3 7
2 4 8
[ ]
5 6 2
Transpose of F ≡ F =
T
1 3 4
9 7 8
tr [A]:
the trace of a matrix is the sum of the elements on its principal
diagonal.
n
tr [A]=∑a ii
i=1
=a 11,a 22 ,a 33,...,a nn
Augmented matrix
addition of a column (or columns) to the original matrix.
[ ]
5 1 2
M= [ M ] = 1 3 7
2 7 8
AUGMENTATION
[ ∣] [ ∣ ]
5 1 2 3 5 1 2 1 0 0
M1=[ M1 ] = 1 3 7 3 M2=[ M 2 ] = 1 3 7 0 1 0
2 7 8 3 2 7 8 0 0 1
Representing a system of linear algebraic equations by MATRICES
a 11 x 1,a12 x 2 ,a13 x 3 ,⋯,a1n xn =b1
a 21 x 1,a 22 x2 ,a 23 x 3,⋯,a 2n x n=b2
[A][X]=[B]
where A is the matrix of cofactors in equations,
[ ] [] []
B is the column of constants, a11 a12 a13 ⋯ a 1n b1 x1
X is the column of unknowns A= a21 a22 a 23 ⋯ a 2n b2 x2
B= X=
⋮ ⋮ ⋮ ⋮
am1 am2 am3 ⋯ a mn bm xm
Which can be solved using the inverse as follows
−1 −1
[A] [A ][X]=[A] [B]
Giving
−1
[X]=[ A] [B]
A linear algebraic equations can be represented by MATRICES to be
solved by ELIMINATION,
where A is the matrix of coefficients, and B is the matrix of constants
0
[ A∣B ]
0
[ ]
a 11 a12 a13 ⋯ a1n b1
a 21 a 22 a 23 ⋯ a 2n b 2
a m1 a m2 am3 ⋯ a mn bm
AFTER THEORETICAL BACKGROUND