Share this free calculator
Send this tool to someone who needs the calculation.
How to use
This tool solves a 2×2 or 3×3 linear system. It uses Gaussian elimination with partial pivoting for numerical stability, then distinguishes a unique solution from an inconsistent system or a system with infinitely many solutions.
- Choose 2×2 or 3×3.
- Enter each equation's variable coefficients and right-hand constant; in 2×2 mode only the first two variables and equations are used.
- Calculate to see the classification and, when unique, the variable values.
How it is calculated
Example
Example 2×2: 2x+y=5 and x−y=1. The unique solution is x=2 and y=1, which satisfies both equations. Three-variable example: x+y+z=6, 2x−y+z=3, and x+2y−z=2. Select 3×3; enter coefficient rows (1,1,1), (2,−1,1), (1,2,−1) and constants 6,3,2. The solution is x=1, y=2, z=3; substitution returns 6,3,2 respectively. Enter −1 for the coefficient of −y, keeping the right-hand constant separate.
Important notes
The calculator uses floating-point arithmetic, so nearly singular systems can be numerically sensitive. For safety-critical engineering or large systems, use specialized numerical software and inspect matrix conditioning.
Worked examples and interpreting results
The equations x+y=5 and x−y=1 have the unique solution x=3, y=2. Adding the equations eliminates y; substituting x back into the first equation verifies the solution.
| Case | Calculation | Result |
|---|---|---|
| Value of x | 2x = 6 → x = 6 ÷ 2 | 3 |
| Value of y | y = 5 − 3 | 2 |
| x for x+y+z=6; 2x−y+z=3; x+2y−z=2 | x = 1; 1 + 2 + 3 = 6 | 1 |
| y in the three-variable worked system | y = 2; 2(1) − 2 + 3 = 3 | 2 |
| z in the three-variable worked system | z = 3; 1 + 2(2) − 3 = 2 | 3 |
How to check the result
Proportional equations may not have a unique solution. x+y=5 and 2x+2y=10 have infinitely many solutions; replacing 10 with 11 makes them inconsistent. Enter variable coefficients in the same order in every row.
Frequently asked questions
Can this solve a 3-variable system of equations?
Yes. Choose 3×3 and enter the coefficients of x, y and z plus the right-hand constant for each of the three equations.
When are there infinitely many solutions?
When equations are dependent and the system remains consistent, leaving at least one free variable.
When is there no solution?
When elimination exposes a contradiction such as 0 equaling a non-zero value.
Does this use Cramer's rule?
No. It uses partial-pivot Gaussian elimination, a general approach for small systems.
How do I enter a missing variable?
Use a zero coefficient. For example, x+z=4 is the row (1,0,1) with right-hand constant 4 in 3×3 mode.
How can I check the solution?
Substitute each variable into every original equation and compare its left side with the constant. Small differences can arise from decimal rounding.