Posts

Showing posts with the label Gauss-Jordan

mathajax

Solving System of Linear Equations by Gauss Jordan Elimination

Image
It finds a solution vector X for solving a system of linear equations which has NxN elements using Gauss-Jordan elimination method. Gauss-Jordan elimination method matrix A has N x N elements I, Identity matrix has N x N elements b is a vector has Nx1 system of non-homogeneous elements A|b is a augmented matrix result X, is a solution vector has Nx1 elements Elementary row operation is applied to augmented matrix, until it transforms A|b into I|X Algorithm Steps for solving system of linear equations by Gauss-Jordan Elimination Read Matrix A Read vector b form Augmented matrix A|b For i=1 To N For j=1 To N IF i not-equal j apply RowOperation.add(j,i ,-a ii /a ji ) on augmented matrix A|I End End End Divide each i th row of non-zero elements in A|b by a ii Java programming code- Gauss Jordan solving Linear equations im...

Inverse Matrix by Gauss Jordan Elimination

Image
It finds N x N inverse matrix for a matrix which has NxN elements by Gauss-Jordan elimination method. Gauss-Jordan elimination method A, matrix has N x N elements I, Identity matrix has N x N elements A|I is a augmented matrix Elementary row operation is applied to augmented matrix A|I and it transforms A|I into I|A -1 . Algorithm Steps for Inverse matrix by Gauss-Jordan Elimination Read Matrix A form Augmented matrix, A|I For i=1 To N For j=1 To N IF i not-equal j apply RowOperation.add(j,i ,-a ii /a ji ) on augmented matrix A|I End End End divide each row of A|I by main diagonal elements, a ii Gauss Jordan Inverse - Java programming code public class Gaussjordan { Matrix mat ; public Gaussjordan( double A[][]) { int row=A.length; int col=A[0].length; mat = new Matrix (row,...