Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Internal Assessment
December 6, 2016
Outline
2 Internal Assessment
Outline
2 Internal Assessment
In this Chapter
1 Solution of Linear Equations
Gauss Elimination Method
Gauss-Seidel Iterative Method
2 Eigenvalues and Eigenvectors
Computation of Eigenvalues and Eigenvectors of Matrices by
using Iterative Methods
vi − nk=i+1 uik xk
P
vn
xn = and xi = , for i = n−1, n−2, . . . , 1.
unn uii
Solve the system:
2x1 + x2 + x3 =10
3x1 + 2x2 + 3x3 =18
x1 + 4x2 + 9x3 =16
Let
2 1 1 10 x1
A = 3 2 3 , b = 18 , X = x2
1 4 9 16 x3
R2 ←R2 − pR1
= 3 2 3 − 23 × 2 32 × 1 3
2 ×1
= 3 2 3 − 3 32 23
= 3 − 3 2 − 32 3 − 23
= 0 12 32
For i = 3,
R3 ←R3 − pR1
= 1 4 9 − 12 × 2 12 × 1 1
2 ×1
= 1 4 9 − 1 12 12
= 1 − 1 4 − 12 9 − 12 )
= 0 72 17
2
b2 − a23 ∗ x3 (3 − 32 ∗ 5)
x2 = = 1
= −9
a22 2
b1 − (a12 ∗ x2 + a13 ∗ x3 ) 10 − (1 ∗ (−9) + 1 ∗ 5)
x1 = = =7
a11 1
x1 = 7, x2 = −9, x3 = 5
2x1 + 2x2 + x3 = 6
4x1 + 2x2 + 3x3 = 4
x1 − x2 + x3 = 0
2 2 1 6
Let A|b = 4 2 3 4. From the first column, we find that
1 −1 1 0
the pivot element (the largest absolute value element) is 4.
Interchanging the row
corresponding to this element with the first
4 2 3 4
row, we obtain A|b = 2 2 1 6.
1 −1 1 0
Dr. Sukanta Deb Matrices and Linear System of Equations
Matrices and Linear System of Equations
Internal Assessment
Eliminating the first variable from the second row onwards using
the elementaryrow operations of basic Gauss elimination method,
4 2 3 4
we get A|b = 0 1 − 21 10
3 . From the second row
3 1
0 −2 4 −1
onwards, the pivot element is searched in the second column. It
can be seen that it is − 23 . Interchanging the second row with the
4 2 3 4
pivot element row, A|b = 0 − 23 1
4 −1 . Eliminating the
1 10
0 1 −2 3
second variable from the second row onwards using thebasic Gauss
4 2 3 4
3 1
elimination method, we get A|b = 0 − 2
4 −1 .
1 10
0 0 −3 3
b2 − a23 ∗ x3
x2 = = −1
a22
b1 − (a12 ∗ x2 + a13 ∗ x3 )
x1 = =1
a11
Therefore, the required solution is
x1 = 9, x2 = −1, x3 = −10
Gauss-Seidel Method
The two most commonly used iterative methods for solving a set
of linear equations are:
jacobi’s method
Gauss-Seidel method
In the case of Jacobi’s method, the values of the unknowns are
updated when an iteration has completed. On the other hand, in
the case of Gauss-Seidel method, the values of the unknowns are
updated immediately without waiting for the iteration to complete.
These two methods are basically similar, having the same formula
for updating the values. Both methods require the coefficient
matrix of the system to be a special type of matrix called a
diagonally-dominant matrix. The difference between them lies in
the way updates are made: Gauss-Seidel uses the latest values of
the variables, whereas Jacobi does not use the latest values.
Gauss-Seidel Method
The difference between the Gauss-Seidel method and Jacobi
iteration is depicted in the following figure.
Diagonally-dominant Matrix
A square matrix A is said to be diagonally-dominant if the absolute
value of its diagonal element in each row is greater than the sum
of the absolute value of all other elements in the same row. This
condition is expressed as follows:
n
X
|aii | > |aij | , for i = 1, 2, . . . , n
j=1
j6=i
Diagonally-dominant Matrix
5 −1 3
The following matrix is diagonally-dominant: A = 2 −7 −1,
4 −2 8
since
Gauss-Seidel Method
Let us consider 3 × 3 set of equations:
a11 x1 + a12 x2 + a13 x3 = b1
a21 x1 + a22 x2 + a23 x3 = b2
a31 x1 + a32 x2 + a33 x3 = b3
If the diagonal elements aii 6= 0 (i = 1, 2, 3), the first equation can
be solved for x1 , the second for x2 and the third for x3 to yield
b1 − a12 x2 − a13 x3
x1 = (1)
a11
b2 − a21 x1 − a23 x3
x2 = (2)
a22
b3 − a31 x1 − a32 x2
x3 = (3)
a33
Now, we can start the solution process by choosing guesses for the
x’s.
Dr. Sukanta Deb Matrices and Linear System of Equations
Matrices and Linear System of Equations
Internal Assessment
Gauss-Seidel Method
A simple way to obtain initial guesses is to assume that they are all
zero, i.e., x1 = x2 = x3 = 0. These zeros (x2 = x3 = 0) can be
substituted into Equation (1), which can be used to calculate a
new value for x1 = b1 /a11 . Then, we substitute this new value of
x1 along with the previous guess of zero for x3 into Equation (2) to
compute a new value for x2 . The process is repeated for
Equation (3) to calculate a new estimate for x3 . Then we return to
the first equation and repeat the entire procedure until our solution
converges closely enough to the true values.
Note: Before applying the Gauss-Seidel method, please ensure
that the coefficient matrix A is diagonally-dominant,i.e.,
n
X
|aii | > |aij | , for i = 1, 2, . . . , n
j=1
j6=i
28x1 + 4x2 − x3 = 32
x1 + 3x2 + 10x3 = 24 (Not a diagonally-dominant matrix)
2x1 + 17x2 + 4x3 = 35
28x1 + 4x2 − x3 = 32
2x1 + 17x2 + 4x3 = 35 (Diagonally-dominant matrix)
x1 + 3x2 + 10x3 = 24
Iteration x1 x2 x3
0 0 0 0
1 1.1429 1.9244 1.7084
2 0.9290 1.5476 1.8428
3 0.9876 1.5090 1.8485
4 0.9933 1.5070 1.8486
5 0.9936 1.5070 1.8485
6 0.9936 1.5070 1.8485
Eigenvalue Problem
Let A = [aij ] be a square matrix of order n. Then, in the
eigenvalue problem, we wish to find a column vector X and a
constant λ such that
AX = λX,
where λ is called the eigenvalue and X is called the corresponding
eigenvector. The above matrix equations represent a set of n
homogeneous linear equations:
Eigenvalue Problem
Hence, we have
a11 − λ a12 a13 . . . a1n
a21 a 22 − λ a23 . . . a2n
=0
.. .. .. ..
. . . .
an1 an2 an3 . . . ann − λ
Eigenvalue Problem
For each eigenvalue λi , there exists a corresponding eigenvector Xi
such that
AXi = λXi
The eigenvalues λi may be either distinct (i.e., all different) or
repeated. The evaluation of eigenvalues in the case of repeated
roots is a much invloved process and will not be discussed here.
Find the eigenvalues and eigenvectors of the matrix
5 0 1
A = 0 −2 0
1 0 5
The characteristic equation is given by
|A − λI | = 0,
where I is the identity matrix.
Dr. Sukanta Deb Matrices and Linear System of Equations
Matrices and Linear System of Equations
Internal Assessment
Eigenvalue Problem
5 − λ 0 1
∴ 0 −2 − λ 0 = 0
1 0 5 − λ
⇒ λ1 = −2, λ2 = 4, λ3 = 6
AX1 = λ1 X1
⇒ (A − λ1 I )X1 = 0
Eigenvalue Problem
7 0 1 x1 0
⇒ 0 0 0 x2 = 0 which gives
1 0 7 x3 0
⇒ 7x1 + x3 = 0, x1 + 7x3 = 0
The solution is x1 = x3 = 0 with x2arbitrary.
Let us take x2 = 1.
0
Therefore, the eigenvector is X1 = 1
0
x1
λ2 = 4: Let the eigenvector be X2 = x2 . Thus, we have
x3
AX2 = λ2 X2
⇒ (A − λ2 I )X2 = 0
Dr. Sukanta Deb Matrices and Linear System of Equations
Matrices and Linear System of Equations
Internal Assessment
Eigenvalue Problem
1 0 1 x1 0
⇒ 0 −6 0 x2 = 0 which gives
1 0 1 x3 0
⇒ x1 + x3 = 0, − 6x2 = 0
Eigenvalue Problem
x1
λ3 = 6: Let the eigenvector be X3 = x2 . Thus, we have
x3
AX3 = λ3 X3
⇒ (A − λ3 I )X3 = 0
−1 0 1 x1 0
⇒ 0 −8 0 x2 = 0 which gives
1 0 −1 x3 0
⇒ −x1 + x3 = 0, − 8x2 = 0, x1 − x3 = 0
Eigenvalue Problem
Power Method
Determine the largest eigenvalue and the corresponding
eigenvector of the matrix
10 4 −1
A= 4 2 3
−1 3 1
to 2 correct decimal places using the power method.
1 T
Let the initial eigenvector be X0 = 1 = 1 1 1 .
1
T
Y1 = AX0 = 13 9 3
Y1 T
X1 = = 1 0.6923 0.2308
13
T
Y2 = AX1 = 12.5384 6.0770 1.3077
Dr. Sukanta Deb Matrices and Linear System of Equations
Matrices and Linear System of Equations
Internal Assessment
Power Method
Y2 T
X2 = = 1.0000 0.4847 0.1043
12.5384
T
Y3 = AX2 = 11.8345 5.2823 0.5584
Y3 T
X3 = = 1.0000 0.4463 0.0472
11.8345
T
Y4 = AX3 = 11.7380 5.0342 0.3861
Y4 T
X4 = = 1.0000 0.4289 0.0329
11.7380
T
Y5 = AX4 = 11.6827 4.9565 0.3196
Y5 T
X5 = = 1.0000 0.4243 0.0274
11.6827
Power Method
T
Y6 = AX5 = 11.6698 4.9308 0.3003
Y6 T
X6 = = 1.0000 0.4225 0.0257
11.6698
T
Y7 = AX6 = 11.6643 4.9221 0.2932
Y7 T
X7 = = 1.0000 0.4220 0.0251
11.6643
T
Y8 = AX7 = 11.6629 4.9193 0.2911
Y7 T
X8 = = 1.0000 0.4218 0.0250
11.6629
It follows that the largest eigenvalue in magnitude correct to 2
decimal places is 11.66 and the largest eigenvector is
T
1.00 0.42 0.02
Dr. Sukanta Deb Matrices and Linear System of Equations
Matrices and Linear System of Equations
Internal Assessment
Power Method
Determine the largest eigenvalue and the corresponding
eigenvector of the matrix
4 1 0
A = 1 20 1
0 1 4
to 3 correct decimal places using the power method.
1 T
Let the initial eigenvector be X0 = 1 = 1 1 1 .
1
T
Y1 = AX0 = 5 22 5
Y1 T
X1 = = 5/22 1 5/22
22
T
Y2 = AX1 = 21/11 225/11 21/11
Dr. Sukanta Deb Matrices and Linear System of Equations
Matrices and Linear System of Equations
Internal Assessment
Power Method
Y2 T
X2 = = 21/225 1 21/225
225/11
...
T
Y7 = AX6 = 1.24806 20.12412 1.24824
Y7 T
X7 = = 0.06202 1 0.06202
20.12412
T
Y8 = AX7 = 1.24806 20.12404 1.24806
Y8 T
X8 = = 0.06202 1 0.06202
20.12404
It follows that the largest eigenvalue in magnitude correct to 3
decimal places is 20.124 and the largest eigenvector is
T
0.06202 1 0.06202 .
Dr. Sukanta Deb Matrices and Linear System of Equations
Matrices and Linear System of Equations
Internal Assessment
Outline
2 Internal Assessment
3x1 + 5x2 + x3 = 5
3x1 + 5x2 − x3 = 2
6x1 − 2x2 − 3x3 = −1
A Quote
Nature is beautiful!
“The scientist does not study nature because it is
useful; he studies it because he delights in it, and he
delights in it because it is beautiful. If nature were
not beautiful, it would not be worth knowing, and if
nature were not worth knowing, life would not be
worth living.”
—Henri Poincaré.
Contact Me?
QPPPPPPRQPPPPPPRQPPPPPPRQPPPPPPRQPPPPPPRQPPPPPPRQPPPPPPRQPPPPPPRQPPPPPPR
QPPPPPPRQPPPPPPRQPPPPPPRQPPPPPPRQPPPPPPRQPPPPPPRQPPPPPPRQPPPPPPRQPPPPPPR