0% found this document useful (0 votes)
18 views16 pages

PHY477 Lecture Material02

The book of reservior
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views16 pages

PHY477 Lecture Material02

The book of reservior
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

a11 a12 a1n b1

a 21 a22 a2n b2
[A|b] =
an1 an 2 ann bn

We define the following.


(i) The system of equations (1.33) is consistent (has at least one solution), if
rank (A) = rank [A | b] = r.
If r = n, then the system has unique solution.
If r < n, then the system has (n – r) parameter family of infinite number of solutions.
(ii) The system of equations (1.33) is inconsistent (has no solution) if
rank (A) rank [A | b].
We assume that the given system is consistent.
The methods of solution of the linear algebraic system of equations (1.33) may be
classified as direct and iterative methods.
(a) Direct methods produce the exact solution after a finite number of steps (disregarding the
round-off errors). In these methods, we can determine the total number of operations (addi-
tions, subtractions, divisions and multiplications). This number is called the operational count
of the method.
(b) Iterative methods are based on the idea of successive approximations. We start with an
initial approximation to the solution vector x = x 0, and obtain a sequence of approximate
vectors x0, x1, ..., xk, ..., which in the limit as k , converge to the exact solution vector x.
Now, we derive some direct methods.

If the system of equations has some special forms, then the solution is obtained directly.
We consider two such special forms.
(a) Let A be a diagonal matrix, A = D. That is, we consider the system of equations
Dx = b as
a11x 1 = b1
a22x 2 = b2
... ... ... ... (1.34)
an–1, n – 1 xn– 1 = bn–1
annxn = bn
This system is called a diagonal system of equations. Solving directly, we obtain
bi
xi = , aii 0, i = 1, 2, ..., n. (1.35)
aii
(b) Let A be an upper triangular matrix, A = U. That is, we consider the system of
equations Ux = b as
a11x1 + a12x2 + ... ... + a1n xn = b1
a22x2 + ... ... + a2n xn = b2
... ... ... ... (1.36)
an–1, n–1 xn–1 + an–1, n xn = bn–1
annxn = bn
This system is called an upper triangular system of equations. Solving for the unknowns
in the order xn, xn–1, ..., x1, we get
xn = bn/ann,
xn–1 = (bn–1 – an–1, n xn)/an–1, n–1,
... ... ... ...

n
b1 a1, j x j n
j 2
x1 = = b1 a1, j x j a11 (1.37)
a11 j 2

The unknowns are obtained by back substitution and this procedure is called the back
substitution method.
Therefore, when the given system of equations is one of the above two forms, the solution
is obtained directly.
Before we derive some direct methods, we define elementary row operations that can be
performed on the rows of a matrix.
Elementary row transformations (operations) The following operations on the rows of a
matrix A are called the elementary row transformations (operations).
(i) Interchange of any two rows. If we interchange the ith row with the jth row, then we
usually denote the operation as Ri Rj.
(ii) Division/multiplication of any row by a non-zero number p. If the ith row is multiplied by
p, then we usually denote this operation as pRi.
(iii) Adding/subtracting a scalar multiple of any row to any other row. If all the elements of
the jth row are multiplied by a scalar p and added to the corresponding elements of the ith
row, then, we usually denote this operation as Ri Ri + pR j. Note the order in which the
operation Ri + pRj is written. The elements of the jth row remain unchanged and the elements
of the ith row get changed.
These row operations change the form of A, but do not change the row-rank of A. The
matrix B obtained after the elementary row operations is said to be row equivalent with A. In
the context of the solution of the system of algebraic equations, the solution of the new system
is identical with the solution of the original system.
The above elementary operations performed on the columns of A (column C in place of
row R) are called elementary column transformations (operations). However, we shall be using
only the elementary row operations.
In this section, we derive two direct methods for the solution of the given system of
equations, namely, Gauss elimination method and Gauss-Jordan method.

1.2.2.1 Gauss Elimination Method


The method is based on the idea of reducing the given system of equations Ax = b, to an
upper triangular system of equations Ux = z, using elementary row operations. We know that
these two systems are equivalent. That is, the solutions of both the systems are identical. This
reduced system Ux = z, is then solved by the back substitution method to obtain the solution
vector x.
We illustrate the method using the 3 × 3 system
a11x1 + a12x2 + a13 x3 = b1
a21x1 + a22 x2 + a23 x3 = b2 (1.38)
a31x1 + a32 x2 + a33 x3 = b3
We write the augmented matrix [A | b] and reduce it to the following form
Gauss elimination
[A|b] [U|z]
The augmented matrix of the system (1.38) is

a11 a12 a13 b1


a21 a22 a 23 b2 (1.39)
a31 a32 a33 b3
First stage of elimination

We assume a11 0. This element in the 1 × 1 position is called the first pivot. We use
this pivot to reduce all the elements below this pivot in the first column as zeros. Multiply the
first row in (1.39) by a21/a11 and a31/a11 respectively and subtract from the second and third
rows. That is, we are performing the elementary row operations R2 – (a 21/a11)R1 and
R3 –(a31/a11)R1 respectively. We obtain the new augmented matrix as

a11 a12 a13 b1


(1) (1)
0 a22 a23 b2(1) (1.40)
(1) (1)
0 a32 a33 b3(1)

(1) a21 a21 a21


where a22 = a22 – a , a (1) = a23 – a13, b2(1) = b2 – b ,
a11 12 23 a11 a11 1

(1)
a31 a31 a31
a32 = a32 – a , a (1) = a33 – a , b(1) = b 3 – b.
a11 12 33 a11 13 3 a11 1

Second stage of elimination


(1) (1)
We assume a22 0 . This element a22 in the 2 × 2 position is called the second pivot.
We use this pivot to reduce the element below this pivot in the second column as zero. Multi-
(1) (1)
ply the second row in (1.40) by a32 / a22 and subtract from the third row. That is, we are
(1) (1)
performing the elementary row operation R3 – ( a32 / a22 )R2. We obtain the new augmented
matrix as
a11 a12 a13 b1
(1) (1)
0 a22 a23 b2(1) (1.41)
(2)
0 0 a33 b3( 2)

(1) (1)
( 2) (1) a32 (1) a32
where a33 a33 (1)
a23 , b3( 2) b3(1) (1)
b2(1) .
a22 a22

( 2)
The element a33 0 is called the third pivot. This system is in the required upper
triangular form [U|z]. The solution vector x is now obtained by back substitution.

From the third row, we get x3 = b3( 2) / a33


(2)
.

From the second row, we get x2 = (b2(1) (1)


a 23 (1) .
x 3 )/ a 22
From the first row, we get x1 = (b1 – a12x2 – a13 x3)/a11.
In general, using a pivot, all the elements below that pivot in that column are made zeros.
Alternately, at each stage of elimination, we may also make the pivot as 1, by dividing
that particular row by the pivot.
Remark 15 When does the Gauss elimination method as described above fail? It fails when
any one of the pivots is zero or it is a very small number, as the elimination progresses. If a
pivot is zero, then division by it gives over flow error, since division by zero is not defined. If a
pivot is a very small number, then division by it introduces large round-off errors and the
solution may contain large errors.
For example, we may have the system
2x2 + 5x3 = 7
7x1 + x2 – 2x3 = 6
2x1 + 3x2 + 8x3 = 13
in which the first pivot is zero.
Pivoting Procedures How do we avoid computational errors in Gauss elimination? To avoid
computational errors, we follow the procedure of partial pivoting. In the first stage of
elimination, the first column of the augmented matrix is searched for the largest element in
magnitude and brought as the first pivot by interchanging the first row of the augmented
matrix (first equation) with the row (equation) having the largest element in magnitude. In
the second stage of elimination, the second column is searched for the largest element in
magnitude among the n – 1 elements leaving the first element, and this element is brought as
the second pivot by interchanging the second row of the augmented matrix with the later row
having the largest element in magnitude. This procedure is continued until the upper triangular
system is obtained. Therefore, partial pivoting is done after every stage of elimination. There
is another procedure called complete pivoting. In this procedure, we search the entire matrix
A in the augmented matrix for the largest element in magnitude and bring it as the first pivot.
This requires not only an interchange of the rows, but also an interchange of the positions of
the variables. It is possible that the position of a variable is changed a number of times during
this pivoting. We need to keep track of the positions of all the variables. Hence, the procedure
is computationally expensive and is not used in any software.
Remark 16 Gauss elimination method is a direct method. Therefore, it is possible to count
the total number of operations, that is, additions, subtractions, divisions and multiplications.
Without going into details, we mention that the total number of divisions and multiplications
(division and multiplication take the same amount of computer time) is n (n2 + 3n – 1)/3. The
total number of additions and subtractions (addition and subtraction take the same amount of
computer time) is n (n – 1)(2n + 5)/6.
Remark 17 When the system of algebraic equations is large, how do we conclude that it is
consistent or not, using the Gauss elimination method? A way of determining the consistency
is from the form of the reduced system (1.41). We know that if the system is inconsistent then
rank (A) rank [A|b]. By checking the elements of the last rows, conclusion can be drawn
about the consistency or inconsistency.
(2)
Suppose that in (1.41), a33 0 and b3( 2 ) 0. Then, rank (A) = rank [A|b] = 3. The
system is consistent and has a unique solution.
Suppose that we obtain the reduced system as

a11 a12 a13 b1


( 1) (1)
0 a22 a23 b2( 1) .
0 0 0 b3( 2)

Then, rank (A) = 2, rank [A|b] = 3 and rank (A) rank [A|b]. Therefore, the system is
inconsistent and has no solution.
Suppose that we obtain the reduced system as
a11 a12 a13 b1
(1) ( 1)
0 a22 a23 b2( 1) .
0 0 0 0
Then, rank (A) = rank [A|b] = 2 < 3. Therefore, the system has 3 – 2 = 1 parameter
family of infinite number of solutions.
Example 1.13 Solve the system of equations
x1 + 10x2 – x3 = 3
2x1 + 3x2 + 20x3 = 7
10x1 – x2 + 2x3 = 4
using the Gauss elimination with partial pivoting.
Solution We have the augmented matrix as

1 10 1 3
2 3 20 7
10 1 2 4
We perform the following elementary row transformations and do the eliminations.

10 1 2 4
R1 R3 : 2 3 20 7 . R2 – (R1/5), R3 – (R1/10) :
1 10 1 3

10 1 2 4 10 1 2 4
0 3.2 19.6 6.2 . R2 R3 : 0 101
. 1.2 2.6 .
0 101. 1.2 2.6 0 3.2 19.6 6.2

10 1 2 4
R3 – (3.2/10.1)R2 : 0 101
. 1.2 2.6 .
0 0 19.98020 537624
.

Back substitution gives the solution.


5.37624
Third equation gives x3 = = 0.26908.
19.98020
1 1
Second equation gives x2 = (2.6 + 1.2x3) = (2.6 + 1.2(0.26908)) = 0.28940.
10.1 10.1

1 1
First equation gives x1 = (4 + x2 – 2x3) = (4 + 0.2894 – 2(0.26908)) = 0.37512.
10 10
Example 1.14 Solve the system of equations
2x1 + x2 + x3 – 2x4 = – 10
4x1 + 2x3 + x4 = 8
3x1 + 2x2 + 2x3 = 7
x1 + 3x2 + 2x3 – x4 = – 5
using the Gauss elimination with partial pivoting.
Solution The augmented matrix is given by

2 1 1 2 10
4 0 2 1 8
.
3 2 2 0 7
1 3 2 1 5
We perform the following elementary row transformations and do the eliminations.

4 0 2 1 8
2 1 1 2 10
R1 R2 : . R2 – (1/2) R1, R3 – (3/4) R1, R4 – (1/4) R1:
3 2 2 0 7
1 3 2 1 5
4 0 2 1 8 4 0 2 1 8
0 1 0 5/2 14 . R
2 R4: 0 3 3/ 2 5/ 4 7 .
0 2 1/ 2 3/4 1 0 2 1/ 2 3/ 4 1
0 3 3/ 2 5/4 7 0 1 0 5/ 2 14

4 0 2 1 8
R3 – (2/3) R2, R4 – (1/3)R2: 0 3 3/2 5/ 4 7 .R –R :
4 3
0 0 1/ 2 1/ 12 17 / 3
0 0 1/ 2 25 / 12 35 / 3

4 0 2 1 8
0 3 3/2 5/4 7
.
0 0 1/ 2 1/ 12 17 / 3
0 0 0 13 / 6 52 / 3

Using back substitution, we obtain

52 6 17 1 17 1
x4 = = 8, x3 = – 2 x3 =–2 ( 8) = – 10,
3 13 3 12 3 12

1 3 5 1 3 5
x2 = 7 x3 x4 7 ( 10) ( 8) = 6,
3 2 4 3 2 4

1 1
x1 = [8 – 2x3 – x4] = [8 – 2(– 10) – 8] = 5.
4 4
Example 1.15 Solve the system of equations
3x1 + 3x2 + 4x3 = 20
2x1 + x2 + 3x3 = 13
x1 + x2 + 3x3 = 6
using the Gauss elimination method.
Solution Let us solve this problem by making the pivots as 1. The augmented matrix is given
by

3 3 4 20
2 1 3 13 .
1 1 3 6

We perform the following elementary row transformations and do the eliminations.

1 1 4 /3 20 /3 1 1 4 /3 20/3
R1/3: 2 1 3 13 . R2 – 2R1, R3 – R1: 0 1 1/ 3 1/3 .
1 1 3 6 0 0 5/ 3 2/ 3
Back substitution gives the solution as

2 3 2 1 x3 1 1 2 1
x3 = – =– ,x = ,
3 5 5 2 3 3 3 3 5 5

20 4 20 1 4 2 35
x1 = – x2 – x3 = = 7.
3 3 3 5 3 5 5

Example 1.16 Test the consistency of the following system of equations


x1 + 10x2 – x3 = 3
2x1 + 3x2 + 20x3 = 7
9x1 + 22x2 + 79x3 = 45
using the Gauss elimination method.
Solution We have the augmented matrix as
1 10 1 3
2 3 20 7 .
9 22 79 45

We perform the following elementary row transformations and do the eliminations.

1 10 1 3 1 10 1 3
R2 – 2R1, R3 – 9R1 : 0 17 22 1 . R3 – 4R2 : 0 17 22 1 .
0 68 88 18 0 0 0 14

Now, rank [A] = 2, and rank [A|b] = 3. Therefore, the system is inconsistent and has no
solution.

The method is based on the idea of reducing the given system of equations Ax = b, to a
diagonal system of equations Ix = d, where I is the identity matrix, using elementary row
operations. We know that the solutions of both the systems are identical. This reduced system
gives the solution vector x. This reduction is equivalent to finding the solution as x = A–1b.
Gauss - Jordan method
[A|b] [I | X]
In this case, after the eliminations are completed, we obtain the augmented matrix for
a 3 × 3 system as
1 0 0 d1
0 1 0 d2 (1.42)
0 0 1 d3
and the solution is xi = di, i = 1, 2, 3.
Elimination procedure The first step is same as in Gauss elimination method, that is, we
make the elements below the first pivot as zeros, using the elementary row transformations.
From the second step onwards, we make the elements below and above the pivots as zeros
using the elementary row transformations. Lastly, we divide each row by its pivot so that the
final augmented matrix is of the form (1.42). Partial pivoting can also be used in the solution.
We may also make the pivots as 1 before performing the elimination.
Let us illustrate the method.
Example 1.17 Solve the following system of equations
x1 + x2 + x3 = 1
4x1 + 3x2 – x3 = 6
3x1 + 5x2 + 3x3 = 4
using the Gauss-Jordan method (i) without partial pivoting, (ii) with partial pivoting.
Solution We have the augmented matrix as
1 1 1 1
4 3 1 6
3 5 3 4

(i) We perform the following elementary row transformations and do the eliminations.

1 1 1 1
R2 – 4R1, R3 – 3R1 : 0 1 5 2 .
0 2 0 1

1 0 4 3
R1 + R2, R3 + 2R2 : 0 1 5 2 .
0 0 10 5

1 0 0 1
R1 – (4/10)R3, R2 – (5/10) R3 : 0 1 0 1/2 .
0 0 10 5

Now, making the pivots as 1, ((– R2), (R3/(– 10))) we get

1 0 0 1
0 1 0 1/2 .
0 0 1 1/2

Therefore, the solution of the system is x1 = 1, x2 = 1/2, x3 = – 1/2.


(ii) We perform the following elementary row transformations and do the elimination.
4 3 1 6 1 3/4 1/4 3/2
R1 R2 : 1 1 1 1 . R1/4 : 1 1 1 1 .
3 5 3 4 3 5 3 4
1 3/4 1/4 3/2
R2 – R1, R3 – 3R1 : 0 1/4 5/4 1/2 .
0 11/4 15/4 1/2

1 3/4 1/4 3/2 1 3/4 1/4 3/2


R2 R3 : 0 11/4 15/4 1/2 . R2 /(11/4) : 0 1 15/11 2/11 .
0 1/4 5/4 1/2 0 1/4 5/4 1/2

1 0 14/11 18/11
R1 – (3/4) R2, R3 – (1/4)R2 : 0 1 15/11 2/11 .
0 0 10/11 5/11

1 0 14/11 18/11
R3 /(10/11) : 0 1 15/11 2/11 .
0 0 1 1/2

1 0 0 1
R1 + (14/11) R3, R2 – (15/11)R3 : 0 1 0 1/2 .
0 0 1 1/2

Therefore, the solution of the system is x1 = 1, x2 = 1/2, x3 = – 1/2.


Remark 18 The Gauss-Jordan method looks very elegant as the solution is obtained directly.
However, it is computationally more expensive than Gauss elimination. For large n, the total
number of divisions and multiplications for Gauss-Jordan method is almost 1.5 times the
total number of divisions and multiplications required for Gauss elimination. Hence, we do
not normally use this method for the solution of the system of equations. The most important
application of this method is to find the inverse of a non-singular matrix. We present this
method in the following section.

1.2.2.3 Inverse of a Matrix by Gauss-Jordan Method


As given in Remark 18, the important application of the Gauss-Jordan method is to
find the inverse of a non-singular matrix A. We start with the augmented matrix of A with the
identity matrix I of the same order. When the Gauss-Jordan procedure is completed, we ob-
tain
Gauss - Jordan method
[A | I] [I | A–1]
since, AA–1 = I.
Remark 19 Partial pivoting can also be done using the augmented matrix [A|I]. However,
we cannot first interchange the rows of A and then find the inverse. Then, we would be finding
the inverse of a different matrix.
Example 1.18 Find the inverse of the matrix
1 1 1
4 3 1
3 5 3
using the Gauss-Jordan method (i) without partial pivoting, and (ii) with partial pivoting.
Solution Consider the augmented matrix
1 1 1 1 0 0
4 3 1 0 1 0 .
3 5 3 0 0 1

(i) We perform the following elementary row transformations and do the eliminations.

1 1 1 1 0 0
R2 – 4R1, R3 – 3R1: 0 1 5 4 1 0 .
0 2 0 3 0 1

1 1 1 1 0 0
– R2 : 0 1 5 4 1 0
0 2 0 3 0 1

1 0 4 3 1 0
R1 – R2, R3 – 2R2 : 0 1 5 4 1 0 .
0 0 10 11 2 1

1 0 4 3 1 0
R3 /(– 10) : 0 1 5 4 1 0 .
0 0 1 11/10 2/10 1/10

1 0 0 14/10 2/10 4/10


R1 + 4R3, R2 – 5R3 : 0 1 0 15/10 0 5/10 .
0 0 1 11/10 2/10 1/10

Therefore, the inverse of the given matrix is given by

7/5 1/5 2/5


3/2 0 1/2 .
11/10 1/5 1/10

(ii) We perform the following elementary row transformations and do the eliminations.

4 3 1 0 1 0 1 3/4 1/4 0 1/4 0


R1 R2 : 1 1 1 1 0 0 . R1/ 4 : 1 1 1 1 0 0 .
3 5 3 0 0 1 3 5 3 0 0 1

1 3/4 1/4 0 1/4 0


R2 – R1, R3 – 3R1 : 0 1/4 5/4 1 1/4 0 .
0 11/4 15/4 0 3/4 1

1 3/4 1/4 0 1/4 0


R2 R3 : 0 11/4 15/4 0 3/4 1 .
0 1/4 5/4 1 1/4 0
1 3/4 1/4 0 1/4 0
R2 /(11/4) : 0 1 1511
/ 0 311
/ 411
/ .
0 1/4 5/4 1 14
/ 0

1 0 1411
/ 0 511
/ 311
/
R1 – (3/4) R2, R3 – (1/4)R2 : 0 1 1511
/ 0 311
/ 4/11 .
0 0 1011
/ 1 211
/ 111
/

1 0 14/11 0 511
/ 311
/
R3 /(10/11) : 0 1 1511
/ 0 311
/ 411
/ .
0 0 1 1110
/ 15/ 110
/

1 0 0 7/5 15
/ 2/5
R 1 + (14/11) R3, R 2 – (15/11)R3 : 0 1 0 3/2 0 1/2 .
0 0 1 1110
/ 1/5 110
/

Therefore, the inverse of the matrix is given by

7/5 15
/ 2/5
3/2 0 1/2
1110
/ 15
/ 110
/

Example 1.19 Using the Gauss-Jordan method, find the inverse of

2 2 3
2 1 1 . (A.U. Apr./May 2004)
1 3 5

Solution We have the following augmented matrix.

2 2 3 1 0 0
2 1 1 0 1 0 .
1 3 5 0 0 1

We perform the following elementary row transformations and do the eliminations.

1 1 3/2 1/2 0 0 1 1 3/2 1/2 0 0


R1 / 2 : 2 1 1 0 1 0 . R2 – 2R1, R3 – R1 : 0 1 2 1 1 0 .
1 3 5 0 0 1 0 2 7/2 1/2 0 1

1 1 3/2 1/2 0 0
R2 R3. Then, R2/2 : 0 1 7/4 1/4 0 1/2 .
0 1 2 1 1 0

1 0 1/4 3/4 0 1/2


R1 – R2, R3 + R2 : 0 1 7/4 1/4 0 1/2 .
0 0 1/4 5/4 1 1/2
1 0 1/4 3/4 0 1/2
R3 /(– 1/4) : 0 1 7/4 1/4 0 1/2 .
0 0 1 5 4 2

1 0 0 2 1 1
R1 + (1/4)R3, R2 – (7/4)R3 : 0 1 0 9 7 4 .
0 0 1 5 4 2
Therefore, the inverse of the given matrix is given by
2 1 1
9 7 4 .
5 4 2

1. What is a direct method for solving a linear system of algebraic equations Ax = b ?


Solution Direct methods produce the solutions in a finite number of steps. The number
of operations, called the operational count, can be calculated.
2. What is an augmented matrix of the system of algebraic equations Ax = b ?
Solution The augmented matrix is denoted by [A | b], where A and b are the coeffi-
cient matrix and right hand side vector respectively. If A is an n × n matrix and b is an
n × 1 vector, then the augmented matrix is of order n × (n + 1).
3. Define the rank of a matrix.
Solution The number of linearly independent rows/columns of a matrix define the row-
rank/column-rank of that matrix. We note that row-rank = column-rank = rank.
4. Define consistency and inconsistency of a system of linear system of algebraic equa-
tions Ax = b.
Solution Let the augmented matrix of the system be [A | b].
(i) The system of equations Ax = b is consistent (has at least one solution), if
rank (A) = rank [A | b] = r.
If r = n, then the system has unique solution.
If r < n, then the system has (n – r) parameter family of infinite number of solutions.
(ii) The system of equations Ax = b is inconsistent (has no solution) if
rank (A) rank [A | b].
5. Define elementary row transformations.
Solution We define the following operations as elementary row transformations.
(i) Interchange of any two rows. If we interchange the ith row with the jth row, then we
usually denote the operation as Ri Rj.
(ii) Division/multiplication of any row by a non-zero number p. If the ith row is multi-
plied by p, then we usually denote this operation as pRi.
(iii) Adding/subtracting a scalar multiple of any row to any other row. If all the elements
of the jth row are multiplied by a scalar p and added to the corresponding elements
of the ith row, then, we usually denote this operation as Ri Ri + pRj. Note the
order in which the operation Ri + pRj is written. The elements of the jth row remain
unchanged and the elements of the ith row get changed.
6. Which direct methods do we use for (i) solving the system of equations Ax = b, and (ii)
finding the inverse of a square matrix A?
Solution (i) Gauss elimination method and Gauss-Jordan method. (ii) Gauss-Jordan
method.
7. Describe the principle involved in the Gauss elimination method.
Solution The method is based on the idea of reducing the given system of equations Ax
= b, to an upper triangular system of equations Ux = z, using elementary row opera-
tions. We know that these two systems are equivalent. That is, the solutions of both the
systems are identical. This reduced system Ux = z, is then solved by the back substitu-
tion method to obtain the solution vector x.
8. When does the Gauss elimination method fail?
Solution Gauss elimination method fails when any one of the pivots is zero or it is a
very small number, as the elimination progresses. If a pivot is zero, then division by it
gives over flow error, since division by zero is not defined. If a pivot is a very small
number, then division by it introduces large round off errors and the solution may con-
tain large errors.
9. How do we avoid computational errors in Gauss elimination?
Solution To avoid computational errors, we follow the procedure of partial pivoting. In
the first stage of elimination, the first column of the augmented matrix is searched for
the largest element in magnitude and brought as the first pivot by interchanging the
first row of the augmented matrix (first equation) with the row (equation) having the
largest element in magnitude. In the second stage of elimination, the second column is
searched for the largest element in magnitude among the n – 1 elements leaving the
first element, and this element is brought as the second pivot by interchanging the
second row of the augmented matrix with the later row having the largest element in
magnitude. This procedure is continued until the upper triangular system is obtained.
Therefore, partial pivoting is done after every stage of elimination.
10. Define complete pivoting in Gauss elimination.
Solution In this procedure, we search the entire matrix A in the augmented matrix for
the largest element in magnitude and bring it as the first pivot. This requires not only
an interchange of the equations, but also an interchange of the positions of the vari-
ables. It is possible that the position of a variable is changed a number of times during
this pivoting. We need to keep track of the positions of all the variables. Hence, the
procedure is computationally expensive and is not used in any software.
11. Describe the principle involved in the Gauss-Jordan method for finding the inverse of a
square matrix A.
Solution We start with the augmented matrix of A with the identity matrix I of the
same order. When the Gauss-Jordan elimination procedure using elementary row trans-
formations is completed, we obtain
Gauss - Jordan method
[A | I] [I | A–1 ]
since, AA–1 = I.
12. Can we use partial pivoting in Gauss-Jordan method?
Solution Yes. Partial pivoting can also be done using the augmented matrix [A | I].
However, we cannot first interchange the rows of A and then find the inverse. Then, we
would be finding the inverse of a different matrix.

Solve the following system of equations by Gauss elimination method.


1. 10x – 2y + 3z = 23 2. 3.15x – 1.96y + 3.85z = 12.95
2x + 10y – 5z = – 53 2.13x + 5.12y – 2.89z = – 8.61
3x – 4y + 10z = 33. 5.92x + 3.05y + 2.15z = 6.88.

2 1 1 2 x1 2
2 2 1 x 1 4 0 2 1 x2 3
3. 4 3 3 y 2 . 4. 3 2 2 0 x3 1 .
1 1 1 z 3 1 3 2 6 x4 2

Solve the following system of equations by Gauss-Jordan method.


5. 10x + y + z = 12
2x + 10y + z = 13 (A.U. Nov/Dec 2004)
x + y + 5z = 7.
6. x + 3y + 3z = 16
x + 4y + 3z = 18 (A.U. Apr/May 2005)
x + 3y + 4z = 19.
7. 10x – 2y + 3z = 23 8. x1 + x2 + x3 = 1
2x + 10y – 5z = – 53 4x1 + 3x2 – x3 = 6
3x – 4y + 10z = 33. 3x1 + 5x2 + 3x3 = 4.
Find the inverses of the following matrices by Gauss-Jordan method.

2 1 1 1 1 3
9. 3 2 3 . (A.U. Nov/Dec 2006) 10. 1 3 3 . (A.U. Nov/Dec 2006)
1 4 9 2 4 4

2 2 6 2 0 1
11. 2 6 6 . 12. 3 2 5 . (A.U. Nov/Dec 2005)
4 8 8 1 1 0
Show that the following systems of equations are inconsistent using the Gauss elimination
method.
13. 2x1 + x2 – 3x3 = 0 14. x1 – 3x2 + 4x3 = 2
5x1 + 8x2 + x3 = 14, x1 + x 2 – x 3 = 0
4x1 + 13x2 + 11x3 = 25. 3x1 – x2 + 2x3 = 4.
Show that the following systems of equations have infinite number of solutions using the Gauss
elimination.
15. 2x1 + x2 – 3x3 = 0, 16. x1 + 5x2 – x3 = 0,
5x1 + 8x2 + x3 = 14, 2x1 + 3x2 + x3 = 11,
4x1 + 13x2 + 11x3 = 28. 5x1 + 11x2 + x3 = 22.

As discussed earlier, iterative methods are based on the idea of successive approximations.
We start with an initial approximation to the solution vector x = x0, to solve the system of
equations Ax = b, and obtain a sequence of approximate vectors x0, x1, ..., xk, ..., which in the
limit as k , converges to the exact solution vector x = A–1b. A general linear iterative
method for the solution of the system of equations Ax = b, can be written in matrix form as
x(k+1) = Hx(k) + c, k = 0, 1, 2, (1.43)
where x(k+1) and x(k) are the approximations for x at the (k + 1)th and kth iterations respec-
tively. H is called the iteration matrix, which depends on A and c is a column vector, which
depends on A and b.
When to stop the iteration We stop the iteration procedure when the magnitudes of the
differences between the two successive iterates of all the variables are smaller than a given
accuracy or error tolerance or an error bound , that is,

xi( k 1)
xi( k) , for all i. (1.44)
For example, if we require two decimal places of accuracy, then we iterate until
xi( k 1)
xi( k) 0.005, for all i. If we require three decimal places of accuracy, then we iterate

( 1)
until xi k xi( k) 0.0005, for all i.

Convergence property of an iterative method depends on the iteration matrix H.

Now, we derive two iterative methods for the solution of the system of algebraic equations
a11x1 + a12x2 + a13x3 = b1
a21x1 + a22x2 + a23x3 = b2 (1.45)
a31x1 + a32x2 + a33x3 = b3

1.2.3.1 Gauss-Jacobi Iteration Method


Sometimes, the method is called Jacobi method. We assume that the pivots aii 0, for
all i. Write the equations as

You might also like