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).
| Eq. | x | y | constant | |
|---|---|---|---|---|
| 1 | = | |||
| 2 | = |
Unique Solution
x =
2
y =
3
| x | 1x + 1y = 5 | 2x + -1y = 1 |
|---|---|---|
| -5.0000 | 10.0000 | -11.0000 |
| -3.8889 | 8.8889 | -8.7778 |
| -2.7778 | 7.7778 | -6.5556 |
| -1.6667 | 6.6667 | -4.3333 |
| -0.5556 | 5.5556 | -2.1111 |
| 0.5556 | 4.4444 | 0.1111 |
| 1.6667 | 3.3333 | 2.3333 |
| 2.7778 | 2.2222 | 4.5556 |
| 3.8889 | 1.1111 | 6.7778 |
| 5.0000 | 0.0000 | 9.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
| Field | Application |
|---|---|
| Electrical engineering | Kirchhoff's voltage/current laws produce a linear system for node voltages and branch currents |
| Structural engineering | Force-balance equations at joints in truss structures |
| Economics | Leontief input-output models - how much each industry must produce given final demand |
| Computer graphics | Coordinate transformations - rotation, scaling, and perspective projection |
| Chemistry | Balancing chemical equations by setting stoichiometric coefficients |