REVIEW OPERASI MATRIKS
MENGHITUNG INVERS MATRIKS
1
0
0
1
22 22 12 21 21 22 11 21 22 12 12 11 21 12 11 11a
c
a
c
a
c
a
c
a
c
a
c
a
c
a
c
1
0
0
1
22
21
12
11
22
21
12
11
a
a
a
a
c
c
c
c
DETERMINAN
Hanya untuk square matrices
Jika determinan = 0 matriks singular, tidak punya
invers
bc
ad
d
c
b
a
d
c
b
a
det
1 2 3 2 1 3 3 1 2 1 3 2 2 3 1 3 2 1 3 2 1 3 2 1 3 2 1det
c
b
a
c
b
a
c
b
a
c
b
a
c
b
a
c
b
a
c
c
c
b
b
b
a
a
a
CARI INVERS NYA…
5
2
4
2
4
2
2
1
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
METODE PENYELESAIAN
•
Metode grafik
•
Eliminasi Gauss
•
Metode Gauss – Jourdan
•
Metode Gauss – Seidel
•
LU decomposition
METODE GRAFIK
2
4
1
1
2
1
2 1x
x
2 -2Det{A}
0
A
is nonsingular
so invertible
Unique
solution
SISTEM PERSAMAAN YANG TAK
TERSELESAIKAN
5
4
4
2
2
1
2 1x
x
No solution
Det [A] = 0,
but system is inconsistent
Then this
system of
equations is
SISTEM DENGAN SOLUSI TAK
TERBATAS
Det{A} = 0
A is singular
infinite number of solutions
8
4
4
2
2
1
2 1x
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
.
0
48
.
0
2
1
2 1x
x
47
.
1
3
99
.
0
49
.
0
2
1
2 1x
x
1
1
2 1x
x
0
3
2 1x
x
GAUSSIAN ELIMINATION
A
X
C
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
1
12
144
1
8
64
1
5
25
Tujuan Forward Elimination adalah untuk
membentuk
matriks koefisien
menjadi Upper
Triangular Matrix
7
.
0
0
0
56
.
1
8
.
4
0
1
5
25
FORWARD ELIMINATION
Persamaan linear
n persamaan dengan n variabel yang tak diketahui
1 1 3 13 2 12 1 11
x
a
x
a
x
...
a
x
b
a
n n
2 2 3 23 2 22 1 21x
a
x
a
x
...
a
x
b
a
n n
n n nn n n nx
a
x
a
x
a
x
b
a
1 1
2 2
3 3
...
. .
. .
. .
CONTOH
8
3
1
2
5
1
2
3
1
2
7
1
3
5
2
2
1
2
3
2
8
3
2
5
1
2
3
2
7
3
5
2
2
2
3
2
4 3 2 1 4 3 2 1 4 3 2 1 4 3 2 1
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
matriks input
FORWARD ELIMINATION
8
3
1
2
5
1
2
3
1
2
7
1
3
5
2
2
1
2
3
2
3
2
1
6
2
19
0
1
3
1
4
0
9
2
1
2
0
1
2
1
1
2
3
1
' 1 4 ' 4 ' 1 3 ' 3 ' 1 2 ' 2 1 ' 15
2
2
2
R
R
R
R
R
R
R
R
R
R
R
3
2
1
6
2
19
0
1
3
1
4
0
9
2
1
2
0
1
2
1
1
2
3
1
4
159
9
4
5
0
0
19
7
3
0
0
2
9
1
2
1
1
0
1
2
1
1
2
3
1
' 1 4 ' 4 ' 2 3 ' 3 2 ' 2 1 ' 12
19
4
2
R
R
R
R
R
R
R
R
R
R
FORWARD ELIMINATION
12 572 12 143 0 0 0 3 19 3 7 1 0 0 2 9 1 2 1 1 0 1 2 1 1 2 3 1 ' 3 4 ' 4 3 ' 3 2 ' 2 1 ' 14
5
3
R
R
R
R
R
R
R
R
R
4 159 9 4 5 0 0 19 7 3 0 0 2 9 1 2 1 1 0 1 2 1 1 2 3 1 12 572 12 143 0 0 0 3 19 3 7 1 0 0 2 9 1 2 1 1 0 1 2 1 1 2 3 1 143 572 1 0 0 0 3 19 3 7 1 0 0 2 9 1 2 1 1 0 1 2 1 1 2 3 1 12 143 4 ' 4 3 ' 3 2 ' 2 1 ' 1
RR
R
R
R
R
R
R
BACK SUBSTITUTION
4
143
572
3
19
3
7
2
9
2
1
1
2
1
2
3
4 4 4 3 4 3 2 4 3 2 1
x
x
x
x
x
x
x
x
x
x
x
GAUSS - JOURDAN
39
7
4
3
22
3
4
2
15
2
3
1
6
1
5
0
8
1
2
0
15
2
3
1
' 1 3 ' 3 ' 1 2 ' 2 1 ' 13
2
R
R
R
R
R
R
R
R
14
2
7
0
0
4
2
1
1
0
15
2
1
0
1
' 2 3 ' 3 2 ' 2 ' 2 1 ' 15
2
3
R
R
R
R
R
R
R
R
6
1
5
0
8
1
2
0
15
2
3
1
14
2
7
0
0
4
2
1
1
0
15
2
1
0
1
4
1
0
0
2
0
1
0
1
0
0
1
2 7 3 ' 3 ' 3 2 ' 2 ' 3 1 ' 12
1
2
1
RR
R
R
R
R
R
R
WARNING..
6
5
5
901
.
3
3
099
.
2
6
7
7
10
3 2 1 1 2 3 2 1
x
x
x
x
x
x
x
x
Dua kemungkinan kesalahan
-Pembagian dengan nol mungkin terjadi pada langkah
forward elimination. Misalkan:
CONTOH
Dari sistem persamaan linear
5 1 5 6 099 . 2 3 0 7 10 3 2 1 x x x 6 901 . 3 7
=
Akhir dari Forward Elimination
15005
0
0
6
001
.
0
0
0
7
10
3 2 1x
x
x
15004 001 . 6 7=
6 901 . 3 7 5 1 5 6 099 . 2 3 0 7 10
15004
001
.
6
7
15005
0
0
6
001
.
0
0
0
7
10
KESALAHAN YANG MUNGKIN TERJADI
Back Substitution
99993
.
0
15005
15004
3
x
5
.
1
001
.
0
6
001
.
6
3 2
x
x
3500
.
0
10
0
7
7
2 3 1
x
x
x
15004
001
.
6
7
15005
0
0
6
001
.
0
0
0
7
10
3 2 1x
x
x
CONTOH KESALAHAN
Band
u
ng-kan solusi exact dengan hasil perhitungan
99993
.
0
5
.
1
35
.
0
3 2 1x
x
x
X
calculated
1
1
0
3 2 1x
x
x
X
exactIMPROVEMENTS
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
pk
a k pn,
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: nk k k kk
a
a
a
,
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 |a
kk| 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
6
5
5
901
.
3
6
099
.
2
3
7
7
10
3 2 1 3 2 1 2 1
x
x
x
x
x
x
x
x
Consider the system of equations
In matrix form
5
1
5
6
099
.
2
3
0
7
10
3 2 1x
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
5
1
5
6
099
.
2
3
0
7
10
3 2 1x
x
x
5
.
2
001
.
6
7
5
5
.
2
0
6
001
.
0
0
0
7
10
3 2 1x
x
x
PARTIAL PIVOTING: EXAMPLE
001 . 6 5 . 2 7 6 001 . 0 0 5 5 . 2 0 0 7 10 3 2 1 x x xForward 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
5
5
.
2
0
6
001
.
0
0
0
7
10
3 2 1x
x
x
PARTIAL PIVOTING: EXAMPLE
Forward Elimination: Step 2
Performing the Forward Elimination results in:
002
.
6
5
.
2
7
002
.
6
0
0
5
5
.
2
0
0
7
10
3 2 1x
x
x
PARTIAL PIVOTING: EXAMPLE
002
.
6
5
.
2
7
002
.
6
0
0
5
5
.
2
0
0
7
10
3 2 1x
x
x
Back Substitution
Solving the equations through back substitution
1
002
.
6
002
.
6
3
x
1
5
.
2
5
5
.
2
2 2
x
x
0
10
0
7
7
2 3 1
x
x
x
PARTIAL PIVOTING: EXAMPLE
1
1
0
3 2 1x
x
x
X
exact
1
1
0
3 2 1x
x
x
X
calculatedCompare the calculated and exact solution
The fact that they are equal is coincidence, but it does illustrate the advantage of Partial Pivoting