Upload
dolien
View
218
Download
0
Embed Size (px)
Citation preview
REVIEW OPERASI MATRIKS
T E K N I K L I N G K U N G A N I T B
MENGHITUNG INVERS MATRIKS
1
0
0
1
22221221
21221121
22121211
21121111
acac
acac
acac
acac
10
01
2221
1211
2221
1211
aa
aa
cc
cc
DETERMINAN
Hanya untuk square matrices
Jika determinan = 0 matriks singular, tidak punya invers
bcaddc
ba
dc
ba
det
123213312132231321
321
321
321
det
cbacbacbacbacbacba
ccc
bbb
aaa
CARI INVERS NYA…
52
42
42
21
S I M U L T A N E O U S L I N E A R E Q U A T I O N S
SISTEM PERSAMAAN LINEAR
METODE PENYELESAIAN
• Metode grafik
• Eliminasi Gauss
• Metode Gauss – Jourdan
• Metode Gauss – Seidel
• LU decomposition
METODE GRAFIK
2
4
11
21
2
1
x
x2
-2
Det{A} 0 A
is nonsingular
so invertible
Unique
solution
SISTEM PERSAMAAN YANG TAK TERSELESAIKAN
5
4
42
21
2
1
x
x
No solution Det [A] = 0, but system is inconsistent
Then this system of
equations is not solvable
SISTEM DENGAN SOLUSI TAK TERBATAS
Det{A} = 0 A is singular
infinite number of solutions
8
4
42
21
2
1
x
x
Consistent so solvable
ILL-CONDITIONED SYSTEM OF EQUATIONS
A linear system
of equations is
said to be “ill-
conditioned” if
the coefficient
matrix tends to
be singular
ILL-CONDITIONED SYSTEM OF EQUATIONS
• A small deviation in the entries of A matrix, causes a
large deviation in the solution.
47.1
3
99.048.0
21
2
1
x
x
47.1
3
99.049.0
21
2
1
x
x
1
1
2
1
x
x
0
3
2
1
x
x
GAUSSIAN ELIMINATION
CXA
Merupakan salah satu teknik paling populer
dalam menyelesaikan sistem persamaan
linear dalam bentuk:
Terdiri dari dua step
1. Forward Elimination of Unknowns.
2. Back Substitution
FORWARD ELIMINATION
112144
1864
1525
Tujuan Forward Elimination adalah untuk
membentuk matriks koefisien menjadi Upper
Triangular Matrix
7.000
56.18.40
1525
FORWARD ELIMINATION
Persamaan linear
n persamaan dengan n variabel yang tak diketahui
11313212111 ... bxaxaxaxa nn
22323222121 ... bxaxaxaxa nn
nnnnnnn bxaxaxaxa ...332211
. .
. .
. .
CONTOH
83125
12312
71352
21232
8325
1232
7352
2232
4321
4321
4321
4321
xxxx
xxxx
xxxx
xxxx
matriks input
FORWARD ELIMINATION
83125
12312
71352
21232
32
162
190
13140
92120
12
112
31
'
14
'
4
'
13
'
3
'
12
'
2
1'
1
5
2
2
2
RRR
RRR
RRR
RR
32
162
190
13140
92120
12
112
31
41599
4500
1973002
912
110
12
112
31
'
14
'
4
'
23
'
3
2'
2
1
'
1
219
4
2
RRR
RRR
RR
RR
FORWARD ELIMINATION
12572
12143000
319
37100
291
2110
12
112
31
'
34
'
4
3'
3
2
'
2
1
'
1
45
3
RRR
RR
RR
RR
41599
4500
1973002
912
110
12
112
31
12572
12143000
319
37100
291
2110
12
112
31
1435721000
319
37100
291
2110
12
112
31
121434'
4
3
'
3
2
'
2
1
'
1
RR
RR
RR
RR
BACK SUBSTITUTION
4
143572
319
37
29
21
12
12
3
4
4
43
432
4321
x
x
xx
xxx
xxxx
GAUSS - JOURDAN
39743
22342
15231
6150
8120
15231
'
13
'
3
'
12
'
2
1
'
1
3
2
RRR
RRR
RR
142700
42110
152101
'
23
'
3
2
'
2
'
21
'
1
5
2
3
RRR
RR
RRR
6150
8120
15231
142700
42110
152101
4100
2010
1001
273'
3
'
32
'
2
'
31
'
1
21
21
RR
RRR
RRR
WARNING..
655
901.33099.26
7710
321
123
21
xxx
xxx
xx
Dua kemungkinan kesalahan -Pembagian dengan nol mungkin terjadi pada langkah
forward elimination. Misalkan:
- Kemungkinan error karena round-off (kesalahan pembulatan)
CONTOH
Dari sistem persamaan linear
515
6099.23
0710
3
2
1
x
x
x
6
901.3
7
=
Akhir dari Forward Elimination
1500500
6001.00
0710
3
2
1
x
x
x
15004
001.6
7
=
6
901.3
7
515
6099.23
0710
15004
001.6
7
1500500
6001.00
0710
KESALAHAN YANG MUNGKIN TERJADI
Back Substitution
99993.015005
150043 x
5.1 001.0
6001.6 32
xx
3500.010
077 32
1
xx
x
15004
001.6
7
1500500
6001.00
0710
3
2
1
x
x
x
CONTOH KESALAHAN
Bandung-kan solusi exact dengan hasil perhitungan
99993.0
5.1
35.0
3
2
1
x
x
x
X calculated
1
1
0
3
2
1
x
x
x
X exact
IMPROVEMENTS
Menambah jumlah angka penting
Mengurangi round-off error (kesalahan pembulatan)
Tidak menghindarkan pembagian dengan nol
Gaussian Elimination with Partial Pivoting
Menghindarkan pembagian dengan nol
Mengurangi round-off error
PIVOTING
pka ,npk
Eliminasi Gauss dengan partial pivoting mengubah tata urutan
baris untuk bisa mengaplikasikan Eliminasi Gauss secara Normal
How?
Di awal sebelum langkah ke-k pada forward elimination, temukan angka
maksimum dari:
nkkkkk aaa .......,,........., ,1
Jika nilai maksimumnya Pada baris ke p,
Maka tukar baris p dan k.
PARTIAL PIVOTING
What does it Mean?
Gaussian Elimination with Partial Pivoting ensures that
each step of Forward Elimination is performed with the
pivoting element |akk| having the largest absolute value.
Jadi,
Kita mengecek pada setiap langkah apakah angka
mutlak yang dipakai untuk forward elimination (pivoting
element) adalah selalu paling besar
PARTIAL PIVOTING: EXAMPLE
655
901.36099.23
7710
321
321
21
xxx
xxx
xx
Consider the system of equations
In matrix form
515
6099.23
0710
3
2
1
x
x
x
6
901.3
7
=
Solve using Gaussian Elimination with Partial Pivoting using five
significant digits with chopping
PARTIAL PIVOTING: EXAMPLE
Forward Elimination: Step 1
Examining the values of the first column
|10|, |-3|, and |5| or 10, 3, and 5
The largest absolute value is 10, which means, to follow the
rules of Partial Pivoting, we don’t need to switch the rows
6
901.3
7
515
6099.23
0710
3
2
1
x
x
x
5.2
001.6
7
55.20
6001.00
0710
3
2
1
x
x
x
Performing Forward Elimination
PARTIAL PIVOTING: EXAMPLE
001.6
5.2
7
6001.00
55.20
0710
3
2
1
x
x
x
Forward Elimination: Step 2
Examining the values of the first column
|-0.001| and |2.5| or 0.0001 and 2.5
The largest absolute value is 2.5, so row 2 is switched with
row 3
5.2
001.6
7
55.20
6001.00
0710
3
2
1
x
x
x
Performing the row swap
PARTIAL PIVOTING: EXAMPLE
Forward Elimination: Step 2
Performing the Forward Elimination results in:
002.6
5.2
7
002.600
55.20
0710
3
2
1
x
x
x
PARTIAL PIVOTING: EXAMPLE
002.6
5.2
7
002.600
55.20
0710
3
2
1
x
x
x
Back Substitution
Solving the equations through back substitution
1002.6
002.63 x
15.2
55.2 22
xx
010
077 32
1
xx
x
PARTIAL PIVOTING: EXAMPLE
1
1
0
3
2
1
x
x
x
X exact
1
1
0
3
2
1
x
x
x
X calculated
Compare the calculated and exact solution
The fact that they are equal is coincidence, but it does
illustrate the advantage of Partial Pivoting
SUMMARY
-Forward Elimination
-Back Substitution
-Pitfalls
-Improvements
-Partial Pivoting