SlideShare a Scribd company logo
1 of 21
Unit-2 SOLUTION OF SIMULTANEOUS LINEAR EQUATIONS
RAI UNIVERSITY, AHMEDABAD 1
Course: MCA
Subject: Computer Oriented Numerical
Statistical Methods
Unit-2
RAI UNIVERSITY, AHMEDABAD
Unit-2 SOLUTION OF SIMULTANEOUS LINEAR EQUATIONS
RAI UNIVERSITY, AHMEDABAD 2
Unit-II-Solution of simultaneous Linear Equations
Sr.
No.
Name of the Topic Page
No.
1. Introduction, System of linear equations in two variable Methods
for solving linear equation,
2
2. Existence of Unique roots, multiple roots and no roots (consistency
and Inconsistency of system), Dependent and Independent system
of linear equations, Examples
2
3. System of linear equations in three variables, System of linear
equations in n-variables
7
4. Methods for solving system of linear equations 9
5. Gauss elimination method and its examples 9
6. Gauss Seidel method and its examples 13
7. Difference between Direct Method and Iterative Method 16
8. References 17
9. Exercise 18
Unit-2 SOLUTION OF SIMULTANEOUS LINEAR EQUATIONS
RAI UNIVERSITY, AHMEDABAD 3
1.1 Introduction:
We are already familiar with solving linear equations of one variable and two
variables. The general form of linear equation of one variable is ax + b = 0 where
a is not 0 and a and b are real numbers, and the general form of linear equations of
two variables is
ax + by + c =0 where a, b and c are real numbers. In this section let us discuss with
system of linear equations.
1.2 What is a system of linear Equations?
1.2.1 Definition:System of Linear Equations
Linear Equations in one variable: The general form of linear equation in one
variable is ax + b = 0, where a and b are Real numbers and a is not equal to 0.
This system has unique solution, which is x = - b/a
For example : 2x + 6 = 0
=> 2x = -6
= > x = - 6/2 = - 3 ๐‘ฅ =
โˆ’๐‘
๐‘Ž
The only solution to this equation is x = - 3
This solution can be represented on a number line.
2.1 System of linear Equations in two variables:
The general form of linear equation in two variables is ax + by +c = 0, where
a, b, c are real numbers and a and b bothnot equal to 0.
Let us consider the example x + y = 6
This equation will satisfy for infinitely many pairs of the form (x,y) satisfying this
condition.
For example (1,6), 2,4), (3,3), (7, -1),.........etc
so that in all the cases x + y = 5, meaning the sum of the coordinates = 6
Hence these pairs of values satisfying the given equation are called the solution to
the given equation.
Unit-2 SOLUTION OF SIMULTANEOUS LINEAR EQUATIONS
RAI UNIVERSITY, AHMEDABAD 4
2.2 System of linear Equations Solver:
Step-1. For the linear equations of one variable, there will be unique solution
which can be solved from the given equation.
Step-2. For the linear equations of two variables, we need to have two equations to
solve for the variables.
Let us assume that the given two equations are of the form
a1 x + b1 y + c1 = 0 and a2 x + b2 y + c2 = 0.
It is possible to solve the system of linear equations for the unknown variables x
and y.
The methods involved in solving these homogeneous systems of linear equations
are,
1. Substitution Method.
2. Elimination Method.
3. Cross Multiplication Method
4. Matrix Method etc.
To solve a system of linear equations we should know about the types of
solution(s) that exists for the system.
2.3 Consistentsystemof linear equations: (Unique Roots, Infinite Roots)
The system of linear equations is said to be consistent if the solution exists.
For the above system of equations, if the following ratio satisfies we can say about
the type of solutions accordingly.
If
๐‘Ž1
๐‘Ž2
โ‰ 
๐‘1
๐‘2
then the system has unique solution.
If
๐‘Ž1
๐‘Ž2
=
๐‘1
๐‘2
=
๐‘1
๐‘2
then the system has infinite solution.
2.4 InconsistentSystem of Equations: (No roots)
The system of linear equations is said to be inconsistent if the solution
does not exists.
For the above system of equations, if the following ratio satisfies then we can say
that the system is inconsistent
Unit-2 SOLUTION OF SIMULTANEOUS LINEAR EQUATIONS
RAI UNIVERSITY, AHMEDABAD 5
If
๐‘Ž1
๐‘Ž2
=
๐‘1
๐‘2
โ‰ 
๐‘1
๐‘2
2.5 Dependent systemof Linear Equations:
System of Linear Equations is said to be dependent if both the equations have
infinitely common solutions.
So the coinciding lines are the dependent system of linear equations.
They satisfy the condition,
๐‘Ž1
๐‘Ž2
=
๐‘1
๐‘2
=
๐‘1
๐‘2
2.6 Independent system of Linear Equations:
System of Linear Equations is said to be independent if they do not
have infinite number of common solution.
So the intersecting lines and the parallel lines are the Independent system of Linear
Equations.
2.7 Solving systemof linear equations:
While solving a system of linear equations, we will come to know if they are
consistent or inconsistent, dependent or independent.
System of Linear Equations Examples:
2.7.1 Exampleโ€”
Solve the systemof linear equations: ๐Ÿ๐’™ + ๐Ÿ‘๐’š = ๐Ÿ๐Ÿ“; ๐Ÿ‘๐’™ + ๐Ÿ๐’š = ๐Ÿ๐Ÿ“
Solution:
Let us number the equations
2๐‘ฅ + 3๐‘ฆ = 25 ------------------------------(1)
3๐‘ฅ + 2๐‘ฆ = 25 ------------------------------(2)
Multiplying Equation (1) by 3, 3 ( 2๐‘ฅ + 3๐‘ฆ ) = 3 ( 25)
6๐‘ฅ + 9๐‘ฆ = 75 --------------------(3)
Multiplying equation (2) by 2, 2 ( 3๐‘ฅ + 2๐‘ฆ ) = 2 ( 25)
6๐‘ฅ + 4๐‘ฆ = 50 -----------------------------(4)
6๐‘ฅ + 9๐‘ฆ = 75 ------------------------------(3)
6๐‘ฅ + 4๐‘ฆ = 50 ------------------------------(4)
______________
Unit-2 SOLUTION OF SIMULTANEOUS LINEAR EQUATIONS
RAI UNIVERSITY, AHMEDABAD 6
Subtracting (4) from (3) 5๐‘ฆ = 25
๐‘ฆ = 25 /5 = 5
Substituting y=5 in (1) we get, 2๐‘ฅ + 3(5) = 25
2๐‘ฅ + 15 = 25
2๐‘ฅ = 25 โˆ’ 15 = 10
๐‘ฅ = 10/2 = 5
Therefore, the two equations intersect at the point (2,2).
Hence the system of equations is consistent and independent.
If we verify the condition,
๐‘Ž1
๐‘Ž2
โ‰ 
๐‘1
๐‘2
, we see that,
2
3
โ‰ 
3
2
2.7.2 Exampleโ€”
Solve the System of linear equations: ๐’™ + ๐’š = ๐Ÿ’, ๐Ÿ๐’™ + ๐Ÿ๐’š = ๐Ÿ—
Solution:
Let ๐‘ฅ + ๐‘ฆ = 4 ---------------------(1)
2๐‘ฅ + 2๐‘ฆ = 9 ------------------- (2)
Multiplying (1) by 2, we get,
2 ( ๐‘ฅ + ๐‘ฆ ) = 2(4)
=> 2๐‘ฅ + 2๐‘ฆ = 8 -------------------(3)
2๐‘ฅ + 2๐‘ฆ = 9 --------------------(2)
Subtracting , (2) from (3), we get, 0 = 1, which is not true.
Hence the system of equations have no solution.
From the above relation,
๐‘Ž1
๐‘Ž2
=
๐‘1
๐‘2
โ‰ 
๐‘1
๐‘2
we have
1
2
=
1
2
โ‰ 
4
9
Hence the above pair of equations is inconsistent and
independent.
Unit-2 SOLUTION OF SIMULTANEOUS LINEAR EQUATIONS
RAI UNIVERSITY, AHMEDABAD 7
2.7.3 Exampleโ€”
Solve the system of linear equations: ๐’™ + ๐Ÿ‘๐’š = ๐Ÿ– ; ๐Ÿ‘๐’™ + ๐Ÿ—๐’š = ๐Ÿ๐Ÿ’
Solution:
Let ๐‘ฅ + 3๐‘ฆ = 8 ---------------------(1)
3๐‘ฅ + 9๐‘ฆ = 24 ------------------ (2)
Substituting ๐‘ฅ = 8 โˆ’ 3๐‘ฆ in (2), 3 ( 8 โˆ’ 3๐‘ฆ ) + 9๐‘ฆ = 24
=> 24 โˆ’ 9๐‘ฆ + 9๐‘ฆ = 24
This condition is true for all values of y.
we get 24 = 24 which is true.
Therefore the system of equations has infinitely many solutions.
Hence the system is consistent and dependent Hence by solving system of
equations we can conclude if the system of linear equations is consistent or
inconsistent and independent or dependent.
2.8 System of Linear Equations word problems:
We can follow the following steps while solving the word problems.
Step 1: Read the problem carefully and identify the unknown quantities. Give
these quantities a variable name like ๐‘ฅ, ๐‘ฆ, ๐‘ข, ๐‘ฃ, ๐‘ค, etc.
Step 2: Identify the variables to be determined.
Step 3: Read the problem carefully and formulate the equations in terms of the
variables to be determined.
Solve 4: Solve the equations obtained in step 3, using any one of the method you
are comfortable with.
2.8.1 Exampleโ€”
4 Chairs and 3 tables cost1400 dollars and 5 chairs and 2 tables cost1400
dollars. Find the costof a chair and a table.
Solution:
Let the costof a chair be x dollars, and the costof a table be y dollars.
Unit-2 SOLUTION OF SIMULTANEOUS LINEAR EQUATIONS
RAI UNIVERSITY, AHMEDABAD 8
Let us solve linear system of equations we have framed here.
Hence we have the equations, 4๐‘ฅ + 3๐‘ฆ = 1400 ---------------------(1)
5๐‘ฅ + 2๐‘ฆ = 1400 ---------------------(2)
Multiplying (1) by 5, 5( 4๐‘ฅ + 3๐‘ฆ ) = 5( 1400)
=> 20 ๐‘ฅ + 15 ๐‘ฆ = 7000------------------------(3)
Multiplying (2) by 4, we get 4 ( 5๐‘ฅ + 2๐‘ฆ ) = 4 ( 1400)
=> 20 ๐‘ฅ + 8 ๐‘ฆ = 5600 ----------------------(4)
20 ๐‘ฅ + 15 ๐‘ฆ = 7000----------------------(3)
______________________
Subtracting (3) from (4), โˆ’ 7 ๐‘ฆ = โˆ’1400
=> ๐‘ฆ = โˆ’1400/โˆ’7 = 200
Substituting y= 200 in Equation (1), we get,
4๐‘ฅ + 3 ( 200) = 1400
=> 4๐‘ฅ + 600 = 1400
=> 4๐‘ฅ = 1400 โˆ’ 600 = 800 =
> ๐‘ฅ = 800/4 = 200
Therefore costof a Chair is 200 dollars and costof a Table is 200 dollars.
3.1 System of linear equations in three variables:
The general form of linear equation in three variables, ๐‘ฅ, ๐‘ฆ ๐‘Ž๐‘›๐‘‘ ๐‘งis
๐‘Ž๐‘ฅ + ๐‘๐‘ฆ + ๐‘๐‘ง + ๐‘‘ = 0, where a, b, c are real numbers and a, b, c not all equal
to 0.
This represent the equation of a plane in three-dimensional co-ordinate system,
where ๐‘Ž, ๐‘, ๐‘ are the direction ratios of the normal to the plane.
To solve the equation in three variables, we need to have three conditions
(equations) relating the variables ๐‘ฅ, ๐‘ฆ ๐‘Ž๐‘›๐‘‘ ๐‘ง.
Elimination method is the most suitable method to solve the equations.
Unit-2 SOLUTION OF SIMULTANEOUS LINEAR EQUATIONS
RAI UNIVERSITY, AHMEDABAD 9
3.2 System of Linear equations with n variables
๐‘Ž11 ๐‘ฅ1 + ๐‘Ž12 ๐‘ฅ2 + โ‹ฏโ€ฆ โ€ฆ+ ๐‘Ž1๐‘› ๐‘ฅ ๐‘› = ๐‘1
๐‘Ž21 ๐‘ฅ1 + ๐‘Ž22 ๐‘ฅ2 + โ‹ฏโ€ฆ โ€ฆ+ ๐‘Ž2๐‘› ๐‘ฅ ๐‘› = ๐‘2
โ€ฆโ€ฆโ€ฆโ€ฆโ€ฆ โ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆ โ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆ..
๐‘Ž ๐‘š1 ๐‘ฅ1 + ๐‘Ž ๐‘š2 ๐‘ฅ2 + โ‹ฏโ€ฆ โ€ฆ+ ๐‘Ž ๐‘š๐‘› ๐‘ฅ ๐‘› = ๐‘ ๐‘š
We can also write it in Matrix form as
[
๐‘Ž11 ๐‘Ž12 โ€ฆโ€ฆ. ๐‘Ž1๐‘›
๐‘Ž21 ๐‘Ž22 โ€ฆโ€ฆ. ๐‘Ž2๐‘›
โ€ฆโ€ฆ . . โ€ฆโ€ฆ โ€ฆโ€ฆ โ€ฆโ€ฆ. .
๐‘Ž ๐‘š1 ๐‘Ž ๐‘š2 โ€ฆโ€ฆ ๐‘Ž ๐‘š๐‘›
] [
๐‘ฅ1
๐‘ฅ2
โ€ฆ
๐‘ฅ ๐‘š
] = [
๐‘1
๐‘2
โ€ฆ
๐‘3
]
โŸน ๐ด๐‘‹ = ๐ต
๐ถ = [ ๐ด, ๐ต] = [
๐‘Ž11 ๐‘Ž12 โ€ฆ โ€ฆ. ๐‘Ž1๐‘›
๐‘Ž21 ๐‘Ž22 โ€ฆโ€ฆ. ๐‘Ž2๐‘›
โ€ฆโ€ฆ .. โ€ฆโ€ฆโ€ฆ โ€ฆ โ€ฆ โ€ฆ. .
๐‘Ž ๐‘š1 ๐‘Ž ๐‘š2 โ€ฆโ€ฆ ๐‘Ž ๐‘š๐‘›
]is called augumented matrix.
[ ๐ด: ๐ต] = ๐ถ
3.2.1 (๐’‚) ConsistentEquations:
If Rank A = Rank C
(i) Unique Solution: Rank A= Rank C=n Where, ๐‘› = number of
unknown
(ii) Infinite Solution: Rank A= Rank C= r, ๐‘Ÿ < ๐‘›
3.2.2 (๐’ƒ) InconsistentEquations:
If Rank ๐ด โ‰  Rank ๐ถ.
Unit-2 SOLUTION OF SIMULTANEOUS LINEAR EQUATIONS
RAI UNIVERSITY, AHMEDABAD 10
4.1. There are two types of methods for solving System of Linear equations:
A. Direct Methods
B. Iterative Methods
4.2 DirectMethods Of Solution:
1. Gauss elimination Method
2. Gauss -Jordan Method
3. Factorization method
4.3 Iterative Methods:
1. Jacobiโ€™s iteration Method
2. Gauss - Seidel iteration Method
3. Relaxation Method
Here we discuss only 1st method gauss elimination.
5.1 Gauss elimination Method:
In this method, the unknowns are eliminated successively and the system is
reduced to an upper triangular system from which the unknowns are found by back
A system of non-homogeneous linear equations
AX=B
if R(A)=R(C)
solution exists
systemis consistant
if R(A)=R(C)=n
systemhas unique
solution
if R(A)=R(C) less than n
InfiniteSolution
if R(A)# R(C)
solution does not exist
systemis inconsistant
Unit-2 SOLUTION OF SIMULTANEOUS LINEAR EQUATIONS
RAI UNIVERSITY, AHMEDABAD 11
substitution. The method is quite general and is well-adapted for computer
operations. Here we shall explain it by considering a system of three equations for
the sake of clarity.
Consider the equations
๐‘Ž1 ๐‘ฅ + ๐‘1 ๐‘ฆ + ๐‘1 ๐‘ง = ๐‘‘1
๐‘Ž2 ๐‘ฅ + ๐‘2 ๐‘ฆ + ๐‘2 ๐‘ง = ๐‘‘2
๐‘Ž3 ๐‘ฅ + ๐‘3 ๐‘ฆ + ๐‘3 ๐‘ง = ๐‘‘3
Step-I. To eliminate ๐‘ฅ from second and third equations.
Assuming ๐‘Ž1 โ‰  0,we eliminate ๐‘ฅ from the second equation by subtracting (
๐‘Ž2
๐‘Ž1
)
times the first equation from the second equation. Similarly we eliminate ๐‘ฅ from
the third equation by eliminating (
๐‘Ž3
๐‘Ž1
) times the first equation from the third
equation. We thus get the new system
๐‘Ž1 ๐‘ฅ + ๐‘1 ๐‘ฆ + ๐‘1 ๐‘ง = ๐‘‘1
๐‘2โ€ฒ๐‘ฆ + ๐‘2โ€ฒ๐‘ง = ๐‘‘2โ€ฒ
๐‘3โ€ฒ๐‘ฆ + ๐‘3โ€ฒ๐‘ง = ๐‘‘3โ€ฒ
Here the first equation is called the pivotal equation and ๐‘Ž1 is called the first pivot.
Step-II. To eliminate ๐‘ฆ from third equation in (2).
Assuming ๐‘2โ€ฒ โ‰  0, we eliminate ๐‘ฆ from the third equation of (2) ,by Subtracting
(
๐‘3โ€ฒ
๐‘2โ€ฒ
) times the second equation from third equation. We thus, get the new system
๐‘Ž1 ๐‘ฅ + ๐‘1 ๐‘ฆ + ๐‘1 ๐‘ง = ๐‘‘1
๐‘2โ€ฒ๐‘ฆ + ๐‘2โ€ฒ๐‘ง = ๐‘‘2โ€ฒ
๐‘3โ€ฒโ€ฒ๐‘ง = ๐‘‘3โ€ฒโ€ฒ
Here the second equation is the pivotal equation and ๐‘2โ€ฒ is the new pivot.
Unit-2 SOLUTION OF SIMULTANEOUS LINEAR EQUATIONS
RAI UNIVERSITY, AHMEDABAD 12
Step-III. To evaluate the unknowns.
The values of ๐‘ฅ, ๐‘ฆ, ๐‘ง are found from the reduced system (3) by back substitution.
5.1.1 Exampleโ€”
Apply gauss elimination method to solve the equations
๐’™ + ๐Ÿ’๐’š โˆ’ ๐’› = โˆ’๐Ÿ“
๐’™ + ๐’š โˆ’ ๐Ÿ”๐’› = โˆ’๐Ÿ๐Ÿ
๐Ÿ‘๐’™ โˆ’ ๐’š โˆ’ ๐’› = ๐Ÿ’ .
Solution:
We have [
1 4 โˆ’1
1 1 โˆ’6
3 โˆ’1 โˆ’1
][
๐‘ฅ
๐‘ฆ
๐‘ง
] = [
โˆ’5
โˆ’12
4
]
Operate ๐‘…2 โˆ’ ๐‘…1 & ๐‘…3 โˆ’ 3๐‘…1,
~ [
1 4 โˆ’1
0 โˆ’3 โˆ’5
0 โˆ’13 2
][
๐‘ฅ
๐‘ฆ
๐‘ง
] = [
โˆ’5
โˆ’7
19
]
Operate ๐‘…3 โˆ’
13
3
๐‘…2,
[
1 4 1
0 โˆ’3 โˆ’5
0 0 71/3
][
๐‘ฅ
๐‘ฆ
๐‘ง
] = [
โˆ’5
โˆ’7
148/3
]
Thus, We have ๐‘ง =
148
71
= 2.0845,
3๐‘ฆ = 7 โˆ’ 5๐‘ง = 7 โˆ’ 10.4225 = โˆ’3.4225 i.e., ๐‘ฆ = โˆ’1.1408
๐‘ฅ = โˆ’5 โˆ’ 4๐‘ฆ + ๐‘ง = โˆ’5 + 4(1.1408) + 2.0845 = 1.6479
and
Hence ๐‘ฅ = 1.6479, ๐‘ฆ = โˆ’1.1408, ๐‘ง = 2.0845.
Unit-2 SOLUTION OF SIMULTANEOUS LINEAR EQUATIONS
RAI UNIVERSITY, AHMEDABAD 13
5.1.2 Exampleโ€”
Solve by using gauss elimination Method.
๐’™ ๐Ÿ + ๐Ÿ๐’™ ๐Ÿ โˆ’ ๐’™ ๐Ÿ‘ = ๐Ÿ‘
๐Ÿ‘๐’™ ๐Ÿ โˆ’ ๐’™ ๐Ÿ + ๐Ÿ๐’™ ๐Ÿ‘ = ๐Ÿ
๐Ÿ๐’™ ๐Ÿ โˆ’ ๐Ÿ๐’™ ๐Ÿ + ๐Ÿ‘๐’™ ๐Ÿ‘ = ๐Ÿ
๐’™ ๐Ÿ โˆ’ ๐’™ ๐Ÿ + ๐’™ ๐Ÿ‘ = โˆ’๐Ÿ
Solution:
We have given system of solution
๐‘ฅ1 + 2๐‘ฅ2 โˆ’ ๐‘ฅ3 = 3
3๐‘ฅ1 โˆ’ ๐‘ฅ2 + 2๐‘ฅ3 = 1
2๐‘ฅ1 โˆ’ 2๐‘ฅ2 + 3๐‘ฅ3 = 2
๐‘ฅ1 โˆ’ ๐‘ฅ2 + ๐‘ฅ3 = โˆ’1
The System of equation can be written in matrix form as
[
1 2 โˆ’1
3 โˆ’1 2
2
1
โˆ’2
โˆ’1
3
1
][
๐‘ฅ1
๐‘ฅ2
๐‘ฅ3
] = [
3
1
2
โˆ’1
]
Operate (โˆ’3) ๐‘…1 + ๐‘…2, (โˆ’2) ๐‘…1 + ๐‘…3, (โˆ’1) ๐‘…1 + ๐‘…4
~[
1 2 โˆ’1
0 โˆ’7 5
0
0
โˆ’6
โˆ’3
5
2
][
๐‘ฅ1
๐‘ฅ2
๐‘ฅ3
] = [
3
โˆ’8
โˆ’4
โˆ’4
]
Operate โˆ’
6
7
๐‘…2 + ๐‘…3 , โˆ’
3
7
๐‘…2 + ๐‘…4
Unit-2 SOLUTION OF SIMULTANEOUS LINEAR EQUATIONS
RAI UNIVERSITY, AHMEDABAD 14
~[
1 2 โˆ’1
0 โˆ’7 5
0
0
0
0
5/7
โˆ’1/7
][
๐‘ฅ1
๐‘ฅ2
๐‘ฅ3
] = [
3
โˆ’8
20/7
โˆ’4/7
]
Operate
1
5
๐‘…3 + ๐‘…4
~[
1 2 โˆ’1
0 โˆ’7 5
0
0
0
0
5/7
0
][
๐‘ฅ1
๐‘ฅ2
๐‘ฅ3
] = [
3
โˆ’8
20/7
0
]
โˆด
5
7
๐‘ฅ3 =
20
7
โŸน ๐‘ฅ3 = 4
Now โˆ’7๐‘ฅ2 + 5๐‘ฅ3 = โˆ’8
โŸน โˆ’7๐‘ฅ2 + 5(4) = โˆ’8
โŸน โˆ’7๐‘ฅ2 = โˆ’28
โŸน ๐‘ฅ2 = 4
Now ๐‘ฅ1 + 2๐‘ฅ2 โˆ’ ๐‘ฅ3 = 3
โŸน ๐‘ฅ1 + 2(4) โˆ’ 4 = 3
โŸน ๐‘ฅ1 = 3 + 4 โˆ’ 8
โŸน ๐‘ฅ1 = โˆ’1
Hence we get the solution set (๐‘ฅ1,๐‘ฅ2, ๐‘ฅ3) = (4,4,โˆ’1)
Now we discuss about 2nd iterative method Gauss โ€“ Seidel.
6.1 Gauss - Seidel iteration Method:
Unit-2 SOLUTION OF SIMULTANEOUS LINEAR EQUATIONS
RAI UNIVERSITY, AHMEDABAD 15
This is a modification of the Jacobiโ€™s iteration method. As before, we start with
initial approximations ๐‘ฅ0, ๐‘ฆ0, ๐‘ง0 (each=0) for ๐‘ฅ, ๐‘ฆ, ๐‘ง respectively. Substituting ๐‘ฆ =
๐‘ฆ0, ๐‘ง = ๐‘ง0 in the first equations, we get
๐‘ฅ1 = ๐‘˜1
Then putting ๐‘ฅ = ๐‘ฅ1, ๐‘ง = ๐‘ง0 in the second of the equations, we have
๐‘ฆ1 = ๐‘˜2 โˆ’ ๐‘™2 ๐‘ฅ1 โˆ’ ๐‘š2 ๐‘ง0
Next substituting ๐‘ฅ = ๐‘ฅ1, ๐‘ฆ = ๐‘ฆ1 in the third equations, we obtain
๐‘ง1 = ๐‘˜3 โˆ’ ๐‘™3 ๐‘ฅ1 โˆ’ ๐‘š3 ๐‘ฆ1
And so on, i.e. as soonas new approximation for an unknown is found, it is
immediately used in the next step.
This process ofiteration is continued till convergency to the desired degree of
accuracy is obtained.
6.1.1 Exampleโ€”
Apply Gauss-Seideliterationmethod to solve the equation:
๐Ÿ๐ŸŽ๐’™ + ๐’š โˆ’ ๐Ÿ๐’› = ๐Ÿ๐Ÿ•
๐Ÿ‘๐’™ + ๐Ÿ๐ŸŽ๐’š โˆ’ ๐’› = โˆ’๐Ÿ๐Ÿ–
๐Ÿ๐’™ โˆ’ ๐Ÿ‘๐’š + ๐Ÿ๐ŸŽ๐’› = ๐Ÿ๐Ÿ“
Solution:
We write the given equation in the form
๐‘ฅ =
1
20
(17 โˆ’ ๐‘ฆ + 2๐‘ง) โ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆ (1)
๐‘ฆ =
1
20
(โˆ’18โˆ’ 3๐‘ฅ + ๐‘ง) โ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆ (2)
๐‘ง =
1
20
(25 โˆ’ 2๐‘ฅ + 3๐‘ฆ) โ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆ. (3)
Unit-2 SOLUTION OF SIMULTANEOUS LINEAR EQUATIONS
RAI UNIVERSITY, AHMEDABAD 16
We start form the approximation ๐‘ฅ0 = ๐‘ฆ0 = ๐‘ง0 = 0.substituting ๐‘ฆ = ๐‘ฆ0, ๐‘ง = ๐‘ง0 in
the right side of the first of equations (1) we get
๐‘ฅ1 =
1
20
(17โˆ’ ๐‘ฆ0 + 2๐‘ง0) = 0.8500
Putting ๐‘ฅ = ๐‘ฅ1, ๐‘ง = ๐‘ง0 in the second of the equations (1), we have
๐‘ฆ1 =
1
20
(โˆ’18 โˆ’ 3๐‘ฅ1 + ๐‘ง0) = โˆ’1.0275
Putting ๐‘ฅ = ๐‘ฅ1, ๐‘ฆ = ๐‘ฆ1 in the last of the equations (1), we obtain
๐‘ง1 =
1
20
(25โˆ’ 2๐‘ฅ1 + 3๐‘ฆ1) = 1.0109
For the second iteration, we have
๐‘ฅ2 =
1
20
(17 โˆ’ ๐‘ฆ1 + 2๐‘ง1) = 1.0025
๐‘ฆ2 =
1
20
(โˆ’18 โˆ’ 3๐‘ฅ2 + ๐‘ง1) = โˆ’0.9998
๐‘ง2 =
1
20
(25โˆ’ 2๐‘ฅ2 + 3๐‘ฆ2) = 0.9998
For the third iteration, we get
๐‘ฅ3 =
1
20
(17 โˆ’ ๐‘ฆ2 + 2๐‘ง2) = 1.0000
๐‘ฆ3 =
1
20
(โˆ’18 โˆ’ 3๐‘ฅ3 + ๐‘ง2) = โˆ’1.0000
๐‘ง3 =
1
20
(25โˆ’ 3๐‘ฅ3 + 2๐‘ฆ3) = 1.0000
The values in the 2nd and 3rd iterations bring practically the same, we can stop.
Hence the solution is ๐‘ฅ = 1, ๐‘ฆ = โˆ’1, ๐‘ง = 1.
Unit-2 SOLUTION OF SIMULTANEOUS LINEAR EQUATIONS
RAI UNIVERSITY, AHMEDABAD 17
7.1 Difference betweendirect and iterative methods:
Direct Method Iterative Method
It computes the solution to a problem in
a finite number of steps.
In contrast to direct methods, iterative
methods are not expected to terminate in
a number of steps.
These methods give the precise answer
if they were performed in infinite
precision arithmetic.
Iterative methods form successive
approximations that converge to the
exact solution in the limit.
This method takes less time for
computation when we have small
system linear of equations.
This method takes long time for
calculation when we have small system
of linear equations.
When we have large linear system of
equation Iterative method became more
easy then direct method.
Iterative methods are better than direct
methods for solving large linear systems
e.g. Gauss elimination, LU
decomposition
e.g. Gauss -Seidel method, Jacobi
Method, Newton-Raphson method.
Unit-2 SOLUTION OF SIMULTANEOUS LINEAR EQUATIONS
RAI UNIVERSITY, AHMEDABAD 18
8. Referencesandwebsite Name:
1. Higher Engineering mathematics by B.S.Grewal
2. Higher Engineering Mathematics by B.V.Ramana
3. http://www.linearequations.org/system-of-linear-equations.html#
4. http://www.mathworks.com/matlabcentral/answers/7058-are-iterative-
methods-always-better-than-direct-methods-for-solving-large-linear-systems
5. http://1.bp.blogspot.com/-
pHo8nT2SKgM/UPKdqSinfSI/AAAAAAAAC9I/JZHDxmqADsg/s1600/dir
ect_vs_indirect.png
Unit-2 SOLUTION OF SIMULTANEOUS LINEAR EQUATIONS
RAI UNIVERSITY, AHMEDABAD 19
EXERCISE
Q-1 Evaluate the following questions:
1. Solve the following system of linear equation
๐‘ฅ + 4๐‘ฆ = โˆ’10 ,3๐‘ฅ โˆ’ ๐‘ฆ = 9
2. Solve the following system of linear equation
3๐‘ฅ + 7๐‘ฆ = 15,5๐‘ฅ + 2๐‘ฆ = โˆ’4
3. Show that the non Homogeneous system of linear equation are not
consistant.
2๐‘ฅ + 6๐‘ฆ = โˆ’11
6๐‘ฅ + 20๐‘ฆ โˆ’ 6๐‘ง = โˆ’3
6๐‘ฆ โˆ’ 18๐‘ง = โˆ’1
4. Test the consistency of the following equations and solve them if possible.
3๐‘ฅ + 3๐‘ฆ + 3๐‘ง = 1
๐‘ฅ + 2๐‘ฆ = 4
10๐‘ฆ + 3๐‘ง = โˆ’2
2๐‘ฅ โˆ’ 3๐‘ฆ โˆ’ ๐‘ง = 5
Q-2 Evaluate the following questions:
1. Solve the following equations by Gauss elimination method:
2๐‘ฅ + ๐‘ฆ + ๐‘ง = 10
3๐‘ฅ + 2๐‘ฆ + 3๐‘ง = 18
๐‘ฅ + 4๐‘ฆ + 9๐‘ง = 16
2. Solve the following equations by Gauss elimination method:
2๐‘ฅ โˆ’ ๐‘ฆ + 3๐‘ง = 9
Unit-2 SOLUTION OF SIMULTANEOUS LINEAR EQUATIONS
RAI UNIVERSITY, AHMEDABAD 20
๐‘ฅ + ๐‘ฆ + ๐‘ง = 6
๐‘ฅ โˆ’ ๐‘ฆ + ๐‘ง = 2
3. Solve the following equations by Gauss-Seidel method:
2๐‘ฅ + ๐‘ฆ + 6๐‘ง = 9
8๐‘ฅ + 3๐‘ฆ + 2๐‘ง+ 13 = 0
๐‘ฅ + 5๐‘ฆ + ๐‘ง = 7
4. Solve the following equations by Gauss-Seidel method:
28๐‘ฅ + 4๐‘ฆ โˆ’ ๐‘ง = 32
๐‘ฅ + 3๐‘ฆ + 10๐‘ง = 24
2๐‘ฅ + 17๐‘ฆ + 4๐‘ง = 35
Unit-2 SOLUTION OF SIMULTANEOUS LINEAR EQUATIONS
RAI UNIVERSITY, AHMEDABAD 21

More Related Content

What's hot

Introduction to Matrices
Introduction to MatricesIntroduction to Matrices
Introduction to Matrices
holmsted
ย 
Grafos - Figuras Planas
Grafos - Figuras PlanasGrafos - Figuras Planas
Grafos - Figuras Planas
arteaga0122
ย 
1.2 division de un segmento de recta en una razon dada
1.2 division de un segmento de recta en una razon dada1.2 division de un segmento de recta en una razon dada
1.2 division de un segmento de recta en una razon dada
xiom20mat
ย 
Solving systems of equations in 3 variables
Solving systems of equations in 3 variablesSolving systems of equations in 3 variables
Solving systems of equations in 3 variables
Jessica Garcia
ย 
01 Ecuaciones CuadrรกTicas
01 Ecuaciones CuadrรกTicas01 Ecuaciones CuadrรกTicas
01 Ecuaciones CuadrรกTicas
Alejandro Rivera
ย 
Regla de Cramer
Regla de CramerRegla de Cramer
Regla de Cramer
Javier Rangel
ย 

What's hot (20)

Badillo riosyortizdelaluz
Badillo riosyortizdelaluzBadillo riosyortizdelaluz
Badillo riosyortizdelaluz
ย 
Introduction to Matrices
Introduction to MatricesIntroduction to Matrices
Introduction to Matrices
ย 
Grafos - Figuras Planas
Grafos - Figuras PlanasGrafos - Figuras Planas
Grafos - Figuras Planas
ย 
รlgebra Lineal y Modelamiento Econรณmico
รlgebra Lineal y Modelamiento Econรณmicoรlgebra Lineal y Modelamiento Econรณmico
รlgebra Lineal y Modelamiento Econรณmico
ย 
1.2 division de un segmento de recta en una razon dada
1.2 division de un segmento de recta en una razon dada1.2 division de un segmento de recta en una razon dada
1.2 division de un segmento de recta en una razon dada
ย 
Sucesiones, inducciรณn y sumatorias
Sucesiones, inducciรณn y sumatoriasSucesiones, inducciรณn y sumatorias
Sucesiones, inducciรณn y sumatorias
ย 
Graph theory
Graph theoryGraph theory
Graph theory
ย 
Ecuaciones Diferenciales Lineales de Primer Orden
Ecuaciones Diferenciales Lineales de Primer OrdenEcuaciones Diferenciales Lineales de Primer Orden
Ecuaciones Diferenciales Lineales de Primer Orden
ย 
Solving systems of equations in 3 variables
Solving systems of equations in 3 variablesSolving systems of equations in 3 variables
Solving systems of equations in 3 variables
ย 
Lecture 3 Inverse matrices(hotom).pdf
Lecture 3 Inverse matrices(hotom).pdfLecture 3 Inverse matrices(hotom).pdf
Lecture 3 Inverse matrices(hotom).pdf
ย 
mรฉtodo de determinantes cramer y sarrus 3x3
 mรฉtodo de determinantes cramer y sarrus  3x3 mรฉtodo de determinantes cramer y sarrus  3x3
mรฉtodo de determinantes cramer y sarrus 3x3
ย 
01 Ecuaciones CuadrรกTicas
01 Ecuaciones CuadrรกTicas01 Ecuaciones CuadrรกTicas
01 Ecuaciones CuadrรกTicas
ย 
รกLgebra lineal
รกLgebra linealรกLgebra lineal
รกLgebra lineal
ย 
Regla de Cramer
Regla de CramerRegla de Cramer
Regla de Cramer
ย 
Plan de mejoramiento dรฉcimo grado 2ยฐ periodo 2017
Plan de mejoramiento dรฉcimo grado 2ยฐ periodo 2017Plan de mejoramiento dรฉcimo grado 2ยฐ periodo 2017
Plan de mejoramiento dรฉcimo grado 2ยฐ periodo 2017
ย 
Mcqs -Matrices and determinants
Mcqs -Matrices and determinantsMcqs -Matrices and determinants
Mcqs -Matrices and determinants
ย 
Raices de ecuaciones MN
Raices de ecuaciones MNRaices de ecuaciones MN
Raices de ecuaciones MN
ย 
Longitud de arcos
Longitud de arcosLongitud de arcos
Longitud de arcos
ย 
Unidad 3: Pensamiento analรญtico y geomรฉtrico
Unidad 3: Pensamiento analรญtico y geomรฉtricoUnidad 3: Pensamiento analรญtico y geomรฉtrico
Unidad 3: Pensamiento analรญtico y geomรฉtrico
ย 
Mapa conceptual de Grafos Euleriano y Hamiltoniano
Mapa conceptual de Grafos Euleriano y HamiltonianoMapa conceptual de Grafos Euleriano y Hamiltoniano
Mapa conceptual de Grafos Euleriano y Hamiltoniano
ย 

Viewers also liked

MITCOE 2011-12 conm-submission
MITCOE 2011-12 conm-submissionMITCOE 2011-12 conm-submission
MITCOE 2011-12 conm-submission
Ashutosh Katti
ย 
B.Tech-II_Unit-IV
B.Tech-II_Unit-IVB.Tech-II_Unit-IV
B.Tech-II_Unit-IV
Kundan Kumar
ย 
BSC_Computer Science_Discrete Mathematics_Unit-I
BSC_Computer Science_Discrete Mathematics_Unit-IBSC_Computer Science_Discrete Mathematics_Unit-I
BSC_Computer Science_Discrete Mathematics_Unit-I
Rai University
ย 
merged_document
merged_documentmerged_document
merged_document
Kundan Kumar
ย 
B.Tech-II_Unit-III
B.Tech-II_Unit-IIIB.Tech-II_Unit-III
B.Tech-II_Unit-III
Kundan Kumar
ย 
B.Tech-II_Unit-I
B.Tech-II_Unit-IB.Tech-II_Unit-I
B.Tech-II_Unit-I
Kundan Kumar
ย 

Viewers also liked (20)

MCA_UNIT-1_Computer Oriented Numerical Statistical Methods
MCA_UNIT-1_Computer Oriented Numerical Statistical MethodsMCA_UNIT-1_Computer Oriented Numerical Statistical Methods
MCA_UNIT-1_Computer Oriented Numerical Statistical Methods
ย 
MCA_UNIT-4_Computer Oriented Numerical Statistical Methods
MCA_UNIT-4_Computer Oriented Numerical Statistical MethodsMCA_UNIT-4_Computer Oriented Numerical Statistical Methods
MCA_UNIT-4_Computer Oriented Numerical Statistical Methods
ย 
Course pack unit 5
Course pack unit 5Course pack unit 5
Course pack unit 5
ย 
MCA_UNIT-3_Computer Oriented Numerical Statistical Methods
MCA_UNIT-3_Computer Oriented Numerical Statistical MethodsMCA_UNIT-3_Computer Oriented Numerical Statistical Methods
MCA_UNIT-3_Computer Oriented Numerical Statistical Methods
ย 
Mm unit 4point2
Mm unit 4point2Mm unit 4point2
Mm unit 4point2
ย 
Mca 2 sem u-1 iintroduction
Mca 2 sem u-1 iintroductionMca 2 sem u-1 iintroduction
Mca 2 sem u-1 iintroduction
ย 
MITCOE 2011-12 conm-submission
MITCOE 2011-12 conm-submissionMITCOE 2011-12 conm-submission
MITCOE 2011-12 conm-submission
ย 
A time study in numerical methods programming
A time study in numerical methods programmingA time study in numerical methods programming
A time study in numerical methods programming
ย 
Bisection & Regual falsi methods
Bisection & Regual falsi methodsBisection & Regual falsi methods
Bisection & Regual falsi methods
ย 
B.Tech-II_Unit-IV
B.Tech-II_Unit-IVB.Tech-II_Unit-IV
B.Tech-II_Unit-IV
ย 
Unit 1 Introduction
Unit 1 IntroductionUnit 1 Introduction
Unit 1 Introduction
ย 
B.tech ii unit-5 material vector integration
B.tech ii unit-5 material vector integrationB.tech ii unit-5 material vector integration
B.tech ii unit-5 material vector integration
ย 
BSC_Computer Science_Discrete Mathematics_Unit-I
BSC_Computer Science_Discrete Mathematics_Unit-IBSC_Computer Science_Discrete Mathematics_Unit-I
BSC_Computer Science_Discrete Mathematics_Unit-I
ย 
BCA_Semester-II-Discrete Mathematics_unit-iv Graph theory
BCA_Semester-II-Discrete Mathematics_unit-iv Graph theoryBCA_Semester-II-Discrete Mathematics_unit-iv Graph theory
BCA_Semester-II-Discrete Mathematics_unit-iv Graph theory
ย 
merged_document
merged_documentmerged_document
merged_document
ย 
B.Tech-II_Unit-III
B.Tech-II_Unit-IIIB.Tech-II_Unit-III
B.Tech-II_Unit-III
ย 
Btech_II_ engineering mathematics_unit5
Btech_II_ engineering mathematics_unit5Btech_II_ engineering mathematics_unit5
Btech_II_ engineering mathematics_unit5
ย 
BSC_COMPUTER _SCIENCE_UNIT-5_DISCRETE MATHEMATICS
BSC_COMPUTER _SCIENCE_UNIT-5_DISCRETE MATHEMATICSBSC_COMPUTER _SCIENCE_UNIT-5_DISCRETE MATHEMATICS
BSC_COMPUTER _SCIENCE_UNIT-5_DISCRETE MATHEMATICS
ย 
Btech_II_ engineering mathematics_unit4
Btech_II_ engineering mathematics_unit4Btech_II_ engineering mathematics_unit4
Btech_II_ engineering mathematics_unit4
ย 
B.Tech-II_Unit-I
B.Tech-II_Unit-IB.Tech-II_Unit-I
B.Tech-II_Unit-I
ย 

Similar to MCA_UNIT-2_Computer Oriented Numerical Statistical Methods

2415systems_odes
2415systems_odes2415systems_odes
2415systems_odes
Betsy McCall
ย 
Pair of linear equations
Pair of linear equationsPair of linear equations
Pair of linear equations
Yash Jain
ย 
Linear equations rev - copy
Linear equations rev - copyLinear equations rev - copy
Linear equations rev - copy
Yash Jain
ย 
Systems of Linear Equations
Systems of Linear EquationsSystems of Linear Equations
Systems of Linear Equations
alrosiemae
ย 
Sistemas de ecuaciones lineales
Sistemas de ecuaciones linealesSistemas de ecuaciones lineales
Sistemas de ecuaciones lineales
RokiFernandez1
ย 
Linear equations rev
Linear equations revLinear equations rev
Linear equations rev
Yash Jain
ย 
Solving systems of Linear Equations
Solving systems of Linear EquationsSolving systems of Linear Equations
Solving systems of Linear Equations
swartzje
ย 
Linear Algebra - systems of equations (week 1).ppt
Linear Algebra - systems of equations (week 1).pptLinear Algebra - systems of equations (week 1).ppt
Linear Algebra - systems of equations (week 1).ppt
AraMaeMina
ย 

Similar to MCA_UNIT-2_Computer Oriented Numerical Statistical Methods (20)

BSC_COMPUTER _SCIENCE_UNIT-5_DISCRETE MATHEMATICS
BSC_COMPUTER _SCIENCE_UNIT-5_DISCRETE MATHEMATICSBSC_COMPUTER _SCIENCE_UNIT-5_DISCRETE MATHEMATICS
BSC_COMPUTER _SCIENCE_UNIT-5_DISCRETE MATHEMATICS
ย 
.Chapter7&8.
.Chapter7&8..Chapter7&8.
.Chapter7&8.
ย 
2415systems_odes
2415systems_odes2415systems_odes
2415systems_odes
ย 
Pair of linear equations
Pair of linear equationsPair of linear equations
Pair of linear equations
ย 
Linear equations rev - copy
Linear equations rev - copyLinear equations rev - copy
Linear equations rev - copy
ย 
Solving Systems of Linear Equations in Two Variables by Graphing
Solving Systems of Linear Equations in Two Variables by GraphingSolving Systems of Linear Equations in Two Variables by Graphing
Solving Systems of Linear Equations in Two Variables by Graphing
ย 
Systems of Linear Equations
Systems of Linear EquationsSystems of Linear Equations
Systems of Linear Equations
ย 
Sistemas de ecuaciones lineales
Sistemas de ecuaciones linealesSistemas de ecuaciones lineales
Sistemas de ecuaciones lineales
ย 
Linear equations rev
Linear equations revLinear equations rev
Linear equations rev
ย 
Solving systems of Linear Equations
Solving systems of Linear EquationsSolving systems of Linear Equations
Solving systems of Linear Equations
ย 
Chapter 3: Linear Systems and Matrices - Part 1/Slides
Chapter 3: Linear Systems and Matrices - Part 1/SlidesChapter 3: Linear Systems and Matrices - Part 1/Slides
Chapter 3: Linear Systems and Matrices - Part 1/Slides
ย 
Linear Algebra - systems of equations (week 1).ppt
Linear Algebra - systems of equations (week 1).pptLinear Algebra - systems of equations (week 1).ppt
Linear Algebra - systems of equations (week 1).ppt
ย 
systems of equations.ppt
systems of equations.pptsystems of equations.ppt
systems of equations.ppt
ย 
systems of equations.ppt
systems of equations.pptsystems of equations.ppt
systems of equations.ppt
ย 
Systems of linear equations
Systems of linear equationsSystems of linear equations
Systems of linear equations
ย 
Simultaneous equations
Simultaneous equationsSimultaneous equations
Simultaneous equations
ย 
Computational Method for Engineers: Solving a system of Linear Equations
Computational Method for Engineers: Solving a system of Linear EquationsComputational Method for Engineers: Solving a system of Linear Equations
Computational Method for Engineers: Solving a system of Linear Equations
ย 
Algebra
AlgebraAlgebra
Algebra
ย 
Linear equations
Linear equationsLinear equations
Linear equations
ย 
U3 10 sistemas de ecuaciones
U3   10 sistemas de ecuacionesU3   10 sistemas de ecuaciones
U3 10 sistemas de ecuaciones
ย 

More from Rai University

Bsc agri 2 pae u-4.4 publicrevenue-presentation-130208082149-phpapp02
Bsc agri  2 pae  u-4.4 publicrevenue-presentation-130208082149-phpapp02Bsc agri  2 pae  u-4.4 publicrevenue-presentation-130208082149-phpapp02
Bsc agri 2 pae u-4.4 publicrevenue-presentation-130208082149-phpapp02
Rai University
ย 

More from Rai University (20)

Brochure Rai University
Brochure Rai University Brochure Rai University
Brochure Rai University
ย 
Mm unit 4point1
Mm unit 4point1Mm unit 4point1
Mm unit 4point1
ย 
Mm unit 4point3
Mm unit 4point3Mm unit 4point3
Mm unit 4point3
ย 
Mm unit 3point2
Mm unit 3point2Mm unit 3point2
Mm unit 3point2
ย 
Mm unit 3point1
Mm unit 3point1Mm unit 3point1
Mm unit 3point1
ย 
Mm unit 2point2
Mm unit 2point2Mm unit 2point2
Mm unit 2point2
ย 
Mm unit 2 point 1
Mm unit 2 point 1Mm unit 2 point 1
Mm unit 2 point 1
ย 
Mm unit 1point3
Mm unit 1point3Mm unit 1point3
Mm unit 1point3
ย 
Mm unit 1point2
Mm unit 1point2Mm unit 1point2
Mm unit 1point2
ย 
Mm unit 1point1
Mm unit 1point1Mm unit 1point1
Mm unit 1point1
ย 
Bdft ii, tmt, unit-iii, dyeing & types of dyeing,
Bdft ii, tmt, unit-iii,  dyeing & types of dyeing,Bdft ii, tmt, unit-iii,  dyeing & types of dyeing,
Bdft ii, tmt, unit-iii, dyeing & types of dyeing,
ย 
Bsc agri 2 pae u-4.4 publicrevenue-presentation-130208082149-phpapp02
Bsc agri  2 pae  u-4.4 publicrevenue-presentation-130208082149-phpapp02Bsc agri  2 pae  u-4.4 publicrevenue-presentation-130208082149-phpapp02
Bsc agri 2 pae u-4.4 publicrevenue-presentation-130208082149-phpapp02
ย 
Bsc agri 2 pae u-4.3 public expenditure
Bsc agri  2 pae  u-4.3 public expenditureBsc agri  2 pae  u-4.3 public expenditure
Bsc agri 2 pae u-4.3 public expenditure
ย 
Bsc agri 2 pae u-4.2 public finance
Bsc agri  2 pae  u-4.2 public financeBsc agri  2 pae  u-4.2 public finance
Bsc agri 2 pae u-4.2 public finance
ย 
Bsc agri 2 pae u-4.1 introduction
Bsc agri  2 pae  u-4.1 introductionBsc agri  2 pae  u-4.1 introduction
Bsc agri 2 pae u-4.1 introduction
ย 
Bsc agri 2 pae u-3.3 inflation
Bsc agri  2 pae  u-3.3  inflationBsc agri  2 pae  u-3.3  inflation
Bsc agri 2 pae u-3.3 inflation
ย 
Bsc agri 2 pae u-3.2 introduction to macro economics
Bsc agri  2 pae  u-3.2 introduction to macro economicsBsc agri  2 pae  u-3.2 introduction to macro economics
Bsc agri 2 pae u-3.2 introduction to macro economics
ย 
Bsc agri 2 pae u-3.1 marketstructure
Bsc agri  2 pae  u-3.1 marketstructureBsc agri  2 pae  u-3.1 marketstructure
Bsc agri 2 pae u-3.1 marketstructure
ย 
Bsc agri 2 pae u-3 perfect-competition
Bsc agri  2 pae  u-3 perfect-competitionBsc agri  2 pae  u-3 perfect-competition
Bsc agri 2 pae u-3 perfect-competition
ย 
Bsc agri 2 pae u-2.4 different forms of business organizing
Bsc agri  2 pae  u-2.4  different forms of business organizingBsc agri  2 pae  u-2.4  different forms of business organizing
Bsc agri 2 pae u-2.4 different forms of business organizing
ย 

Recently uploaded

Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
ย 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
ย 

Recently uploaded (20)

Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
ย 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
ย 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
ย 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
ย 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
ย 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
ย 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
ย 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
ย 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
ย 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
ย 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
ย 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
ย 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
ย 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
ย 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
ย 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
ย 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
ย 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
ย 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
ย 
Magic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxMagic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptx
ย 

MCA_UNIT-2_Computer Oriented Numerical Statistical Methods

  • 1. Unit-2 SOLUTION OF SIMULTANEOUS LINEAR EQUATIONS RAI UNIVERSITY, AHMEDABAD 1 Course: MCA Subject: Computer Oriented Numerical Statistical Methods Unit-2 RAI UNIVERSITY, AHMEDABAD
  • 2. Unit-2 SOLUTION OF SIMULTANEOUS LINEAR EQUATIONS RAI UNIVERSITY, AHMEDABAD 2 Unit-II-Solution of simultaneous Linear Equations Sr. No. Name of the Topic Page No. 1. Introduction, System of linear equations in two variable Methods for solving linear equation, 2 2. Existence of Unique roots, multiple roots and no roots (consistency and Inconsistency of system), Dependent and Independent system of linear equations, Examples 2 3. System of linear equations in three variables, System of linear equations in n-variables 7 4. Methods for solving system of linear equations 9 5. Gauss elimination method and its examples 9 6. Gauss Seidel method and its examples 13 7. Difference between Direct Method and Iterative Method 16 8. References 17 9. Exercise 18
  • 3. Unit-2 SOLUTION OF SIMULTANEOUS LINEAR EQUATIONS RAI UNIVERSITY, AHMEDABAD 3 1.1 Introduction: We are already familiar with solving linear equations of one variable and two variables. The general form of linear equation of one variable is ax + b = 0 where a is not 0 and a and b are real numbers, and the general form of linear equations of two variables is ax + by + c =0 where a, b and c are real numbers. In this section let us discuss with system of linear equations. 1.2 What is a system of linear Equations? 1.2.1 Definition:System of Linear Equations Linear Equations in one variable: The general form of linear equation in one variable is ax + b = 0, where a and b are Real numbers and a is not equal to 0. This system has unique solution, which is x = - b/a For example : 2x + 6 = 0 => 2x = -6 = > x = - 6/2 = - 3 ๐‘ฅ = โˆ’๐‘ ๐‘Ž The only solution to this equation is x = - 3 This solution can be represented on a number line. 2.1 System of linear Equations in two variables: The general form of linear equation in two variables is ax + by +c = 0, where a, b, c are real numbers and a and b bothnot equal to 0. Let us consider the example x + y = 6 This equation will satisfy for infinitely many pairs of the form (x,y) satisfying this condition. For example (1,6), 2,4), (3,3), (7, -1),.........etc so that in all the cases x + y = 5, meaning the sum of the coordinates = 6 Hence these pairs of values satisfying the given equation are called the solution to the given equation.
  • 4. Unit-2 SOLUTION OF SIMULTANEOUS LINEAR EQUATIONS RAI UNIVERSITY, AHMEDABAD 4 2.2 System of linear Equations Solver: Step-1. For the linear equations of one variable, there will be unique solution which can be solved from the given equation. Step-2. For the linear equations of two variables, we need to have two equations to solve for the variables. Let us assume that the given two equations are of the form a1 x + b1 y + c1 = 0 and a2 x + b2 y + c2 = 0. It is possible to solve the system of linear equations for the unknown variables x and y. The methods involved in solving these homogeneous systems of linear equations are, 1. Substitution Method. 2. Elimination Method. 3. Cross Multiplication Method 4. Matrix Method etc. To solve a system of linear equations we should know about the types of solution(s) that exists for the system. 2.3 Consistentsystemof linear equations: (Unique Roots, Infinite Roots) The system of linear equations is said to be consistent if the solution exists. For the above system of equations, if the following ratio satisfies we can say about the type of solutions accordingly. If ๐‘Ž1 ๐‘Ž2 โ‰  ๐‘1 ๐‘2 then the system has unique solution. If ๐‘Ž1 ๐‘Ž2 = ๐‘1 ๐‘2 = ๐‘1 ๐‘2 then the system has infinite solution. 2.4 InconsistentSystem of Equations: (No roots) The system of linear equations is said to be inconsistent if the solution does not exists. For the above system of equations, if the following ratio satisfies then we can say that the system is inconsistent
  • 5. Unit-2 SOLUTION OF SIMULTANEOUS LINEAR EQUATIONS RAI UNIVERSITY, AHMEDABAD 5 If ๐‘Ž1 ๐‘Ž2 = ๐‘1 ๐‘2 โ‰  ๐‘1 ๐‘2 2.5 Dependent systemof Linear Equations: System of Linear Equations is said to be dependent if both the equations have infinitely common solutions. So the coinciding lines are the dependent system of linear equations. They satisfy the condition, ๐‘Ž1 ๐‘Ž2 = ๐‘1 ๐‘2 = ๐‘1 ๐‘2 2.6 Independent system of Linear Equations: System of Linear Equations is said to be independent if they do not have infinite number of common solution. So the intersecting lines and the parallel lines are the Independent system of Linear Equations. 2.7 Solving systemof linear equations: While solving a system of linear equations, we will come to know if they are consistent or inconsistent, dependent or independent. System of Linear Equations Examples: 2.7.1 Exampleโ€” Solve the systemof linear equations: ๐Ÿ๐’™ + ๐Ÿ‘๐’š = ๐Ÿ๐Ÿ“; ๐Ÿ‘๐’™ + ๐Ÿ๐’š = ๐Ÿ๐Ÿ“ Solution: Let us number the equations 2๐‘ฅ + 3๐‘ฆ = 25 ------------------------------(1) 3๐‘ฅ + 2๐‘ฆ = 25 ------------------------------(2) Multiplying Equation (1) by 3, 3 ( 2๐‘ฅ + 3๐‘ฆ ) = 3 ( 25) 6๐‘ฅ + 9๐‘ฆ = 75 --------------------(3) Multiplying equation (2) by 2, 2 ( 3๐‘ฅ + 2๐‘ฆ ) = 2 ( 25) 6๐‘ฅ + 4๐‘ฆ = 50 -----------------------------(4) 6๐‘ฅ + 9๐‘ฆ = 75 ------------------------------(3) 6๐‘ฅ + 4๐‘ฆ = 50 ------------------------------(4) ______________
  • 6. Unit-2 SOLUTION OF SIMULTANEOUS LINEAR EQUATIONS RAI UNIVERSITY, AHMEDABAD 6 Subtracting (4) from (3) 5๐‘ฆ = 25 ๐‘ฆ = 25 /5 = 5 Substituting y=5 in (1) we get, 2๐‘ฅ + 3(5) = 25 2๐‘ฅ + 15 = 25 2๐‘ฅ = 25 โˆ’ 15 = 10 ๐‘ฅ = 10/2 = 5 Therefore, the two equations intersect at the point (2,2). Hence the system of equations is consistent and independent. If we verify the condition, ๐‘Ž1 ๐‘Ž2 โ‰  ๐‘1 ๐‘2 , we see that, 2 3 โ‰  3 2 2.7.2 Exampleโ€” Solve the System of linear equations: ๐’™ + ๐’š = ๐Ÿ’, ๐Ÿ๐’™ + ๐Ÿ๐’š = ๐Ÿ— Solution: Let ๐‘ฅ + ๐‘ฆ = 4 ---------------------(1) 2๐‘ฅ + 2๐‘ฆ = 9 ------------------- (2) Multiplying (1) by 2, we get, 2 ( ๐‘ฅ + ๐‘ฆ ) = 2(4) => 2๐‘ฅ + 2๐‘ฆ = 8 -------------------(3) 2๐‘ฅ + 2๐‘ฆ = 9 --------------------(2) Subtracting , (2) from (3), we get, 0 = 1, which is not true. Hence the system of equations have no solution. From the above relation, ๐‘Ž1 ๐‘Ž2 = ๐‘1 ๐‘2 โ‰  ๐‘1 ๐‘2 we have 1 2 = 1 2 โ‰  4 9 Hence the above pair of equations is inconsistent and independent.
  • 7. Unit-2 SOLUTION OF SIMULTANEOUS LINEAR EQUATIONS RAI UNIVERSITY, AHMEDABAD 7 2.7.3 Exampleโ€” Solve the system of linear equations: ๐’™ + ๐Ÿ‘๐’š = ๐Ÿ– ; ๐Ÿ‘๐’™ + ๐Ÿ—๐’š = ๐Ÿ๐Ÿ’ Solution: Let ๐‘ฅ + 3๐‘ฆ = 8 ---------------------(1) 3๐‘ฅ + 9๐‘ฆ = 24 ------------------ (2) Substituting ๐‘ฅ = 8 โˆ’ 3๐‘ฆ in (2), 3 ( 8 โˆ’ 3๐‘ฆ ) + 9๐‘ฆ = 24 => 24 โˆ’ 9๐‘ฆ + 9๐‘ฆ = 24 This condition is true for all values of y. we get 24 = 24 which is true. Therefore the system of equations has infinitely many solutions. Hence the system is consistent and dependent Hence by solving system of equations we can conclude if the system of linear equations is consistent or inconsistent and independent or dependent. 2.8 System of Linear Equations word problems: We can follow the following steps while solving the word problems. Step 1: Read the problem carefully and identify the unknown quantities. Give these quantities a variable name like ๐‘ฅ, ๐‘ฆ, ๐‘ข, ๐‘ฃ, ๐‘ค, etc. Step 2: Identify the variables to be determined. Step 3: Read the problem carefully and formulate the equations in terms of the variables to be determined. Solve 4: Solve the equations obtained in step 3, using any one of the method you are comfortable with. 2.8.1 Exampleโ€” 4 Chairs and 3 tables cost1400 dollars and 5 chairs and 2 tables cost1400 dollars. Find the costof a chair and a table. Solution: Let the costof a chair be x dollars, and the costof a table be y dollars.
  • 8. Unit-2 SOLUTION OF SIMULTANEOUS LINEAR EQUATIONS RAI UNIVERSITY, AHMEDABAD 8 Let us solve linear system of equations we have framed here. Hence we have the equations, 4๐‘ฅ + 3๐‘ฆ = 1400 ---------------------(1) 5๐‘ฅ + 2๐‘ฆ = 1400 ---------------------(2) Multiplying (1) by 5, 5( 4๐‘ฅ + 3๐‘ฆ ) = 5( 1400) => 20 ๐‘ฅ + 15 ๐‘ฆ = 7000------------------------(3) Multiplying (2) by 4, we get 4 ( 5๐‘ฅ + 2๐‘ฆ ) = 4 ( 1400) => 20 ๐‘ฅ + 8 ๐‘ฆ = 5600 ----------------------(4) 20 ๐‘ฅ + 15 ๐‘ฆ = 7000----------------------(3) ______________________ Subtracting (3) from (4), โˆ’ 7 ๐‘ฆ = โˆ’1400 => ๐‘ฆ = โˆ’1400/โˆ’7 = 200 Substituting y= 200 in Equation (1), we get, 4๐‘ฅ + 3 ( 200) = 1400 => 4๐‘ฅ + 600 = 1400 => 4๐‘ฅ = 1400 โˆ’ 600 = 800 = > ๐‘ฅ = 800/4 = 200 Therefore costof a Chair is 200 dollars and costof a Table is 200 dollars. 3.1 System of linear equations in three variables: The general form of linear equation in three variables, ๐‘ฅ, ๐‘ฆ ๐‘Ž๐‘›๐‘‘ ๐‘งis ๐‘Ž๐‘ฅ + ๐‘๐‘ฆ + ๐‘๐‘ง + ๐‘‘ = 0, where a, b, c are real numbers and a, b, c not all equal to 0. This represent the equation of a plane in three-dimensional co-ordinate system, where ๐‘Ž, ๐‘, ๐‘ are the direction ratios of the normal to the plane. To solve the equation in three variables, we need to have three conditions (equations) relating the variables ๐‘ฅ, ๐‘ฆ ๐‘Ž๐‘›๐‘‘ ๐‘ง. Elimination method is the most suitable method to solve the equations.
  • 9. Unit-2 SOLUTION OF SIMULTANEOUS LINEAR EQUATIONS RAI UNIVERSITY, AHMEDABAD 9 3.2 System of Linear equations with n variables ๐‘Ž11 ๐‘ฅ1 + ๐‘Ž12 ๐‘ฅ2 + โ‹ฏโ€ฆ โ€ฆ+ ๐‘Ž1๐‘› ๐‘ฅ ๐‘› = ๐‘1 ๐‘Ž21 ๐‘ฅ1 + ๐‘Ž22 ๐‘ฅ2 + โ‹ฏโ€ฆ โ€ฆ+ ๐‘Ž2๐‘› ๐‘ฅ ๐‘› = ๐‘2 โ€ฆโ€ฆโ€ฆโ€ฆโ€ฆ โ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆ โ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆ.. ๐‘Ž ๐‘š1 ๐‘ฅ1 + ๐‘Ž ๐‘š2 ๐‘ฅ2 + โ‹ฏโ€ฆ โ€ฆ+ ๐‘Ž ๐‘š๐‘› ๐‘ฅ ๐‘› = ๐‘ ๐‘š We can also write it in Matrix form as [ ๐‘Ž11 ๐‘Ž12 โ€ฆโ€ฆ. ๐‘Ž1๐‘› ๐‘Ž21 ๐‘Ž22 โ€ฆโ€ฆ. ๐‘Ž2๐‘› โ€ฆโ€ฆ . . โ€ฆโ€ฆ โ€ฆโ€ฆ โ€ฆโ€ฆ. . ๐‘Ž ๐‘š1 ๐‘Ž ๐‘š2 โ€ฆโ€ฆ ๐‘Ž ๐‘š๐‘› ] [ ๐‘ฅ1 ๐‘ฅ2 โ€ฆ ๐‘ฅ ๐‘š ] = [ ๐‘1 ๐‘2 โ€ฆ ๐‘3 ] โŸน ๐ด๐‘‹ = ๐ต ๐ถ = [ ๐ด, ๐ต] = [ ๐‘Ž11 ๐‘Ž12 โ€ฆ โ€ฆ. ๐‘Ž1๐‘› ๐‘Ž21 ๐‘Ž22 โ€ฆโ€ฆ. ๐‘Ž2๐‘› โ€ฆโ€ฆ .. โ€ฆโ€ฆโ€ฆ โ€ฆ โ€ฆ โ€ฆ. . ๐‘Ž ๐‘š1 ๐‘Ž ๐‘š2 โ€ฆโ€ฆ ๐‘Ž ๐‘š๐‘› ]is called augumented matrix. [ ๐ด: ๐ต] = ๐ถ 3.2.1 (๐’‚) ConsistentEquations: If Rank A = Rank C (i) Unique Solution: Rank A= Rank C=n Where, ๐‘› = number of unknown (ii) Infinite Solution: Rank A= Rank C= r, ๐‘Ÿ < ๐‘› 3.2.2 (๐’ƒ) InconsistentEquations: If Rank ๐ด โ‰  Rank ๐ถ.
  • 10. Unit-2 SOLUTION OF SIMULTANEOUS LINEAR EQUATIONS RAI UNIVERSITY, AHMEDABAD 10 4.1. There are two types of methods for solving System of Linear equations: A. Direct Methods B. Iterative Methods 4.2 DirectMethods Of Solution: 1. Gauss elimination Method 2. Gauss -Jordan Method 3. Factorization method 4.3 Iterative Methods: 1. Jacobiโ€™s iteration Method 2. Gauss - Seidel iteration Method 3. Relaxation Method Here we discuss only 1st method gauss elimination. 5.1 Gauss elimination Method: In this method, the unknowns are eliminated successively and the system is reduced to an upper triangular system from which the unknowns are found by back A system of non-homogeneous linear equations AX=B if R(A)=R(C) solution exists systemis consistant if R(A)=R(C)=n systemhas unique solution if R(A)=R(C) less than n InfiniteSolution if R(A)# R(C) solution does not exist systemis inconsistant
  • 11. Unit-2 SOLUTION OF SIMULTANEOUS LINEAR EQUATIONS RAI UNIVERSITY, AHMEDABAD 11 substitution. The method is quite general and is well-adapted for computer operations. Here we shall explain it by considering a system of three equations for the sake of clarity. Consider the equations ๐‘Ž1 ๐‘ฅ + ๐‘1 ๐‘ฆ + ๐‘1 ๐‘ง = ๐‘‘1 ๐‘Ž2 ๐‘ฅ + ๐‘2 ๐‘ฆ + ๐‘2 ๐‘ง = ๐‘‘2 ๐‘Ž3 ๐‘ฅ + ๐‘3 ๐‘ฆ + ๐‘3 ๐‘ง = ๐‘‘3 Step-I. To eliminate ๐‘ฅ from second and third equations. Assuming ๐‘Ž1 โ‰  0,we eliminate ๐‘ฅ from the second equation by subtracting ( ๐‘Ž2 ๐‘Ž1 ) times the first equation from the second equation. Similarly we eliminate ๐‘ฅ from the third equation by eliminating ( ๐‘Ž3 ๐‘Ž1 ) times the first equation from the third equation. We thus get the new system ๐‘Ž1 ๐‘ฅ + ๐‘1 ๐‘ฆ + ๐‘1 ๐‘ง = ๐‘‘1 ๐‘2โ€ฒ๐‘ฆ + ๐‘2โ€ฒ๐‘ง = ๐‘‘2โ€ฒ ๐‘3โ€ฒ๐‘ฆ + ๐‘3โ€ฒ๐‘ง = ๐‘‘3โ€ฒ Here the first equation is called the pivotal equation and ๐‘Ž1 is called the first pivot. Step-II. To eliminate ๐‘ฆ from third equation in (2). Assuming ๐‘2โ€ฒ โ‰  0, we eliminate ๐‘ฆ from the third equation of (2) ,by Subtracting ( ๐‘3โ€ฒ ๐‘2โ€ฒ ) times the second equation from third equation. We thus, get the new system ๐‘Ž1 ๐‘ฅ + ๐‘1 ๐‘ฆ + ๐‘1 ๐‘ง = ๐‘‘1 ๐‘2โ€ฒ๐‘ฆ + ๐‘2โ€ฒ๐‘ง = ๐‘‘2โ€ฒ ๐‘3โ€ฒโ€ฒ๐‘ง = ๐‘‘3โ€ฒโ€ฒ Here the second equation is the pivotal equation and ๐‘2โ€ฒ is the new pivot.
  • 12. Unit-2 SOLUTION OF SIMULTANEOUS LINEAR EQUATIONS RAI UNIVERSITY, AHMEDABAD 12 Step-III. To evaluate the unknowns. The values of ๐‘ฅ, ๐‘ฆ, ๐‘ง are found from the reduced system (3) by back substitution. 5.1.1 Exampleโ€” Apply gauss elimination method to solve the equations ๐’™ + ๐Ÿ’๐’š โˆ’ ๐’› = โˆ’๐Ÿ“ ๐’™ + ๐’š โˆ’ ๐Ÿ”๐’› = โˆ’๐Ÿ๐Ÿ ๐Ÿ‘๐’™ โˆ’ ๐’š โˆ’ ๐’› = ๐Ÿ’ . Solution: We have [ 1 4 โˆ’1 1 1 โˆ’6 3 โˆ’1 โˆ’1 ][ ๐‘ฅ ๐‘ฆ ๐‘ง ] = [ โˆ’5 โˆ’12 4 ] Operate ๐‘…2 โˆ’ ๐‘…1 & ๐‘…3 โˆ’ 3๐‘…1, ~ [ 1 4 โˆ’1 0 โˆ’3 โˆ’5 0 โˆ’13 2 ][ ๐‘ฅ ๐‘ฆ ๐‘ง ] = [ โˆ’5 โˆ’7 19 ] Operate ๐‘…3 โˆ’ 13 3 ๐‘…2, [ 1 4 1 0 โˆ’3 โˆ’5 0 0 71/3 ][ ๐‘ฅ ๐‘ฆ ๐‘ง ] = [ โˆ’5 โˆ’7 148/3 ] Thus, We have ๐‘ง = 148 71 = 2.0845, 3๐‘ฆ = 7 โˆ’ 5๐‘ง = 7 โˆ’ 10.4225 = โˆ’3.4225 i.e., ๐‘ฆ = โˆ’1.1408 ๐‘ฅ = โˆ’5 โˆ’ 4๐‘ฆ + ๐‘ง = โˆ’5 + 4(1.1408) + 2.0845 = 1.6479 and Hence ๐‘ฅ = 1.6479, ๐‘ฆ = โˆ’1.1408, ๐‘ง = 2.0845.
  • 13. Unit-2 SOLUTION OF SIMULTANEOUS LINEAR EQUATIONS RAI UNIVERSITY, AHMEDABAD 13 5.1.2 Exampleโ€” Solve by using gauss elimination Method. ๐’™ ๐Ÿ + ๐Ÿ๐’™ ๐Ÿ โˆ’ ๐’™ ๐Ÿ‘ = ๐Ÿ‘ ๐Ÿ‘๐’™ ๐Ÿ โˆ’ ๐’™ ๐Ÿ + ๐Ÿ๐’™ ๐Ÿ‘ = ๐Ÿ ๐Ÿ๐’™ ๐Ÿ โˆ’ ๐Ÿ๐’™ ๐Ÿ + ๐Ÿ‘๐’™ ๐Ÿ‘ = ๐Ÿ ๐’™ ๐Ÿ โˆ’ ๐’™ ๐Ÿ + ๐’™ ๐Ÿ‘ = โˆ’๐Ÿ Solution: We have given system of solution ๐‘ฅ1 + 2๐‘ฅ2 โˆ’ ๐‘ฅ3 = 3 3๐‘ฅ1 โˆ’ ๐‘ฅ2 + 2๐‘ฅ3 = 1 2๐‘ฅ1 โˆ’ 2๐‘ฅ2 + 3๐‘ฅ3 = 2 ๐‘ฅ1 โˆ’ ๐‘ฅ2 + ๐‘ฅ3 = โˆ’1 The System of equation can be written in matrix form as [ 1 2 โˆ’1 3 โˆ’1 2 2 1 โˆ’2 โˆ’1 3 1 ][ ๐‘ฅ1 ๐‘ฅ2 ๐‘ฅ3 ] = [ 3 1 2 โˆ’1 ] Operate (โˆ’3) ๐‘…1 + ๐‘…2, (โˆ’2) ๐‘…1 + ๐‘…3, (โˆ’1) ๐‘…1 + ๐‘…4 ~[ 1 2 โˆ’1 0 โˆ’7 5 0 0 โˆ’6 โˆ’3 5 2 ][ ๐‘ฅ1 ๐‘ฅ2 ๐‘ฅ3 ] = [ 3 โˆ’8 โˆ’4 โˆ’4 ] Operate โˆ’ 6 7 ๐‘…2 + ๐‘…3 , โˆ’ 3 7 ๐‘…2 + ๐‘…4
  • 14. Unit-2 SOLUTION OF SIMULTANEOUS LINEAR EQUATIONS RAI UNIVERSITY, AHMEDABAD 14 ~[ 1 2 โˆ’1 0 โˆ’7 5 0 0 0 0 5/7 โˆ’1/7 ][ ๐‘ฅ1 ๐‘ฅ2 ๐‘ฅ3 ] = [ 3 โˆ’8 20/7 โˆ’4/7 ] Operate 1 5 ๐‘…3 + ๐‘…4 ~[ 1 2 โˆ’1 0 โˆ’7 5 0 0 0 0 5/7 0 ][ ๐‘ฅ1 ๐‘ฅ2 ๐‘ฅ3 ] = [ 3 โˆ’8 20/7 0 ] โˆด 5 7 ๐‘ฅ3 = 20 7 โŸน ๐‘ฅ3 = 4 Now โˆ’7๐‘ฅ2 + 5๐‘ฅ3 = โˆ’8 โŸน โˆ’7๐‘ฅ2 + 5(4) = โˆ’8 โŸน โˆ’7๐‘ฅ2 = โˆ’28 โŸน ๐‘ฅ2 = 4 Now ๐‘ฅ1 + 2๐‘ฅ2 โˆ’ ๐‘ฅ3 = 3 โŸน ๐‘ฅ1 + 2(4) โˆ’ 4 = 3 โŸน ๐‘ฅ1 = 3 + 4 โˆ’ 8 โŸน ๐‘ฅ1 = โˆ’1 Hence we get the solution set (๐‘ฅ1,๐‘ฅ2, ๐‘ฅ3) = (4,4,โˆ’1) Now we discuss about 2nd iterative method Gauss โ€“ Seidel. 6.1 Gauss - Seidel iteration Method:
  • 15. Unit-2 SOLUTION OF SIMULTANEOUS LINEAR EQUATIONS RAI UNIVERSITY, AHMEDABAD 15 This is a modification of the Jacobiโ€™s iteration method. As before, we start with initial approximations ๐‘ฅ0, ๐‘ฆ0, ๐‘ง0 (each=0) for ๐‘ฅ, ๐‘ฆ, ๐‘ง respectively. Substituting ๐‘ฆ = ๐‘ฆ0, ๐‘ง = ๐‘ง0 in the first equations, we get ๐‘ฅ1 = ๐‘˜1 Then putting ๐‘ฅ = ๐‘ฅ1, ๐‘ง = ๐‘ง0 in the second of the equations, we have ๐‘ฆ1 = ๐‘˜2 โˆ’ ๐‘™2 ๐‘ฅ1 โˆ’ ๐‘š2 ๐‘ง0 Next substituting ๐‘ฅ = ๐‘ฅ1, ๐‘ฆ = ๐‘ฆ1 in the third equations, we obtain ๐‘ง1 = ๐‘˜3 โˆ’ ๐‘™3 ๐‘ฅ1 โˆ’ ๐‘š3 ๐‘ฆ1 And so on, i.e. as soonas new approximation for an unknown is found, it is immediately used in the next step. This process ofiteration is continued till convergency to the desired degree of accuracy is obtained. 6.1.1 Exampleโ€” Apply Gauss-Seideliterationmethod to solve the equation: ๐Ÿ๐ŸŽ๐’™ + ๐’š โˆ’ ๐Ÿ๐’› = ๐Ÿ๐Ÿ• ๐Ÿ‘๐’™ + ๐Ÿ๐ŸŽ๐’š โˆ’ ๐’› = โˆ’๐Ÿ๐Ÿ– ๐Ÿ๐’™ โˆ’ ๐Ÿ‘๐’š + ๐Ÿ๐ŸŽ๐’› = ๐Ÿ๐Ÿ“ Solution: We write the given equation in the form ๐‘ฅ = 1 20 (17 โˆ’ ๐‘ฆ + 2๐‘ง) โ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆ (1) ๐‘ฆ = 1 20 (โˆ’18โˆ’ 3๐‘ฅ + ๐‘ง) โ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆ (2) ๐‘ง = 1 20 (25 โˆ’ 2๐‘ฅ + 3๐‘ฆ) โ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆ. (3)
  • 16. Unit-2 SOLUTION OF SIMULTANEOUS LINEAR EQUATIONS RAI UNIVERSITY, AHMEDABAD 16 We start form the approximation ๐‘ฅ0 = ๐‘ฆ0 = ๐‘ง0 = 0.substituting ๐‘ฆ = ๐‘ฆ0, ๐‘ง = ๐‘ง0 in the right side of the first of equations (1) we get ๐‘ฅ1 = 1 20 (17โˆ’ ๐‘ฆ0 + 2๐‘ง0) = 0.8500 Putting ๐‘ฅ = ๐‘ฅ1, ๐‘ง = ๐‘ง0 in the second of the equations (1), we have ๐‘ฆ1 = 1 20 (โˆ’18 โˆ’ 3๐‘ฅ1 + ๐‘ง0) = โˆ’1.0275 Putting ๐‘ฅ = ๐‘ฅ1, ๐‘ฆ = ๐‘ฆ1 in the last of the equations (1), we obtain ๐‘ง1 = 1 20 (25โˆ’ 2๐‘ฅ1 + 3๐‘ฆ1) = 1.0109 For the second iteration, we have ๐‘ฅ2 = 1 20 (17 โˆ’ ๐‘ฆ1 + 2๐‘ง1) = 1.0025 ๐‘ฆ2 = 1 20 (โˆ’18 โˆ’ 3๐‘ฅ2 + ๐‘ง1) = โˆ’0.9998 ๐‘ง2 = 1 20 (25โˆ’ 2๐‘ฅ2 + 3๐‘ฆ2) = 0.9998 For the third iteration, we get ๐‘ฅ3 = 1 20 (17 โˆ’ ๐‘ฆ2 + 2๐‘ง2) = 1.0000 ๐‘ฆ3 = 1 20 (โˆ’18 โˆ’ 3๐‘ฅ3 + ๐‘ง2) = โˆ’1.0000 ๐‘ง3 = 1 20 (25โˆ’ 3๐‘ฅ3 + 2๐‘ฆ3) = 1.0000 The values in the 2nd and 3rd iterations bring practically the same, we can stop. Hence the solution is ๐‘ฅ = 1, ๐‘ฆ = โˆ’1, ๐‘ง = 1.
  • 17. Unit-2 SOLUTION OF SIMULTANEOUS LINEAR EQUATIONS RAI UNIVERSITY, AHMEDABAD 17 7.1 Difference betweendirect and iterative methods: Direct Method Iterative Method It computes the solution to a problem in a finite number of steps. In contrast to direct methods, iterative methods are not expected to terminate in a number of steps. These methods give the precise answer if they were performed in infinite precision arithmetic. Iterative methods form successive approximations that converge to the exact solution in the limit. This method takes less time for computation when we have small system linear of equations. This method takes long time for calculation when we have small system of linear equations. When we have large linear system of equation Iterative method became more easy then direct method. Iterative methods are better than direct methods for solving large linear systems e.g. Gauss elimination, LU decomposition e.g. Gauss -Seidel method, Jacobi Method, Newton-Raphson method.
  • 18. Unit-2 SOLUTION OF SIMULTANEOUS LINEAR EQUATIONS RAI UNIVERSITY, AHMEDABAD 18 8. Referencesandwebsite Name: 1. Higher Engineering mathematics by B.S.Grewal 2. Higher Engineering Mathematics by B.V.Ramana 3. http://www.linearequations.org/system-of-linear-equations.html# 4. http://www.mathworks.com/matlabcentral/answers/7058-are-iterative- methods-always-better-than-direct-methods-for-solving-large-linear-systems 5. http://1.bp.blogspot.com/- pHo8nT2SKgM/UPKdqSinfSI/AAAAAAAAC9I/JZHDxmqADsg/s1600/dir ect_vs_indirect.png
  • 19. Unit-2 SOLUTION OF SIMULTANEOUS LINEAR EQUATIONS RAI UNIVERSITY, AHMEDABAD 19 EXERCISE Q-1 Evaluate the following questions: 1. Solve the following system of linear equation ๐‘ฅ + 4๐‘ฆ = โˆ’10 ,3๐‘ฅ โˆ’ ๐‘ฆ = 9 2. Solve the following system of linear equation 3๐‘ฅ + 7๐‘ฆ = 15,5๐‘ฅ + 2๐‘ฆ = โˆ’4 3. Show that the non Homogeneous system of linear equation are not consistant. 2๐‘ฅ + 6๐‘ฆ = โˆ’11 6๐‘ฅ + 20๐‘ฆ โˆ’ 6๐‘ง = โˆ’3 6๐‘ฆ โˆ’ 18๐‘ง = โˆ’1 4. Test the consistency of the following equations and solve them if possible. 3๐‘ฅ + 3๐‘ฆ + 3๐‘ง = 1 ๐‘ฅ + 2๐‘ฆ = 4 10๐‘ฆ + 3๐‘ง = โˆ’2 2๐‘ฅ โˆ’ 3๐‘ฆ โˆ’ ๐‘ง = 5 Q-2 Evaluate the following questions: 1. Solve the following equations by Gauss elimination method: 2๐‘ฅ + ๐‘ฆ + ๐‘ง = 10 3๐‘ฅ + 2๐‘ฆ + 3๐‘ง = 18 ๐‘ฅ + 4๐‘ฆ + 9๐‘ง = 16 2. Solve the following equations by Gauss elimination method: 2๐‘ฅ โˆ’ ๐‘ฆ + 3๐‘ง = 9
  • 20. Unit-2 SOLUTION OF SIMULTANEOUS LINEAR EQUATIONS RAI UNIVERSITY, AHMEDABAD 20 ๐‘ฅ + ๐‘ฆ + ๐‘ง = 6 ๐‘ฅ โˆ’ ๐‘ฆ + ๐‘ง = 2 3. Solve the following equations by Gauss-Seidel method: 2๐‘ฅ + ๐‘ฆ + 6๐‘ง = 9 8๐‘ฅ + 3๐‘ฆ + 2๐‘ง+ 13 = 0 ๐‘ฅ + 5๐‘ฆ + ๐‘ง = 7 4. Solve the following equations by Gauss-Seidel method: 28๐‘ฅ + 4๐‘ฆ โˆ’ ๐‘ง = 32 ๐‘ฅ + 3๐‘ฆ + 10๐‘ง = 24 2๐‘ฅ + 17๐‘ฆ + 4๐‘ง = 35
  • 21. Unit-2 SOLUTION OF SIMULTANEOUS LINEAR EQUATIONS RAI UNIVERSITY, AHMEDABAD 21