VECTORS
1
MATRICES
2
MATRICES
3
Determinant of a MATRICES
CISE301_Topic3
4
Adding and Multiplying Matrices
CISE301_Topic3
5
Systems of Linear Equations
CISE301_Topic3
6
Solutions of Linear Equations
CISE301_Topic3
7
Solutions of Linear Equations
CISE301_Topic3
8
Solutions of Linear Equations
CISE301_Topic3
9
Graphical Solution of Systems of�Linear Equations
CISE301_Topic3
10
Solution
x1=1, x2=2
Cramer’s Rule is Not Practical
CISE301_Topic3
11
Naive Gaussian Elimination
CISE301_Topic3
12
Elementary Row Operations
CISE301_Topic3
13
Example�Forward Elimination
CISE301_Topic3
14
Example�Forward Elimination
CISE301_Topic3
15
Example�Forward Elimination
CISE301_Topic3
16
Example�Backward Substitution
CISE301_Topic3
17
Forward Elimination
CISE301_Topic3
18
Forward Elimination
CISE301_Topic3
19
Backward Substitution
CISE301_Topic3
20
Naive Gaussian Elimination
CISE301_Topic3
21
Example 1
CISE301_Topic3
22
Example 1
CISE301_Topic3
23
Example 1�Backward Substitution
CISE301_Topic3
24
Determinant
CISE301_Topic3
25
How Many Solutions Does a System of Equations AX=B Have?
CISE301_Topic3
26
Examples
CISE301_Topic3
27
Pseudo-Code: Forward Elimination
Do k = 1 to n-1
Do i = k+1 to n
factor = ai,k / ak,k
Do j = k+1 to n
ai,j = ai,j – factor * ak,j
End Do
bi = bi – factor * bk
End Do
End Do
CISE301_Topic3
28
Pseudo-Code: Back Substitution
xn = bn / an,n
Do i = n-1 downto 1
sum = bi
Do j = i+1 to n
sum = sum – ai,j * xj
End Do
xi = sum / ai,i
End Do
CISE301_Topic3
29
Problems with Naive Gaussian Elimination
CISE301_Topic3
30
Example 2
CISE301_Topic3
31
Example 2�Initialization step
CISE301_Topic3
32
Scale vector:
disregard sign
find largest in magnitude in each row
Why Index Vector?
CISE301_Topic3
33
Example 2�Forward Elimination-- Step 1: eliminate x1
CISE301_Topic3
34
Example 2�Forward Elimination-- Step 1: eliminate x1
CISE301_Topic3
35
First pivot equation
Example 2�Forward Elimination-- Step 2: eliminate x2
CISE301_Topic3
36
Example 2�Forward Elimination-- Step 3: eliminate x3
CISE301_Topic3
37
Third pivot equation
Example 2�Backward Substitution
CISE301_Topic3
38
Example 3
CISE301_Topic3
39
Example 3�Initialization step
CISE301_Topic3
40
Example 3�Forward Elimination-- Step 1: eliminate x1
CISE301_Topic3
41
Example 3�Forward Elimination-- Step 1: eliminate x1
CISE301_Topic3
42
Example 3�Forward Elimination-- Step 2: eliminate x2
CISE301_Topic3
43
Example 3�Forward Elimination-- Step 2: eliminate x2
CISE301_Topic3
44
Example 3�Forward Elimination-- Step 3: eliminate x3
CISE301_Topic3
45
Example 3�Forward Elimination-- Step 3: eliminate x3
CISE301_Topic3
46
Example 3�Backward Substitution
CISE301_Topic3
47
How Do We Know If a Solution is Good or Not
Given AX=B
X is a solution if AX-B=0
Compute the residual vector R= AX-B
Due to rounding error, R may not be zero
CISE301_Topic3
48
How Good is the Solution?
CISE301_Topic3
49
Remarks:
CISE301_Topic3
50
Tridiagonal Systems
Tridiagonal Systems:
CISE301_Topic3
51
Tridiagonal Systems
CISE301_Topic3
52
Algorithm to Solve Tridiagonal Systems
CISE301_Topic3
53
Tridiagonal System
CISE301_Topic3
54
Diagonal Dominance
CISE301_Topic3
55
Diagonal Dominance
CISE301_Topic3
56
Diagonally Dominant Tridiagonal System
CISE301_Topic3
57
Solving Tridiagonal System
CISE301_Topic3
58
Example
CISE301_Topic3
59
Example
CISE301_Topic3
60
Example�Backward Substitution
CISE301_Topic3
61
Gauss-Jordan Method
CISE301_Topic3
62
Gauss-Jordan Method�Example
CISE301_Topic3
63
Gauss-Jordan Method�Example
CISE301_Topic3
64
Gauss-Jordan Method�Example
CISE301_Topic3
65
Gauss-Jordan Method�Example
CISE301_Topic3
66