Skip to content
Toolcroft

Math Calculators

Linear System Solver - 2×2 and 3×3 Equations

Solve systems of 2 or 3 linear equations with step-by-step Gaussian elimination. Detects unique solutions, no solution (inconsistent), and infinite solutions (dependent).

System size:
Eq.xyconstant
1=
2=

Unique Solution

x =

2

y =

3

Loading chart…
Lines plot
x1x + 1y = 52x + -1y = 1
-5.000010.0000-11.0000
-3.88898.8889-8.7778
-2.77787.7778-6.5556
-1.66676.6667-4.3333
-0.55565.5556-2.1111
0.55564.44440.1111
1.66673.33332.3333
2.77782.22224.5556
3.88891.11116.7778
5.00000.00009.0000

What is a system of linear equations?

A system of linear equations is a collection of equations, each linear in its variables. In two dimensions, each equation describes a line; the solution is the point where all lines intersect. In three dimensions, each equation is a plane; the solution is the point where all planes meet.

Gaussian elimination explained

Gaussian elimination converts the augmented matrix [A | b] to row echelon form using elementary row operations. Partial pivoting (always choosing the row with the largest absolute pivot value) improves numerical stability and avoids division by very small numbers.

Three possible outcomes

  • Unique solution: the system is consistent and the coefficient matrix has full rank. Back substitution gives exact values for each variable.
  • No solution: the system is inconsistent. After elimination, a row of the form 0 = c (c ≠ 0) appears.
  • Infinite solutions: the system is dependent. At least one equation is redundant (a linear combination of the others), leaving a free variable.

Applications

Linear systems appear throughout science and engineering: balancing chemical equations, network flow analysis, circuit analysis (Kirchhoff's laws), computer graphics (coordinate transformations), economics (input-output models), and machine learning (least-squares regression via the normal equations).

Row reduction notation

Gaussian elimination operates on the augmented matrix [A | b] using elementary row operations. Standard notation uses Ri for row i:

System:  2x + y = 5
          x − y = 1

Augmented matrix:
[ 2  1 | 5 ]
[ 1 -1 | 1 ]

R₁ ↔ R₂  (swap rows to put larger pivot first):
[ 1 -1 | 1 ]
[ 2  1 | 5 ]

R₂ -> R₂ − 2R₁  (eliminate x from row 2):
[ 1 -1 | 1 ]
[ 0  3 | 3 ]

Back-substitute: y = 1, then x = 1 + y = 2

Applications by field

FieldApplication
Electrical engineeringKirchhoff's voltage/current laws produce a linear system for node voltages and branch currents
Structural engineeringForce-balance equations at joints in truss structures
EconomicsLeontief input-output models - how much each industry must produce given final demand
Computer graphicsCoordinate transformations - rotation, scaling, and perspective projection
ChemistryBalancing chemical equations by setting stoichiometric coefficients