3. Determinan
Hanya untuk square matrices
Jika determinan = 0 matriks singular,
tidak punya invers
bcad
dc
ba
dc
ba
−≡≡
det
123213312132231321
321
321
321
det
cbacbacbacbacbacba
ccc
bbb
aaa
−+−+−≡
8. 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
9. 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
10. Ill-conditioned system of equations
A linear system
of equations is
said to be “ill-
conditioned” if
the coefficient
matrix tends to
be singular
11. 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
⇒
12. Gaussian Elimination
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
[ ][ ] [ ]CXA =
13. Forward Elimination
Tujuan Forward Elimination adalah untuk
membentuk matriks koefisien menjadi Upper
Triangular Matrix
7.000
56.18.40
1525
−−→
112144
1864
1525
14. Forward Elimination
Persamaan linear
n persamaan dengan n variabel yang tak diketahui
11313212111 ... bxaxaxaxa nn =++++
22323222121 ... bxaxaxaxa nn =++++
nnnnnnn bxaxaxaxa =++++ ...332211
. .
. .
. .
20. Warning..
Dua kemungkinan kesalahan
-Pembagian dengan nol mungkin terjadi pada langkah
forward elimination. Misalkan:
655
901.33099.26
7710
321
123
21
=+−
=−+
=−
xxx
xxx
xx
- Kemungkinan error karena round-off (pengulangan?)
22. Kesalahan yang mungkin terjadi
Back Substitution
99993.0
15005
15004
3 ==x
5.1
001.0
6001.6 3
2 −=
−
−
=
x
x
3500.0
10
077 32
1 −=
−+
=
xx
x
=
−
−
15004
001.6
7
1500500
6001.00
0710
3
2
1
x
x
x
23. 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
24. Improvements
Menambah jumlah angka penting
Mengurangi round-off error
Tidak menghindarkan pembagian dengan nol
Gaussian Elimination with Partial Pivoting
Menghindarkan pembagian dengan nol
Mengurangi round-off error
25. Pivoting
pka
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, ,npk ≤≤
Maka tukar baris p dan k.
26. 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 selalu mengecek apakah angka diagonalnya
memberikan nilai absolut terbesar
27. Partial Pivoting: Example
Consider the system of equations
655
901.36099.23
7710
321
321
21
=+−
=++−
=−
xxx
xxx
xx
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
28. 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
29. Partial Pivoting: Example
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
⇒
=
−
−
001.6
5.2
7
6001.00
55.20
0710
3
2
1
x
x
x
Performing the row swap
31. Partial Pivoting: Example
Back Substitution
Solving the equations through back substitution
1
002.6
002.6
3 ==x
1
5.2
55.2 2
2 =
−
=
x
x
0
10
077 32
1 =
−+
=
xx
x
=
−
002.6
5.2
7
002.600
55.20
0710
3
2
1
x
x
x
32. 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