Mihsaba›Math›System of Linear Equations Calculator – 2×2 & 3×3

System of Linear Equations Calculator – 2×2 & 3×3

Solve 2-variable and 3-variable systems of linear equations with partial-pivot Gaussian elimination, including unique, no-solution and infinitely-many cases.

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.

  1. Choose 2×2 or 3×3.
  2. Enter each equation's variable coefficients and right-hand constant; in 2×2 mode only the first two variables and equations are used.
  3. Calculate to see the classification and, when unique, the variable values.

How it is calculated

A·x=b — Gaussian elimination with partial pivoting

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.

Worked examples and interpreting results
CaseCalculationResult
Value of x2x = 6 → x = 6 ÷ 23
Value of yy = 5 − 32
x for x+y+z=6; 2x−y+z=3; x+2y−z=2x = 1; 1 + 2 + 3 = 61
y in the three-variable worked systemy = 2; 2(1) − 2 + 3 = 32
z in the three-variable worked systemz = 3; 1 + 2(2) − 3 = 23

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.