Anda di halaman 1dari 45

http://istiarto.staff.ugm.ac.

id

SISTEM PERSAMAAN LINEAR


Systems of Linear Algebraic Equations
Sistem Persamaan Linear
2 http://istiarto.staff.ugm.ac.id

q Acuan
q Chapra, S.C., Canale R.P., 1990, Numerical Methods for Engineers,
2nd Ed., McGraw-Hill Book Co., New York.
n Chapter 7, 8, dan 9, hlm. 201-290.
Sistem Persamaan Linear
3 http://istiarto.staff.ugm.ac.id

q Serangkaian n persamaan linear:


a11x1 + a12 x2 + ... + a1n xn = c1
a21x1 + a22 x2 + ... + a2n xn = c2 Sejumlah n persamaan linear
. ini harus diselesaikan secara
simultan untuk mendapatkan
. x1, x2,, xn yang memenuhi
. setiap persamaan tsb.
a1n x1 + a2n x2 + ... + a nn xn = c n
Metode Penyelesaian
4 http://istiarto.staff.ugm.ac.id

Jml. pers. sedikit, n Jml. pers. banyak, n


q Penyelesaian q Penyelesaian langsung
q Grafis q Eliminasi Gauss
q Cramer q Gauss-Jordan
q Eliminasi q Iteratif
q Jacobi
q Gauss-Seidel
q Successive Over Relaxation
Metode Grafis
5 http://istiarto.staff.ugm.ac.id

x2

x2 =

x1
x1 =
Metode Grafis
6 http://istiarto.staff.ugm.ac.id

x2 hampir sejajar x2 berimpit x2 sejajar

x1 x1 x1
ill-conditioned system singular system singular system
Metode Cramer
7 http://istiarto.staff.ugm.ac.id

q Variabel tak diketahui, xi, merupakan perbandingan dua determinan


matriks
q Penyebut : determinan, D, matriks koefisien sistem persamaan
q Pembilang : determinan matriks koefisien sistem persamaan seperti penyebut,
namun koefisien kolom ke i diganti dengan koefisien ci
q Contoh
q 3 persamaan linear a11x1 + a12 x2 + a13 x3 = c1
a21x1 + a22 x2 + a23 x3 = c2
a31x1 + a32 x2 + a33 x3 = c3
Metode Cramer
8 http://istiarto.staff.ugm.ac.id

a11 a12 a13 a11 a12 a13


[A] = A = a21 a22 a23 D = det A = a21 a22 a23
a31 a32 a33 a31 a32 a33

c1 a12 a13 a11 c1 a13 a11 a12 c1


c2 a22 a23 a21 c2 a23 a21 a22 c2
c3 a23 a33 a31 c3 a33 a31 a23 a3
x1 = x2 = x3 =
D D D
Determinan Matriks
9 http://istiarto.staff.ugm.ac.id

q Matriks bujur sangkar: n n


q Mencari determinan matriks
q Hitungan manual
q MSExcel, dengan fungsi =MDETERM()
q Contoh hitungan determinan matriks 2 2 dan 3 3
a11 a12 a13
a a
[A] = A = 11 12 [B] = B = a21 a22 a23
a21 a22 a31 a32 a33
Determinan Matriks
10 http://istiarto.staff.ugm.ac.id

a11 a12
D = det A = = a11a22 a12 a21
a21 a22

a11 a12 a13


a a23 a21 a23 a21 a22
D = det B = a21 a22 a23 = a11 22 a12 + a13
a32 a33 a31 a33 a31 a32
a31 a32 a33

= a11(a22 a33 a23 a32 ) a12 (a21a33 a23 a31 ) + a13 (a21a32 a22 a31 )
Metode Cramer
11 http://istiarto.staff.ugm.ac.id

q Contoh: 3 persamaan linear AX = C


3x1 0.1x2 0.2x3 = 7.85 3 0.1 0.2 x1 7.85
0.1 7 0. 3 x = 19.3
0.1x1 + 7 x2 0.3x3 = 19.3 2
0.3x1 0.2x2 + 10x3 = 71.4 0.3 0.2 10 x3 71.4

det A = (3)[(7 )(10) ( 0.3)( 0.2)] ( 0.1)[(0.1)(10) ( 0.3)(0.3)] +


( 0.2)[(0.1)( 0.2) (7 )(0.3)]
= 210.353
Metode Cramer
12 http://istiarto.staff.ugm.ac.id

7.85 0.1 0.2 3 7.85 0.2 3 0.1 7.85


[A1] = 19.3 7 0.3 [A2 ] = 0.1 19.3 0.3
[A3 ] = 0.1 7 19.3
71.4 0.2 10 0.3 71.4 10 0.3 0.2 71.4

det A1 = A1 = 631.059 det A2 = A2 = 525.883 det A3 = A3 = 1472.471

det A1 631.059 det A2 525.883 det A 3 1472.471


x1 = = =3 x2 = = = 2.5 x3 = = =7
det A 210.353 det A 210.353 det A 210.353
Metode Eliminasi
13 http://istiarto.staff.ugm.ac.id

q Contoh: 2 persamaan linear


a11x1 + a12 x2 = c1 a21 [a11x1 + a12 x2 = c1] a11a21x1 + a12 a21x2 = c1a21
a21x1 + a22 x2 = c1 a11 [a21x1 + a22 x2 = c2 ] a21a11x1 + a22 a11x2 = c2a11

a22a11x2 a12a21x2 = c2a11 c1a21


c2a11 c1a21
x2 =
a22 a11 a12 a21
c2a22 c1a12
x1 =
a22 a11 a12 a21
Eliminasi Gauss
14 http://istiarto.staff.ugm.ac.id

q Strategi
q Forward elimination
q Back substitution
q Contoh
q 3 persamaan linear a11x1 + a12 x2 + a13 x3 = c1 (1)
a21x1 + a22 x2 + a23 x3 = c2 (2)

a31x1 + a32 x2 + a33 x3 = c3 (3)


Eliminasi Gauss
15 http://istiarto.staff.ugm.ac.id

q Forward elimination #1
q Hilangkan x1 dari pers. kedua dan ketiga dengan operasi perkalian koefisien dan
pengurangan dengan pers. pertama.
pivot equation
pivot coefficient
a11x1 + a12 x2 + a13 x3 = c1
a a a a11x1 + a12 x2 + a13 x3 = c1 (1)
a22 21 a12 x2 + a23 21 a13 x3 = c2 21 c1
a11 a11 a11 a22
x2 + a23
x3 = c2 (2')
a a a a32
x2 + a33
x3 = c3 (3')
a32 31 a12 x2 + a33 31 a13 x3 = c3 31 c1
a11 a11 a11
Eliminasi Gauss
16 http://istiarto.staff.ugm.ac.id

q Forward elimination #2
q Hilangkan x2 dari pers. ketiga dengan operasi perkalian koefisien dan
pengurangan dengan pers. kedua.

pivot coefficient
pivot equation
a11x1 + a12 x2 + a13 x3 = c1
a11x1 + a12 x2 + a13 x3 = c1 (1)
a22
x2 + a23
x3 = c2
a22
x2 + a23
x3 = c2 (2')
a a
32 a23
a33 x3 = c3 32 c2 a33
x3 = c3 (3'')
a22
a22

Eliminasi Gauss
17 http://istiarto.staff.ugm.ac.id

q Back substitution
q Hitung x3 dari pers. (3''), hitung x2 dari pers. (2), dan x1 dari pers. (1)

c3 c2 a23 x3 c1 a12 x2 a13 x3


x3 = x2 = x1 =
a33
a22
a11
Eliminasi Gauss
18 http://istiarto.staff.ugm.ac.id

q Forward elimination q Back substitution


a11x1 + a12 x2 + a13 x3 + ... + a1n xn = c1 c nn 1
x n = n 1
a22
x2 + a23
x3 + ... + a2 n xn = c2 a nn
a23
x3 + ... + a2n xn = c2
c ii 1 a i 1
ij x j
. j = i +1
xi = i 1
, i = n 1, n 2,...,1
. a ii

.
a nnn 1xn = c nn 1
Eliminasi Gauss
19 http://istiarto.staff.ugm.ac.id

q Contoh: 3 persamaan linear


(1) 3x1 0.1x2 0.2x3 = 7.85
(2) 0.1x1 + 7 x2 0.3x3 = 19.3
(3) 0.3x1 0.2x2 + 10x3 = 71.4
Eliminasi Gauss
20 http://istiarto.staff.ugm.ac.id

q Forward elimination
q Eliminasi x2 dari Pers. 2 dan 3, Pers. 1 sebagai pivot
(1) 3x1 0.1x2 0.2x3 = 7.85
(2) 0x1 + 7.0033x2 0.2933x3 = 19.5617
(3) 0x1 0.19x2 + 10.02x3 = 70.615
q Eliminasi x3 dari Pers. 3, Pers. 2 sebagai pivot
(1) 3x1 0.1x2 0.2x3 = 7.85
(2) 0x1 + 7.0033x2 0.2933x3 = 19.5617
(3) 0x1 + 0x2 + 10.0120x3 = 70.0843
Eliminasi Gauss
21 http://istiarto.staff.ugm.ac.id

q Back substitution
q Menghitung x3 dari Pers. 3''
70.0843
x3 = =7
10.0120

q Substitusi x3 ke Pers. 2' untuk menghitung x2


19.5617 + 0.2933 (7 )
x2 = = 2.5
7.0033
q Substitusi x3 dan x2 ke Pers. 1 untuk menghitung x1
7.85 + 0.2 (7 ) + 0.1( 2.5)
x1 = =3
3
Metode Eliminasi
22 http://istiarto.staff.ugm.ac.id

q Strategi
q Eliminasi variabel tak diketahui, xi, dengan penggabungan dua persamaan.
q Hasil eliminasi adalah satu persamaan yang dapat diselesaikan untuk
mendapatkan satu variabel xi.
Kelemahan Metode Eliminasi
23 http://istiarto.staff.ugm.ac.id

q Pembagian dengan nol


q Pivot coefficient sama dengan nol ataupun sangat kecil.
q Pembagian dengan nol dapat terjadi selama proses eliminasi ataupun substitusi.
q Round-off errors
q Selama proses eliminasi maupun substitusi, setiap langkah hitungan bergantung pada
langkah hitungan sebelumnya dan setiap kali terjadi kesalahan; kesalahan dapat
berakumulasi, terutama apabila jumlah persamaan sangat banyak.
q Ill-conditioned systems
q Ill-condition adalah situasi dimana perubahan kecil pada satu atau beberapa
koefisien berakibat perubahan yang besar pada hasil hitungan.
Perbaikan
24 http://istiarto.staff.ugm.ac.id

q Pemilihan pivot (pivoting)


q Urutan persamaan dipilih sedemikian hingga yang menjadi pivot equation
adalah persamaan yang memberikan pivot coefficient terbesar.
Metode Penyelesaian
25 http://istiarto.staff.ugm.ac.id

q Matriks Inversi
q Gauss-Jordan
q Metode Iteratif
q Jacobi
q Gauss-Seidel
Metode Gauss-Jordan
26 http://istiarto.staff.ugm.ac.id

q Mirip dengan metode eliminasi Gauss, tetapi tidak diperlukan back


substitution.
q Contoh
q 3 persamaan linear 3x1 0.1x2 0.2x3 = 7.85
0.1x1 + 7 x2 0.3x3 = 19.3
0.3x1 0.2x2 + 10x3 = 71.4
Metode Gauss-Jordan
27 http://istiarto.staff.ugm.ac.id

3 0.1 0.2 7.85 1 0.0333 0.0667 2.6167



0.1 7 0.3 19.3 0.1 7 0.3 19.3
0.3 0.1 10 71.4 0.3 0.1 10 71.4

3 3 0.1 3 0.2 3 7.85 3 1 0.0333 0.0667 2.6167



0.1 7 0.3 19.3 0 7.0033 0.2933 19.5617
0.3 0.1 10 71.4 0 0.1900 10.0200 70.6150
Metode Gauss-Jordan
28 http://istiarto.staff.ugm.ac.id

1 0.0333 0.0667 2.6167



0 7.0033 0.2933 19.5617
0 0.1900 10.0200 70.6150

1 0.0333 0.0667 2.6167



0 / 7.0033 7.0033 / 7.0033 0.2933 / 7.0033 19.5617 / 7.0033
0 0.1900 10.0200 70.6150

1 0.0333 0.0667 2.6167 1 0 0.0681 2.5236



0 1 0.0419 2.7931 0 1 0.0419 2.7931
0 0.1900 10.0200 70.6150 0 0 10.0120 70.0843
Metode Gauss-Jordan
29 http://istiarto.staff.ugm.ac.id

1 0 0.0681 2.5236

0 1 0 .0419 2.7931
0 / 10.0120 0 / 10.0120 10.0120 / 10.0120 70.0843 / 10.0120

1 0 0.0681 2.5236 1 0 0 3 x1 3

0 1 0.0419 2.7931 0 1 0 2.5 x2 = 2.5
0 0 1 7 0 0 1 7 x 7
3
Gauss-Jordan vs Eliminasi Gauss
30 http://istiarto.staff.ugm.ac.id

q Metode Gauss-Jordan
q Jumlah operasi lebih banyak (50%)
q Memiliki kelemahan yang sama dengan eliminasi Gauss
n Pembagian dengan nol
n Round-off error
Matriks Inversi
31 http://istiarto.staff.ugm.ac.id

[A] {X} = {C} {X} = [A] {C}


1

1 1 1
a11 a12 a13 1 0 0 1 0 0 a11 a12 a13
1 1 1
a
21 22a a 23 0 1 0 0 1 0 a 21 a 22 a 23
1 1 1
a31 a31 a33 0 0 1 0 0 1 a31 a32 a33

Matriks Inversi
32 http://istiarto.staff.ugm.ac.id

q Contoh: 3 persamaan linear


(1) 3x1 0.1x2 0.2x3 = 7.85
(2) 0.1x1 + 7 x2 0.3x3 = 19.3
(3) 0.3x1 0.2x2 + 10x3 = 71.4
Matriks Inversi
33 http://istiarto.staff.ugm.ac.id

3 0.1 0.2 1 0 0 1 0.0333 0.0667 0.3333 0 0


[A] = 0.1 7 0.3 0 1 0 [A] = 0.1 7 0.3 0 1 0
0.3 0.2 10 0 0 1 0.3 0.2 10 0 0 1

1 0.0333 0.0667 0.3333 0 0


[A] = 0 7.0033 0.2933 0.0333 1 0
0 0.1900 10.0200 0.0999 0 1
Matriks Inversi
34 http://istiarto.staff.ugm.ac.id

1 0.0333 0.0667 0.3333 0 0


[A] = 0 1 0.0417 0.0047 0.1422 0
0 0.1900 10.0200 0.0999 0 1

1 0 0.0681 0.3318 0.0047 0


[A] = 0 1 0.0417 0.0047 0.1422 0
0 0 10.0121 0.1009 0.0270 1
Matriks Inversi
35 http://istiarto.staff.ugm.ac.id

1 0 0.0681 0.3318 0.0047 0


[A] = 0 1 0.0417 0.0047 0.1422 0
0 0 1 0.0101 0.0027 0.0999

1 0 0 0.3325 0.0049 0.0068


[A] = 0 1 0 0.0052 0.1423 0.0042
0 0 1 0.0101 0.0027 0.0999

[A]1
Matriks Inversi
36 http://istiarto.staff.ugm.ac.id

{X} = [A]1 {C}

x1 0.3325 0.0049 0.0068 7.85


0.0052 0.1423 0.0042 19.3
x2 =
x 0.0101 0.0027 0.0999 71.4
3

x1 3.0004

x =
2 2. 4881
x 7.0002
3
Metode Iteratif: Jacobi
37 http://istiarto.staff.ugm.ac.id

a11x1 + a12 x2 + a13 x3 = c1 x10 = 0 nilai awal,


a21x1 + a22 x2 + a23 x3 = c2 x20 = 0 biasanya xi0 = 0 iterasi diteruskan
sampai konvergen
a31x1 + a32 x2 + a33 x3 = c3 x30 = 0 xin+1 xin, xi

c a x a13 x3 c1 a12 x20 a13 x30 c1 a12 x2n a13 x3n


x1 = 1 12 2 1
x =
1
n +1
x
1 =
a11 a11 a11
c a21x1 a23 x3 c2 a21x10 a23 x30 c2 a21x1n a23 x3n
x2 = 2 1
x = x n +1
=
a22 2
a22
2
a22
c3 a31x1 a32 x2 c3 a31x10 a32 x20 c3 a31x1n a32 x2n
x3 = 1
x = x n +1
=
a33 3
a33
3
a33
Metode Iteratif: Jacobi
38 http://istiarto.staff.ugm.ac.id

q Contoh: 3 persamaan linear


(1) 3x1 0.1x2 0.2x3 = 7.85
(2) 0.1x1 + 7 x2 0.3x3 = 19.3
(3) 0.3x1 0.2x2 + 10x3 = 71.4
Metode Iteratif: Gauss-Seidel
39 http://istiarto.staff.ugm.ac.id

1 c1 a12 x20 a13 x30 n +1 c1 a12 x2n a13 x3n


x =
1 x1 =
a11 a11
1 0 n +1 n
iterasi diteruskan
c2 a x a x c2 a x a x sampai konvergen
x12 = 21 1 23 3
x2n +1 = 21 1 23 3
a22 a22 xin+1 xin, xi
1 c3 a31x11 a32 x12 n +1 c3 a31x1n +1 a32 x2n +1
x =
3 x 3 =
a33 a33
Metode Iteratif: Gauss-Seidel
40 http://istiarto.staff.ugm.ac.id

q Contoh: 3 persamaan linear


(1) 3x1 0.1x2 0.2x3 = 7.85
(2) 0.1x1 + 7 x2 0.3x3 = 19.3
(3) 0.3x1 0.2x2 + 10x3 = 71.4
Jacobi vs Gauss-Seidel
41 http://istiarto.staff.ugm.ac.id

Jacobi Gauss-Seidel

(
x11 = c1 a12 x20 a13 x30 a11 ) (
x11 = c1 a12 x20 a13 x30 a11 )
x12 = (c 2 a21x10 a23 x )a
0
3 22 x12 = (c 2 a21x11 a23 x )a
0
3 22

x13 = (c 3 a31x10 a32 x )a


0
2 33 x13 = (c 3 a31x11 a32 x )a
1
2 33

(
x12 = c1 a12 x12 a13 x13 a11 ) (
x12 = c1 a12 x12 a13 x13 a11 )
x22 = (c 2 a21x11 a23 x )a
1
3 22 x22 = (c 2 a21x12 a23 x )a
1
3 22

x32 = (c 3 a31x11 a32 x )a


1
2 33 x32 = (c 3 a31x12 a32 x )a
2
2 33
Successive Over-relaxation Method
42 http://istiarto.staff.ugm.ac.id

q Dalam setiap iterasi, nilai variabel terbaru (yang baru saja dihitung), xn+1,
tidak langsung dipakai pada iterasi selanjutnya
q Pada iterasi selanjutnya, nilai tsb dimodifikasi dengan memasukkan pengaruh
nilai variabel lama (pada iterasi sebelumnya), xn

x1new = xin +1 + (1 ) xin

q faktor relaksasi dimaksudkan untuk mempercepat konvergensi hitungan (iterasi)


q under-relaxation: 0 < < 1

q over-relaxation: 1<<2
Successive Over-relaxation Method
43 http://istiarto.staff.ugm.ac.id

n n
c a x a x
x1n +1 = 1 12 2 13 3
a11

x n +1
=
[ ]
c2 a21 x1n +1 + (1 ) x1n a23 x3n
2
a22

x n +1
=
[ ] [
c3 a31 x1n +1 + (1 ) x1n a32 x2n +1 + (1 ) x2n ]
3
a33
Successive Over-relaxation Method
44 http://istiarto.staff.ugm.ac.id

q Contoh: 3 persamaan linear


(1) 3x1 0.1x2 0.2x3 = 7.85
(2) 0.1x1 + 7 x2 0.3x3 = 19.3
(3) 0.3x1 0.2x2 + 10x3 = 71.4
45 http://istiarto.staff.ugm.ac.id

Anda mungkin juga menyukai