© December 2019 | IJIRT | Volume 6 Issue 7 | ISSN: 2349-6002
IJIRT 148839 INTERNATIONAL JOURNAL OF INNOVATIVE RESEARCH IN TECHNOLOGY 75
Gauss Jordan Method to Obtain Solution of Simultaneous
Equation
Vishal Vaman Mehtre
1
, Aakriti
2
1
Assistant Professor, Department of Electrical Engineering BVDUCOE, Pune, India
2
Student, Department of Electrical, Engineering, BVDUCOE, Pune, India
Abstract- The review paper consists of GAUSS
JORDAN METHOD using MATLAB to solve
simultaneous algebraic equations by row and column
elimination. In MATLAB there is a proper set of codes
that is given as input, and the desired output result is
obtained. The GAUSS JORDAN METHOD is also used
for solving of simultaneous algebraic equations. The
augmented matrix is reduced to echelon form and then
the desired result is obtained
1. INTRODUCTION
The GAUSS ELIMINATION Method is named after
Mathematician Carl Friedrich Gauss and Wilhelm
Jordan, after their Name
It Is Called So. It is a Technique in Which A System
of Linear Equations Is Resolved By Means Of
Matrices.[6]
2.GAUSS JORDAN METHOD
Gauss Jordan method is a method to solve linear
simultaneous algebraic equations. This method
involves transformation of rows and columns to
reduce the matrix into echelon form. Gauss Jordan
method is also useful in finding inverse of a matrix.
Solve the following system of equations using
GAUSS JORDAN METHOD.[2] { x+2yz+3v+w=2,
2x+4y-2z+6v+3w=6, -x2y+zv+3w=4}?
It is a system of 3 equations in 5 variables. So, there
are not any unique solutions. The most we can do is
get 3 linear independent equations.in this case the
equations are actually very similar , if we multiply
the first equations by 2 and subtract it from the
second equation , we get w=2 .if we add the first and
third equations , we get 2v+4w=6.
Substituting w=2 gives us v= -1. This just leaves us
with x+2y-z=3. That’s all we can find out from the
given in this method: Information.
3. GAUSS JORDAN METHOD IN MATLAB.
CODE
Gauss Jordan Method
MATLAB
Function[X,err]=gauss_jordan_elim(a,b) [2]
D = [0 2 1; 1 1 2; 2 1 1] [3]
E= [4; 6; 7] 4 [1] [a,b]=size(D); 5 err =0; 6
X=zeros(a,1);.
7 if ~= a b 8 disp('error: a~=b'); 9 err = 1; 10 end 11
if length(E) ~= a 12 disp('error: wrong size of E'); 13
err = 2; 14 else 15 if size(E,2) ~= 1 16 E=E'; 17 end
18 if size(E,2) ~= 1 19 disp('error: E is a matrix'); 20
err = 3; 21 end 22 end 23 if err == 0 24 A=[D,E]; 25
for i=1:a 26
[A (i:a,i:a+1),err]=gauss_pivot(A(i:a,i:a+1)); 27 if err
== 0 28
A(1:a,i:a+1)=gauss_jordan_step(A(1:a,i:a+ 1),i); 29
end 30 end 31 x=A(:,a+1); 32 end
33 D=0; 34 function
A1=gauss_jordan_step(D,i) 35 36 [a,b]=size(D); 37
D1=D; 38 S=D1(i,1); 39
D1(i,:) = D(i,:)/S; 40 k=[[1:i-1],[i+1:a]]; 41 for j=k
42 S=D1(j,1); 43 D1(j,:)=D1(j,:)D1(i,:)*S;
44 end 45 function
[D1, err]=gauss_pivot(D) 46 [a,b]=size(D);. 47
D1=D; 48 err = 0; % error flag 49 if
D1 (1,1) == 0 50 check= logical(1);. 51 i = 1; 52
while check 53 i = i + 1; 54 if i > a 55 disp('error:
matrix is singular'); 56 err = 1; 57 check = logical(0);
58 else 59 if D(i,1) ~= 0 & check 60 check =
logical(0);
61 E=E1(i,:); 62 D1(i,:)=D1(1,:); 63 D1(1,:)=E; 764
end 65 end 66 end 67 end The given program code is
for solving the following equations using Gauss
Jordan method in MATLAB: 0x + 2y + 1z = 4 1x +
1y + 2z = 6 2x + 1y+ 1z = 7 Therefore in the
program, the value of A = [0 2 1;1 1 2; 2 1 1] and that
of B = [4;6;7]. In order to run the program, use the