Solves a system of 3 linear equations with 3 variables.
Enter the augmented matrix of the system:
Contents
About
This JavaScript program solves a linear system of equations represented by an augmented system matrix. For example, the augmented matrix:
represents the following system of linear equations:0 2 4 : 16 0 4 1 : 11 5 2 0 : 9
2y + 4z = 16
4y + z = 11
5x + 2y = 9
On completion of the algorithm, the augmented matrix would be transformed to:
which means that the solution to the system of equations is x = 1, y = 2, z = 3.1 0 0 : 1 0 1 0 : 2 0 0 1 : 3
To operate the solver, enter the elements of the augmented matrix into the cells above. Press the [ Initialize ] key set the state of the solver to the starting value. Press the [ Single Step ] key to advance through each step of the algorithm.
If the algorithm determines that the system is singular, having no solution, a pop-up message will be displayed. The algorithm will not advance any further.
Source Code
The Java Script source code for this program can be viewed by using the View|Source command of your web browser.
You may use or modify this source code in any way you find useful, provided that you agree that the author has no warranty, obligations or liability. You must determine the suitablility of this source code for your use.
Discussion
The Gauss-Jordan method enables us to solve a set of linear equations. It is done by manipulating an augmented system matrix using elementary row operations to put the matrix into reduced row echelon form. The following criteria apply:
The Gauss-Jordan algorithm performs operations to arrange the system matrix to meet the above criteria. This allows the solution to be found by inspection. All that remains in the matrix is a main diagonal of ones and the augmentation column. Since the matrix is representing the coefficients of the system variables, the augmentation column represents the values of each of those variables.
Gauss-Jordan Elimination Algorithm:
Reference/u>
Elementary Mathematical Analysis
AbCd Classics - free on-line books