SlideShare a Scribd company logo
1 of 18
Download to read offline
Jorge Eduardo Celis
vargas
Code: 2073412
GAUSS-JORDAN
• Gaussian elimination is an algorithm of linear algebra to determine
the solutions of a system of linear equations, matrices and inverse
finding.
The computational complexity of Gaussian elimination is
approximately n3. That is, the number of operations required is n3 if
the size of the matrix is n × n
m
n
mn
m
m
n
n
n
n
b
x
a
x
a
x
a
b
x
a
x
a
x
a
b
x
a
x
a
x
a
.....
.....
.....
2
2
1
1
2
2
2
22
1
21
1
1
2
13
1
12

m
mn
m
m
n
n
b
b
b
a
a
a
a
a
a
a
a
a


2
1
2
1
2
22
21
1
12
11
.......
........
........
........
_ n
2
1 x
x
x
System of linear equations
Resulting augmented matrix
Mathematical Algorithm
1. Go to the far left column is not zero
2. If the first line has a zero in this column, swap it with
another that does not have If
0
,
,
0 12
11 a
a
m
mn
m
m
n
n
b
b
b
a
a
a
a
a
a
a
a
a


2
1
1
2
2
21
22
1
11
12
.......
........
........
GAUSS-JORDAN
3. Then, get below zero this item forward, adding
appropriate multiples of row than the row below it.
This is done through the following:
• Multiply an equation by a nonzero scalar.
• Exchange of position two equations.
• Add to a multiple of another equation.
m
mn
m
m
n
n
m
mn
m
m
n
n
b
b
a
b
a
a
a
a
a
a
a
a
a
a
a
F
b
b
b
a
a
a
a
a
a
a
a
a




2
11
1
2
1
2
22
21
11
1
11
12
11
2
1
2
1
2
22
21
1
12
11
.......
........
........
1
)
1
(
*
1
.......
........
........
GAUSS-JORDAN
4. Cover the top row and repeat the above process with the remaining
submatrix. Repeat with the rest of the lines (at this point the array is in
the form of step)
m
mn
m
m
n
n
m
mn
m
m
n
n
b
a
b
b
a
b
a
a
a
a
a
a
a
a
a
a
F
F
b
b
a
b
a
a
a
a
a
a
a
a
a
a




11
1
2
11
1
2
1
2
22
11
1
11
12
21
2
11
1
2
1
2
22
21
11
1
11
12
.......
........
0
........
1
*
1
2
.......
........
........
1
1
.......
0
........
0
...
1
....
0
....
0
....
....
1
...
0
...
...
..
1
3
2
13
1
13
12

n
n
n
a
a
a
a
a
a
GAUSS-JORDAN
5. Starting with the last line is not zero, move up: for each row
get a 1 up front and introduce zero multiples of this sum for
the rows corresponding
1
.......
0
........
0
0
...
1
....
0
....
0
....
....
1
...
0
...
...
...
1
)
(
*
)
1
(
1
.......
0
........
0
...
1
....
0
....
0
....
....
1
...
0
...
...
..
1
2
23
1
13
12
3
3
2
13
1
13
12


n
n
n
n
n
n
a
a
a
a
a
a
Fn
n
F
a
a
a
a
a
a
We repeat this procedure until you reach a small phased array.
GAUSS-JORDAN
6. Then we obtain the solutions of systems of equations
bn
b
b
b
xn
x
x
x


3
2
1
.......
0
........
0
0
...
3
....
0
....
0
0
....
0
....
2
...
0
0
...
0
....
0
...
1
Then the solution is:
bn
xn
b
x
b
x

2
2
1
1
Example
3
2
2
11
2
3
8
2
z
y
x
z
y
x
z
y
x
3
2
1
2
11
2
1
3
8
1
1
2
)
2
1
(
*
1
F
3
2
1
2
11
2
1
3
4
2
/
1
2
/
1
1
3
1
2
3 2
1
F
F
F
F
5
1
2
0
1
2
/
1
2
/
1
0
4
2
/
1
2
/
1
1
Example
2
*
2
F
5
1
2
0
2
1
1
0
4
2
/
1
2
/
1
1
3
2
2
)
2
/
1
( 1
2
F
F
F
F
1
1
0
0
2
1
1
0
3
1
0
1
Example
1
*
3
1
3
2
3
F
F
F
F
F
1
1
0
0
3
0
1
0
2
0
0
1
Z
Y
X
Then the solution of this system of equations is:
1
;
3
;
2 z
y
x
Example
Flow Chart
INICIO
1
i=1,n,1
j=1,n,1
M(j,i)
F(i)
1
f

2
f
n
f
11
a 12
a  n
a1
21
a 22
a 
n
a2
  
1
n
a 2
n
a 
nn
a
i
j
nxn
M j
f
M(j,k)=M(j,k)/M
(j,i)
F(j)=F(j)-
M(j,i)*F(i)
k=i,n,1
M(j,k)=M(j,k)-
M(j,i)*M(i,k)
F(i)=F(i)/M(j,i)
1
i=j
k=i,n,1
si no
j=1,n,1
i=1,n,1 2
1 12
a  n
a1
0 1 
n
a2
  
0 0  1
i
j
k
F(j)=F(j)-
M(j,i)*F(i)
2
j=i-1,1,-1
i=n,1,-1
k=i,n,1
M(j,k)=M(j,k)-
M(j,i)*M(i,k)
i=1,n,1
‘X’(i)=F(i)
FIN
1 0  0
0 1  0
  
0 0  1
1
x 2
x  n
x
1
f

2
f
n
f
k
i
j
Code
• Fortran:
program gauss_Jordan
integer::i,j,n,k
real::a
real,allocatable::m(:,:)
real,allocatable::f(:)
read(*,*)n
allocate(m(n,n),f(n))
do i=1,n,1
read(*,*)f(i)
end do
do i=1,n,1
read(*,*)m(i,1:n)
end do
do i=1,n,1
do j=1,n,1
if(i==j)then
a=m(j,i)
do k=i,n,1
m(j,k)=(m(j,k))/(a)
end do
f(i)=(f(i))/(a)
else
a=m(j,i)
m(j,k)=m(j,k)-a*m(i,k)
end do
f(j)=f(j)-a*f(i)
end if
end do
end do
do i=n,1,-1
do j=i-1,1,-1
a=m(j,i)
do k=j,n,1
m(j,k)=m(j,k)-a*m(i,k)
end do
f(j)=f(j)-a*f(i)
end do
end do
do i=1,n,1
write(*,*)’x’,(i),’=‘,f(i)
end do
write(*,*)'bn'
write(*,*)m
close(25)
end program gauss
•JAVA
package javaapplication1;
import javax.swing.JOptionPane;
import java.util.Scanner;
public class Gauss_Jordan {
public static void main(String[] args) {
int i,j,k,n;
double a;
double m[][],f[];
Scanner reader=new Scanner(System.in);
System.out.println("escriba n");
n=reader.nextInt();
m=new double [n][n];
f=new double [n];
for(i=0;i<n;i++){
f[i]=Double.parseDouble(JOptionPane.showInputDialog("f"+i));
for(j=0;j<n;j++){
m[i][j]=Double.parseDouble(JOptionPane.showInputDialog("M("+i+j+")"));}}
for(i=0;i<n;i++){
for(j=0;j<n;j++){
a=m[j][i];
if(i==j){
for(k=i;k<=n;k++){
m[j][k]=(m[j][k]/a);}
f[i]=(f[i]/a);}
else {
for(k=i;k<=n;k++){
m[j][k]=m[j][k]-a*m[i][k];}
f[j]=f[j]-a*f[i];}}}
for(i=n;i>=0;i--){
for(j=i-1;j>=0;j--){
a=m[j][i];
for(k=j;k<=n;k++){
m[j][k]=m[j][k]-a*m[i][k];}
f[j]=f[j]-a*f[i];}}
for(i=0;i<n;i++){
System.out.println("x"+i+"="+f[i]);}}}
bibliography
• http://www.acatlan.unam.mx/acatlecas/mn
/sistemas.htm#3.1.1._Método_de_Gauss_
• Internet wikipedia.

More Related Content

Similar to gauss-jordan-100722001245-phpapp01.pdf

Applied numerical methods lec6
Applied numerical methods lec6Applied numerical methods lec6
Applied numerical methods lec6Yasser Ahmed
 
Directs Methods
Directs MethodsDirects Methods
Directs MethodsUIS
 
LINEAR EQUATION.pptx
LINEAR EQUATION.pptxLINEAR EQUATION.pptx
LINEAR EQUATION.pptxSarabanTahora
 
Numerical Method Analysis: Algebraic and Transcendental Equations (Linear)
Numerical Method Analysis: Algebraic and Transcendental Equations (Linear)Numerical Method Analysis: Algebraic and Transcendental Equations (Linear)
Numerical Method Analysis: Algebraic and Transcendental Equations (Linear)Minhas Kamal
 
Numerical solutions for linear system of equations
Numerical solutions for linear system of equationsNumerical solutions for linear system of equations
Numerical solutions for linear system of equationsMohamed Mohamed El-Sayed
 
Gauss Jordan
Gauss JordanGauss Jordan
Gauss JordanEzzat Gul
 
Gaussian elimination method & homogeneous linear equation
Gaussian elimination method & homogeneous linear equationGaussian elimination method & homogeneous linear equation
Gaussian elimination method & homogeneous linear equationStudent
 
Linear Algebra- Gauss Elim-converted.pptx
Linear Algebra- Gauss Elim-converted.pptxLinear Algebra- Gauss Elim-converted.pptx
Linear Algebra- Gauss Elim-converted.pptxMazwan3
 
Maths iii quick review by Dr Asish K Mukhopadhyay
Maths iii quick review by Dr Asish K MukhopadhyayMaths iii quick review by Dr Asish K Mukhopadhyay
Maths iii quick review by Dr Asish K MukhopadhyayDr. Asish K Mukhopadhyay
 
Elementary-linear-algebra- chapter 1.pdf
Elementary-linear-algebra- chapter 1.pdfElementary-linear-algebra- chapter 1.pdf
Elementary-linear-algebra- chapter 1.pdfRanaHammad39
 
NUMERICAL METHODS -Iterative methods(indirect method)
NUMERICAL METHODS -Iterative methods(indirect method)NUMERICAL METHODS -Iterative methods(indirect method)
NUMERICAL METHODS -Iterative methods(indirect method)krishnapriya R
 
Gauss Jorden and Gauss Elimination method.pptx
Gauss Jorden and Gauss Elimination method.pptxGauss Jorden and Gauss Elimination method.pptx
Gauss Jorden and Gauss Elimination method.pptxAHSANMEHBOOB12
 

Similar to gauss-jordan-100722001245-phpapp01.pdf (20)

Es272 ch4a
Es272 ch4aEs272 ch4a
Es272 ch4a
 
Applied numerical methods lec6
Applied numerical methods lec6Applied numerical methods lec6
Applied numerical methods lec6
 
system linear equations
 system linear equations  system linear equations
system linear equations
 
Directs Methods
Directs MethodsDirects Methods
Directs Methods
 
LINEAR EQUATION.pptx
LINEAR EQUATION.pptxLINEAR EQUATION.pptx
LINEAR EQUATION.pptx
 
Numerical Method Analysis: Algebraic and Transcendental Equations (Linear)
Numerical Method Analysis: Algebraic and Transcendental Equations (Linear)Numerical Method Analysis: Algebraic and Transcendental Equations (Linear)
Numerical Method Analysis: Algebraic and Transcendental Equations (Linear)
 
Numerical solutions for linear system of equations
Numerical solutions for linear system of equationsNumerical solutions for linear system of equations
Numerical solutions for linear system of equations
 
Numerical Methods
Numerical MethodsNumerical Methods
Numerical Methods
 
Gauss Jordan
Gauss JordanGauss Jordan
Gauss Jordan
 
Nmsa 170900713008
Nmsa 170900713008Nmsa 170900713008
Nmsa 170900713008
 
Gaussian elimination method & homogeneous linear equation
Gaussian elimination method & homogeneous linear equationGaussian elimination method & homogeneous linear equation
Gaussian elimination method & homogeneous linear equation
 
Linear Algebra- Gauss Elim-converted.pptx
Linear Algebra- Gauss Elim-converted.pptxLinear Algebra- Gauss Elim-converted.pptx
Linear Algebra- Gauss Elim-converted.pptx
 
Maths iii quick review by Dr Asish K Mukhopadhyay
Maths iii quick review by Dr Asish K MukhopadhyayMaths iii quick review by Dr Asish K Mukhopadhyay
Maths iii quick review by Dr Asish K Mukhopadhyay
 
demo attachment
demo attachmentdemo attachment
demo attachment
 
algebra
algebraalgebra
algebra
 
Elementary-linear-algebra- chapter 1.pdf
Elementary-linear-algebra- chapter 1.pdfElementary-linear-algebra- chapter 1.pdf
Elementary-linear-algebra- chapter 1.pdf
 
Assignment model
Assignment modelAssignment model
Assignment model
 
NUMERICAL METHODS -Iterative methods(indirect method)
NUMERICAL METHODS -Iterative methods(indirect method)NUMERICAL METHODS -Iterative methods(indirect method)
NUMERICAL METHODS -Iterative methods(indirect method)
 
Gauss Jorden and Gauss Elimination method.pptx
Gauss Jorden and Gauss Elimination method.pptxGauss Jorden and Gauss Elimination method.pptx
Gauss Jorden and Gauss Elimination method.pptx
 
Gauss simple
Gauss simpleGauss simple
Gauss simple
 

More from PraveenGaddi2

More from PraveenGaddi2 (7)

maths ppt vikki.pptx
maths ppt vikki.pptxmaths ppt vikki.pptx
maths ppt vikki.pptx
 
PRAVEEN MATHS.pptx
PRAVEEN MATHS.pptxPRAVEEN MATHS.pptx
PRAVEEN MATHS.pptx
 
AKASH.pptx
AKASH.pptxAKASH.pptx
AKASH.pptx
 
Presentation ai.pptx
Presentation ai.pptxPresentation ai.pptx
Presentation ai.pptx
 
Presentation ECSE.pdf
Presentation ECSE.pdfPresentation ECSE.pdf
Presentation ECSE.pdf
 
Present.pptx
Present.pptxPresent.pptx
Present.pptx
 
PPT ON POSTERS.pptx
PPT ON POSTERS.pptxPPT ON POSTERS.pptx
PPT ON POSTERS.pptx
 

Recently uploaded

A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
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 . pdfQucHHunhnh
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
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 ConsultingTechSoup
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024Janet Corral
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 

Recently uploaded (20)

A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
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
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
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
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 

gauss-jordan-100722001245-phpapp01.pdf