Вы находитесь на странице: 1из 35

FINITE ELEMENT METHOD

FINITE ELEMENT METHOD


(BDA 4033)
Lecture Module 2: Matrix Algebra
Dr. Waluyo Adi Siswanto
Universiti Tun Hussein Onn Malaysia
BDA 4033 Dr. Waluyo Adi Siswanto 2
Topics to
Topics to
Discuss
Discuss

Matrix definition and notation Matrix definition and notation

Definition

Transpose

Symmetric Matrix

Unit Matrix

Matrix Operations Matrix Operations

Addition

Multiplication

Inverse

Orthogonal Matrix Orthogonal Matrix

Solution of Simultaneous Equations Solution of Simultaneous Equations


BDA 4033 Dr. Waluyo Adi Siswanto 3
Matrix Definition
A matrix is an m x n array of numbers arranged in
m rows and n columns
Matrix is t!en described as being of order m x n
[ a]=
[
a
11
a
12
a
1n
a
21
a
22
a
2n
.
a
m1
a
m2
a
mn
]
"o# m
$olumn n
BDA 4033 Dr. Waluyo Adi Siswanto 4
Example Matrix Definition
[ M ]=
[
5 3 3 2
6 5 4 19
] Retangular matrix
[C]=
[
5 3 3
5 4 19
2 4 3
]
Square matrix
[ B]=[ 5 3 3]
Ro! matrix
[ F ]=
[
5
3
3
]
=
{
5
3
3
}
"olumn matrix #Vector Vector$
Vector Vector
2 x %
& x &
' x &
& x '
BDA 4033 Dr. Waluyo Adi Siswanto 5
Transpose Matrix
T!e transpose matrix is obtained by
interhanging ro!s and olumns
interhanging ro!s and olumns
[
a
ij
]
T
=
[
a
ji
]
[C]=
[
5 3 3
5 4 19
2 4 3
]
[C]
T
=
[
5 5 2
3 4 4
3 19 3
]
Diagonal
unc!anged
BDA 4033 Dr. Waluyo Adi Siswanto 6
Transpose Matrix
in OO Spreadsheet
(repare data
(repare area for result
Insert function
TR%NS&OSE TR%NS&OSE
Select t!e
array data
O' O'
To s!o#
T!e result
BDA 4033 Dr. Waluyo Adi Siswanto 7
S(mmetri Matrix
If a s)uare matrix is
equal to its transpose
equal to its transpose*
It is called a symmetric matrix
[
a
]
=
[
a
]
T
[C]=
[
5 3 3
3 4 8
3 8 3
]
[C]
T
=
[
5 3 3
3 4 8
3 8 3
]
[C] is a symmetric matrix
BDA 4033 Dr. Waluyo Adi Siswanto 8
)nit Matrix
T!e
unit
unit +or
Identit(
Identit(, matrix
[I]
[I] is suc! t!at
T!e unit matrix is al#ays a s)uare matrix of any possible
order #it!
eac! element of t!e main diagonal is one and
eac! element of t!e main diagonal is one and
all ot!er elements e)ual to -ero
all ot!er elements e)ual to -ero
[ a] [ I ]=[ I ][ a]=[ a]
[ I ]=
[
1 0 0
0 1 0
0 0 1
]
.or example* t!e & x & unit matrix is given by
BDA 4033 Dr. Waluyo Adi Siswanto 9
%ddition of Matries
Matrices of t!e same order can be added toget!er by
summing orresponding elements of the matries summing orresponding elements of the matries
Subtraction is performed in similar manner
Matrices of unli/e order cannot be added or subtracted
[ c
ij
]=[ a
ij
][b
ij
]=[ b
ij
][ a
ij
]
[ A]=
[
1 2
3 2
]
[ B]=
[
1 2
3 1
]
[C]=[ A][ B]=
[
0 4
0 3
]
BDA 4033 Dr. Waluyo Adi Siswanto 10
Multipliation of Matries
T!e number of t!e columns of t!e first matrix must be e)ual to t!e number of
ro#s of t!e second matrix
Matrix multiplication is not cumulative is not cumulative [A][B][B][A]
[ c
ij
]=

e=1
n
a
ie
b
ej
[ A]=
[
2 1
3 2
]
[ B]=
[
1 1
2 0
]
[C]=[ A] [ B]=
[
4 2
7 3
]
BDA 4033 Dr. Waluyo Adi Siswanto 11
Multipliation of Matries
in OO "al Spreadsheet
(repare data
0A1 and 021
(repare area for result
Insert function MM)LT MM)LT
Select t!e array data 0A1 and 021
O' O'
To s!o#
T!e result
BDA 4033 Dr. Waluyo Adi Siswanto 12
In*erse of a Matrix
T!e inverse of a matrix is a matrix suc! t!at
[ A]
1
[ A]=[ A] [ A]
1
=[ I ]
[ A]
1
=
[ C]
T
A
=
adj [ A]
A
[C]
A
: $ofactor of matrix
: Determinant of matrix
[ A]
[ A]
BDA 4033 Dr. Waluyo Adi Siswanto 13
"ofator Matrix
[ A]=
[
1 3 2
2 4 2
0 4 1
]
[C]=
[

4 2
4 1

2 2
0 1

2 4
0 4

3 2
4 1

1 2
0 1

1 3
0 4

3 2
4 2

1 2
2 2

1 3
2 4

]
=
[
12 22 8
11 1 4
2 2 2
]
BDA 4033 Dr. Waluyo Adi Siswanto 14
%d+oint and Determinant Matrix
$ontinuing t!e previous result
adj [ A]=[C]
T
=
[
12 11 2
2 1 2
8 4 2
]
det [ A]=A=11

4 2
4 1

31

2 2
0 1

21

2 4
0 4

=10
BDA 4033 Dr. Waluyo Adi Siswanto 15
Determinant of a Matrix
in OO "al Spreadsheet
(repare data 0A1
and place for result
Insert function MDETERM MDETERM Select t!e array data 0A1
O' O'
To s!o#
T!e result
BDA 4033 Dr. Waluyo Adi Siswanto 16
In*erse of a Matrix
in OO "al Spreadsheet
(repare data 0A1
Insert function MIN,ERSE MIN,ERSE Select t!e array data 0A1
O' O'
To s!o#
T!e result
(repare area for result
BDA 4033 Dr. Waluyo Adi Siswanto 17
Orthogonal Matrix
A matrix 0A1 is an ort!ogonal matrix if
[ A]
1
=[ A]
T
[ A]=
[
!os60d"# sin60d"#
sin60d"# !os60d"#
]
=
[
0.5 0.87
0.87 0.5
]
[ A]
T
=
[
0.5 0.87
0.87 0.5
]
[ A]
1
=
[
0.5 0.87
0.87 0.5
]
Matrix 0A1 is an ort!ogonal matrix
BDA 4033 Dr. Waluyo Adi Siswanto 18
Solution Methods
of Simultaneous Linear Equations

"epresentation of linear e)uations in Matrix

Matrix Inversion Met!od

$lassical Met!ods

$ramer3s "ule Met!od

4aussian 5limination Met!od

4auss6Siedel Iteration Met!od


BDA 4033 Dr. Waluyo Adi Siswanto 19
Linear Equations in Matrix
a
11
x
1
a
12
x
2
a
1n
x
n
=c
1
a
21
x
1
a
22
x
2
a
2n
x
n
=c
2

a
n1
x
1
a
n2
x
2
a
nn
x
n
=c
n
T!e e)uation can be #ritten in Matrix
[
a
11
a
12
a
1n
a
21
a
22
a
2n
.
a
n1
a
n2
a
nn
] {
x
1
x
2

x
n
}
=
{
c
1
c
2

c
n
}
[ K ] {x}={F} or
{x}=[ K ]
1
{F} t!en
BDA 4033 Dr. Waluyo Adi Siswanto 20
Example &ro-lem ./0
a 7rite t!e simultaneous e)uation in Matrix
b .ind t!e un/no#n variables x'* x2 and x& from t!e
follo#ing e)uations
x
1
3 x
2
2 x
3
=2
2 x
1
4 x
2
2 x
3
=1
4 x
2
x
3
=3
[
1 3 2
2 4 2
0 4 1
]
{
x
1
x
2
x
3
}
=
{
2
1
3
}
[ K ] {x}={F} or
{x}=[ K ]
1
{F} t!en
BDA 4033 Dr. Waluyo Adi Siswanto 21
Sol*ing Simultaneous Equation
in OO "al Spreadsheet
{
x
1
x
2
x
3
}
=
{
4.1
1.1
1.4
}
T!e result:
BDA 4033 Dr. Waluyo Adi Siswanto 22
"ramer1s Rule Method
[
1 3 2
2 4 2
0 4 1
]
{
x
1
x
2
x
3
}
=
{
2
1
3
}
x
1
=

2 3 2
1 4 2
3 4 1

1 3 2
2 4 2
0 4 1

=4.1
x
2
=

1 2 2
2 1 2
0 3 1

1 3 2
2 4 2
0 4 1

=1.1 x
3
=

1 3 2
2 4 1
0 4 3

1 3 2
2 4 2
0 4 1

=1.4
BDA 4033 Dr. Waluyo Adi Siswanto 23
2auss Elimination
4auss 5limination is based on triangularisation of t!e coefficient matrix
and evaluation of t!e un/no#ns by bac/6substitution starting from t!e last
e)uation
T!e form can be summarised in general form by
a
ij
=a
ij
a
kj
a
ik
a
kk
k=1$2$, n1
i =k1$, n
j=k ,, n1
x
i
=
1
a
ii

a
i , n1


r=i1
n
a
ir
x
r

BDA 4033 Dr. Waluyo Adi Siswanto 24


Example &ro-lem ./.
2 x
1
2 x
2
1 x
3
=9
2 x
1
1 x
2
=4
1 x
1
1 x
2
1 x
3
=6
a .ind t!e un/no#n variables x'* x2 and x& from t!e
follo#ing e)uations* using 4auss 5limination Met!od
b 8erify t!e result in Speads!eet
n=3
k=1$2
i=2$3
j =1$2$3$4
Since t!e order of matrix is n9&*
t!e index for solving t!is problem
BDA 4033 Dr. Waluyo Adi Siswanto 25
T!e running index #ill be +for n9&,
/ 9 '
i 9 2
: 9 ' to %
$alculate a
i:
ie a
2'
a
22
a
2&
a
2%
i 9 &
: 9 ' to %
$alculate a
i:
ie a
&'
a
&2
a
&&
a
&%
/ 9 2
i 9 &
: 9 2 to %
$alculate a
i:
ie a
&2
a
&&
a
&%

k=1$2$, n1
i =k1$, n
j=k ,, n1
BDA 4033 Dr. Waluyo Adi Siswanto 26
T!e running index #ill be +for n9&,
/ 9 '
i 9 2
: 9 ' to %
$alculate a
i:
ie a
2'
a
22
a
2&
a
2%

a
ij
=a
ij
a
kj
a
ik
a
kk
[ a]=
[
2 2 1
2 1 0
1 1 1
]
a
21
=a
21
a
11
a
21
a
11
=22
2
2
=0
a
22
=a
22
a
12
a
21
a
11
=12
2
2
=1
a
23
=a
23
a
13
a
21
a
11
=01
2
2
=1
a
24
=a
24
a
14
a
21
a
11
=49
2
2
=5
BDA 4033 Dr. Waluyo Adi Siswanto 27
i 9 &
: 9 ' to %
$alculate a
i:
ie a
&'
a
&2
a
&&
a
&%

a
ij
=a
ij
a
kj
a
ik
a
kk
[ a]=
[
2 2 1
2 1 0
1 1 1
]
a
31
=a
31
a
11
a
31
a
11
=12
1
2
=0
a
32
=a
32
a
12
a
31
a
11
=12
1
2
=0
a
33
=a
33
a
13
a
31
a
11
=11
1
2
=0.5
a
34
=a
34
a
14
a
31
a
11
=69
1
2
=1.5
BDA 4033 Dr. Waluyo Adi Siswanto 28
/ 9 2
i 9 &
: 9 2 to %
$alculate a
i:
ie a
&2
a
&&
a
&%

a
ij
=a
ij
a
kj
a
ik
a
kk
[ a]=
[
2 2 1
2 1 0
1 1 1
]
a
32
=a
32
a
22
a
32
a
22
=01
0
1
=0
a
33
=a
33
a
23
a
32
a
22
=0.51
0
1
=0.5
a
34
=a
34
a
24
a
32
a
22
=1.55
0
1
=1.5
BDA 4033 Dr. Waluyo Adi Siswanto 29
x
i
=
1
a
ii

a
i , n1


r=i1
n
a
ir
x
r

x
3
=
1
a
33

a
34
0

=
1
0.5
1.5=3
x
2
=
1
a
22

a
24
a
23
x
3

=
1
1
[513]=2
x
1
=
1
a
11

a
14
a
12
x
2
a
13
x
3

=
1
2
[92213]=1
BDA 4033 Dr. Waluyo Adi Siswanto 30
8erification using inverse matrix in ;; Spreads!eet
BDA 4033 Dr. Waluyo Adi Siswanto 31
2auss Siedel Iteration Method
4auss6Siedel met!od is based on iterative approac!
x
1
=
1
a
11
c
1
a
12
x
2
a
13
x
3
a
1n
x
n

x
2
=
1
a
22
c
2
a
21
x
1
a
23
x
3
a
2n
x
n

x
n
=
1
a
nn
c
n
a
n1
x
1
a
n2
x
2
a
n, n1
x
n1

A good initial guess


x
i
=
c
i
a
ii
BDA 4033 Dr. Waluyo Adi Siswanto 32
Example &ro-lem ./3
4x
1
x
2
=2
x
1
4%
2
x
3
=5
x
2
4%
3
x
4
=6
x
3
2%
4
=2
a .ind t!e un/no#n variables x'* x2 and x& from t!e
follo#ing e)uations* using 4auss6Siedel Iteration approac!
b 8erify t!e result in Speads!eet
BDA 4033 Dr. Waluyo Adi Siswanto 33
A good initial guess
x
i
=
c
i
a
ii
[ a]=
[
4 1 0 0
1 4 1 0
0 1 4 1
0 0 1 2
]
{
c
}
=
{
2
5
6
2
}
x
1
=0.5 x
2
=1 x
3
=1 x
4
=1
x
1
=
1
4
2x
2
=0.75
x
2
=
1
4
5x
1
x
3
=1.68
x
3
=
1
4
6x
2
x
4
=1.672
x
4
=
1
2
2x
3
=0.16
.irst trial Second trial
x
1
=
1
4
21.68=0.992
x
2
=
1
4
50.9921.672=1.899
x
3
=
1
4
61.8990.16=1.944
x
4
=
1
2
21.944=0.028
BDA 4033 Dr. Waluyo Adi Siswanto 34
BDA 4033 Dr. Waluyo Adi Siswanto 35

Вам также может понравиться