System of Linear Equations Calculator
Solve a system of linear equations (2×2 or 3×3) using Elimination, Substitution, or Matrix (Gaussian). Get the solution (unique / none / infinite), optional step-by-step, and a quick classification.
Background
A system of linear equations is a set of equations where each equation is linear (variables only to the first power). Solutions can be one point (unique), no solution (inconsistent), or infinitely many (dependent).
How to use this calculator
- Pick the system size (2×2 or 3×3).
- Choose a method (Auto is usually best).
- Enter coefficients in the form a·x + b·y (= + d·z) = c.
- Click Calculate to get the classification (unique / none / infinite) and the solution when it exists.
- Optional: toggle Show step-by-step and Prefer exact fractions to see clean algebra.
Tip: If you’re unsure about signs, rewrite your equation so all variable terms are on the left and the constant is on the right.
How this calculator works
- 2×2 systems: we classify using the determinant and/or elimination consistency.
- 3×3 systems: we use Gaussian elimination to reach row-echelon form and classify.
- Solution types: unique (one solution), none (inconsistent), or infinite (dependent).
Tip: If you get a row like 0x + 0y + 0z = 5, the system has no solution.
Formula & Equation Used
2×2 determinant: Δ = a₁b₂ − a₂b₁
Unique solution: if Δ ≠ 0
Gaussian elimination: row operations to simplify the augmented matrix.
Example Problem & Step-by-Step Solution
Example 1 — 2×2 unique solution
Solve: 2x + y = 5 and x − y = 1
- Add the equations to eliminate y: (2x + y) + (x − y) = 5 + 1
- So 3x = 6 → x = 2
- Plug into x − y = 1: 2 − y = 1 → y = 1
Example 2 — 2×2 no solution
Solve: 2x + 4y = 6 and x + 2y = 4
- Multiply the second equation by 2: 2x + 4y = 8
- Now compare: first says 2x + 4y = 6 but the scaled second says 2x + 4y = 8
- This contradiction means the system is inconsistent → no solution.
Example 3 — 3×3 unique solution
Solve: x + y + z = 6, 2x − y + z = 3, and x + 2y − z = 3
- Start with equation (1): x = 6 − y − z
- Substitute into (2): 2(6 − y − z) − y + z = 3 → 3y + z = 9
- Substitute into (3): (6 − y − z) + 2y − z = 3 → y − 2z = −3
- Solve the 2×2 system: from y − 2z = −3 → y = 2z − 3. Plug into 3y + z = 9: 3(2z − 3) + z = 9 → 7z = 18 → z = 18/7.
- Then y = 2(18/7) − 3 = 15/7.
- Finally x = 6 − y − z = 6 − 15/7 − 18/7 = 9/7.
Final answer: x = 9/7, y = 15/7, z = 18/7.
Frequently Asked Questions
Q: What does it mean if there are infinitely many solutions?
It means the equations describe the same line/plane (one equation is a multiple of another), so there are many solutions that satisfy all equations.
Q: Why do you prefer exact fractions?
Fractions keep results clean and avoid rounding errors. You can still show decimals with rounding.
Q: What method should I pick?
Auto is best. For 2×2, elimination is usually fastest. For 3×3, Gaussian elimination is the most reliable.
Q: Can this solve nonlinear systems?
Not this one — this tool is for linear systems only (variables to the first power).