Tool to apply the gaussian elimination method and get the row reduced echelon form, with steps, details, inverse matrix and vector solution.
Gaussian Elimination - dCode
Tag(s) : Matrix, Symbolic Computation
dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!
The Gaussian elimination algorithm (also called Gauss-Jordan, or pivot method) makes it possible to find the solutions of a system of linear equations, and to determine the inverse of a matrix.
The algorithm works on the rows of the matrix, by exchanging or multiplying the rows between them (up to a factor).
At each step, the algorithm aims to introduce into the matrix, on the elements outside the diagonal, zero values.
From a system of linear equations, the first step is to convert the equations into a matrix.
Example: $$ \left\{ \begin{array}{} x&-&y&+&2z&=&5\\3x&+&2y&+&z&=&10\\2x&-&3y&-&2z&=&-10\\\end{array} \right. $$ can be written under multiplication">matrix multiplication form: $$ \left( \begin{array}{ccc} 1 & -1 & 2 \\ 3 & 2 & 1 \\ 2 & -3 & -2 \end{array} \right) . \left( \begin{array}{c} x \\ y \\ z \end{array} \right) = \left( \begin{array}{c} 5 \\ 10 \\ -10 \end{array} \right) $$ that corresponds to the (augmented) matrix $$ \left( \begin{array}{ccc|c} 1 & -1 & 2 & 5 \\ 3 & 2 & 1 & 10 \\ 2 & -3 & -2 & -10 \end{array} \right) $$
Then, for each element outside the non-zero diagonal, perform an adequate calculation by adding or subtracting the other lines so that the element becomes 0.
Example: Subtract 3 times (Row 1) to (Row 2) such as the element in row 2, column 1 becomes 0: $$ \left( \begin{array}{ccc|c} 1 & -1 & 2 & 5 \\ 0 & 5 & -5 & -5 \\ 2 & -3 & -2 & -10 \end{array} \right) $$
Subtract 2 times (Row 1) to (Row 3) such as the element in row 3, column 1 becomes 0: $$ \left( \begin{array}{ccc|c} 1 & -1 & 2 & 5 \\ 0 & 5 & -5 & -5 \\ 0 & -1 & -6 & -20 \end{array} \right) $$
Subtract 1/5 times (Row 2) to (Row 3) such as the element in row 3, column 2 becomes 0: $$ \left( \begin{array}{ccc|c} 1 & -1 & 2 & 5 \\ 0 & 5 & -5 & -5 \\ 0 & 0 & -7 & -21 \end{array} \right) $$
Subtract 1/5 times (Row 2) to (Row 1) such as the element in row 1, column 2 becomes 0: $$ \left( \begin{array}{ccc|c} 1 & 0 & 1 & 4 \\ 0 & 5 & -5 & -5 \\ 0 & 0 & -7 & -21 \end{array} \right) $$
Subtract 1/7 times (Row 3) to (Row 1) such as the element in row 1, column 3 becomes 0: $$ \left( \begin{array}{ccc|c} 1 & 0 & 0 & 1 \\ 0 & 5 & -5 & -5 \\ 0 & 0 & -7 & -21 \end{array} \right) $$
Subtract 5/7 times (Row 3) to (Row 2) such as the element in row 2, column 3 becomes 0: $$ \left( \begin{array}{ccc|c} 1 & 0 & 0 & 1 \\ 0 & 5 & 0 & 10 \\ 0 & 0 & -7 & -21 \end{array} \right) $$
Simplify each line by dividing the value on the diagonal
Example: $$ \left( \begin{array}{ccc|c} 1 & 0 & 0 & 1 \\ 0 & 1 & 0 & 2 \\ 0 & 0 & 1 & 3 \end{array} \right) $$
The result vector is the last column.
Example: $ {1,2,3} $ that corresponds to $ {x,y,z} $ so $ x=1, y=2, z=3 $
dCode retains ownership of the "Gaussian Elimination" source code. Except explicit open source licence (indicated Creative Commons / free), the "Gaussian Elimination" algorithm, the applet or snippet (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or the "Gaussian Elimination" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) and all data download, script, or API access for "Gaussian Elimination" are not public, same for offline use on PC, mobile, tablet, iPhone or Android app!
Reminder : dCode is free to use.
The copy-paste of the page "Gaussian Elimination" or any of its results, is allowed (even for commercial purposes) as long as you credit dCode!
Exporting results as a .csv or .txt file is free by clicking on the export icon
Cite as source (bibliography):
Gaussian Elimination on dCode.fr [online website], retrieved on 2024-11-05,