Skip to content

fdiengdoh/gauss-jordan-method

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Gauss-Jordan Elimination Method

For solving sets of linear equations, Gauss-Jordan elimination produces both the solution of the equations for one or more right-hand side vectors $b$, and also the matrix inverse $A^{−1}$.

The subroutine used here is adapted from Numerical Recipies. You can find the subroutine and relevant files in the code folder.

Example

$$x + y + 2 = 5$$

$$2x + 3y + 5z = 8$$

$$4x + 5z = 2$$

This can be written in agumented matrix form as follows:

$$\begin{bmatrix}1 & 1 & 1\\2 & 3 & 5\\4 & 0 & 5\end{bmatrix} \begin{bmatrix}5\\8\\2\end{bmatrix}$$

The two matrices can be then use as input in to the gauss-jordan subroutine to find the solution for $x$, $y$ and $z$.

File List

Releases

No releases published

Packages

No packages published