System of Equations Calculator
Solve a 2×2 or 3×3 linear system and identify whether it has one solution, no solution, or infinitely many solutions.
How the system is solved
The calculator writes the equations as an augmented matrix [A|b] and applies Gaussian elimination with partial pivoting until it reaches reduced row-echelon form.
- If rank(A) equals the number of variables, the system has one unique solution.
- If rank(A) is smaller than rank([A|b]), a contradictory row appears and the system has no solution.
- If both ranks are equal but smaller than the number of variables, at least one variable is free and the system has infinitely many solutions.
For a unique 2×2 solution, the determinant is a₁₁a₂₂ − a₁₂a₂₁. A nonzero determinant confirms uniqueness. The 3×3 determinant is evaluated by cofactor expansion.
Checked examples
| System | Classification | Result |
|---|---|---|
| 2x + y = 5; x − y = 1 | Unique | x=2, y=1 |
| x + y = 2; 2x + 2y = 5 | No solution | Contradictory equations |
| x + y = 2; 2x + 2y = 4 | Infinite | One free variable |
| x + y + z = 6; 2x − y + z = 3; x + 2y − z = 2 | Unique | x=1, y=2, z=3 |
| x = 3; y = −2; z = 5 | Unique | x=3, y=−2, z=5 |
| x + y + z = 3; 2x + 2y + 2z = 6; x − y = 0 | Infinite | One free variable |
How to use the calculator
- Select a 2×2 or 3×3 system.
- Enter each coefficient and constant, keeping negative signs with their values.
- Enter zero when a variable is absent from an equation.
- Select Solve system and review the classification, ranks, solution, determinant, residual, and reduced matrix.
Limits and numerical method
- Inputs must be finite numbers with magnitudes no greater than 1e50.
- Periods are accepted as decimal points; commas are rejected to avoid ambiguity.
- Gaussian elimination uses partial pivoting and a relative tolerance of 1e−10 times the largest input magnitude.
- Results near singularity may depend on floating-point precision. The displayed residual helps check a unique solution.
- This calculator solves square linear systems with two or three variables; it does not solve nonlinear equations.
Frequently asked questions
What does a zero determinant mean?
It means a square coefficient matrix is singular, so the system cannot have exactly one solution. It may have none or infinitely many; the rank comparison distinguishes those cases.
What is reduced row-echelon form?
It is a matrix form in which each leading entry is 1, each pivot is the only nonzero entry in its column, and zero rows are placed last.
Can I enter fractions?
Enter them as decimals, such as 0.5 for 1/2. The solver uses floating-point arithmetic and reports rounded decimal results.
Why is a residual shown?
The residual measures the largest absolute difference between the left and right sides after substituting the computed solution. A value near zero supports the numerical result.
Related calculators
Use the Quadratic Formula Calculator for one-variable quadratic equations, the Midpoint Calculator for coordinate geometry, or the Fraction Calculator for exact fraction arithmetic, or the Matrix Calculator for matrix operations, determinants and inverses.