Gauss elimination

Solution of system of equation by Gauss elimination

You are now following this Submission

Solution of system of equation by Gauss elimination
In order to apply Gauss elimination method, we need to express linear equations in matrix form AX=B, where A is called Coefficient matrix and B Right hand side vector.
Arrange matrices A and B in augmented matrix.
Now, use elementary row operations to reduced to upper traingular form.
Exchanging or swapping two rows
Adding the certain multiple of one row to another row
Multiplying a row by non-zero number
This procedure is repeated until the augmented matrix is reduced to upper triangular form
Now by back substitution the values of the variables can be found.
Example : By Gauss Elimination method, solve
x + y + z = 9
2x - 3y + 4z = 13
3x + 4y + 5z = 40
Enter matrix A : [1,1,1;2,-3,4;3,4,5]
A =
1 1 1
2 -3 4
3 4 5
Enter rhs vector B : [9;13;40]
1.0000 1.0000 1.0000 9.0000
0 -5.0000 2.0000 -5.0000
0 0 2.4000 12.0000
Solution =
1
3
5

Cite As

Langel Thangmawia (2026). Gauss elimination (https://www.mathworks.com/matlabcentral/fileexchange/180726-gauss-elimination), MATLAB Central File Exchange. Retrieved .

Tags

Add Tags

Add the first tag.

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.1

Explaination and example added

1.0.0