This Gaussian Elimination Calculator solves small systems of linear equations in two or three unknowns. You enter the coefficients of your equations in the fields labeled a11, a12, …, and the constant terms in the fields labeled b1, b2, b3. The tool then applies Gaussian elimination with partial pivoting to compute the solution.
The calculator supports:
It automatically detects whether your system has:
Write your system in the standard form
Equation 1: a11·x + a12·y + a13·z = b1
Equation 2: a21·x + a22·y + a23·z = b2
Equation 3: a31·x + a32·y + a33·z = b3
Then fill in the form as follows:
For a 2×2 system in variables x and y, you can either:
a13, a23, and all third-row entries as 0, orMathematically, we start from the matrix equation A·x = b, where A is the coefficient matrix, x is the vector of unknowns, and b is the vector of constants. For a 3×3 system,
We form the augmented matrix [A | b] and use row operations to turn A into an upper triangular matrix (zeros below the main diagonal). The allowed row operations are:
These operations do not change the set of solutions. Once the matrix is upper triangular, the calculator performs back substitution to obtain x, y, and z.
After you click the solve button, the calculator reports:
x = 2, y = -1, z = 0.5).0·x + 0·y + 0·z = 5).0·x + 0·y + 0·z = 0 and not all variables can be solved uniquely).When there is a unique solution, you can substitute the reported values back into the original equations to verify they satisfy each equation within normal rounding error.
Consider the system:
Equation 1: 2x + 1y = 5
Equation 2: 1x + 3y = 7
Write the equations as
2x + 1y + 0z = 5
1x + 3y + 0z = 7
Enter:
a11 = 2, a12 = 1, a13 = 0, b1 = 5a21 = 1, a22 = 3, , b2 = 7a31, a32, a33, b3) to 0The augmented matrix is
[ 2 1 | 5 ]
[ 1 3 | 7 ]
Swap rows if needed to choose a good pivot. Here we can keep the current order. Eliminate the first variable from the second row:
Row2 ← Row2 − (1/2)·Row1
[ 2 1 | 5 ]
[ 0 2.5 | 4.5 ]
From the second row we get 2.5y = 4.5, so y = 4.5 / 2.5 = 1.8. Substitute into the first equation:
2x + 1.8 = 5 ⇒ 2x = 3.2 ⇒ x = 1.6.
The calculator returns approximately x = 1.6 and y = 1.8. (If a third variable z is present in your system, you will also see a value for z.)
| Method | Typical use | Pros for 2×2 / 3×3 systems | Cons / limitations |
|---|---|---|---|
| Gaussian elimination (this calculator) | Numeric solutions for small linear systems | Systematic, works in general, identifies no/infinitely many solutions | Numeric rounding; not symbolic; designed for up to 3×3 here |
| Substitution | Hand calculations in basic algebra | Intuitive for small systems; easy to show steps by hand | Becomes messy for 3×3 or larger; harder to automate |
| Matrix inverse (A−1b) | Theory and small exact examples | Elegant formula when A is invertible | Requires invertible matrix; computing the inverse is more work than elimination alone |
| LU / QR factorization | Large or repeated systems in numerical computing | Efficient and stable for big matrices or many right-hand sides | Overkill for simple 2×2 and 3×3 homework-style problems |
Within these limits, Gaussian elimination is a reliable and standard method for solving small systems, making this calculator a practical companion for algebra courses and introductory linear algebra.