Systems of Equations Solver

Solve linear systems of 2 or 3 equations. Uses Cramer's Rule for 2×2 and Gaussian elimination for 3×3. Detects no-solution and infinite-solution cases.

📐 Systems of Equations Solver

Enter coefficients for a₁x + b₁y = c₁ and a₂x + b₂y = c₂.

x + y =
x + y =

Enter coefficients for three equations with unknowns x, y, z.

=
=
=
x
-
y
-
Step-by-step (Cramer’s Rule)
x
-
y
-
z
-
Step-by-step (Gaussian Elimination)

📊 What is a System of Linear Equations?

A system of linear equations is a collection of two or more equations that share the same unknowns, where each equation is linear (contains no squared terms, products of variables, or other nonlinear operations). The goal is to find values for the unknowns that satisfy every equation simultaneously.

Geometrically:

  • A 2×2 system has two lines in the 2D plane. The unique solution is their intersection point, if they intersect. Parallel lines give no solution; identical lines give infinitely many.
  • A 3×3 system has three planes in 3D space. The unique solution is the point where all three planes meet.

Systems of equations are one of the most widely applied tools in mathematics, appearing in economics (equilibrium pricing), engineering (Kirchhoff’s circuit laws, structural analysis), chemistry (stoichiometry), computer graphics (intersection computations), and data fitting (least-squares regression).

📐 Formula

2×2 System - Cramer’s Rule:

For a₁x + b₁y = c₁ and a₂x + b₂y = c₂:

D = a₁b₂ − a₂b₁ (coefficient determinant) Dₓ = c₁b₂ − c₂b₁ Dy = a₁c₂ − a₂c₁ x = Dₓ/D, y = Dy/D (if D ≠ 0)

3×3 System - Gaussian Elimination:

Row operations on the augmented matrix [A | b] reduce it to upper triangular form, then back-substitution gives x, y, z.

Variables:

  • a₁, b₁, c₁ - coefficients in equation 1
  • a₂, b₂, c₂ - coefficients in equation 2
  • D - main determinant (zero → no unique solution)
  • Dₓ, Dy - numerator determinants for Cramer’s Rule

📖 How to Use

Steps to Calculate

1
Choose system size - select 2×2 for two equations with unknowns x and y, or 3×3 for three equations with unknowns x, y, z.
2
Enter coefficients - for each equation, fill in the coefficients and the right-hand constant. Zero coefficients can be left blank.
3
Click Solve - the calculator applies Cramer's Rule (2×2) or Gaussian elimination (3×3) and shows all intermediate steps.
4
Check for special cases - if D = 0, the calculator tells you whether the system is inconsistent (no solution) or dependent (infinite solutions).
5
Verify - the step panel shows the verification: plugging x and y back into equation 1 to confirm both sides match.

💡 Example Calculations

Example 1 — 2×2 Unique Solution

2x + 3y = 7 and 4x − y = 6

1
D = (2)(−1) − (4)(3) = −2 − 12 = −14
2
D⊂x; = (7)(−1) − (6)(3) = −7 − 18 = −25 → x = −25/−14 = 25/14 ≈ 1.786
3
D_y = (2)(6) − (4)(7) = 12 − 28 = −16 → y = −16/−14 = 8/7 ≈ 1.143
x ≈ 1.786, y ≈ 1.143. Verify: 2(1.786) + 3(1.143) = 3.571 + 3.429 = 7.000 ✓
Try this example →

Example 2 — 3×3 System (Gaussian Elimination)

2x + y − z = 8 | −3x − y + 2z = −11 | −2x + y + 2z = −3

1
Eliminate x from rows 2 and 3 using row 1 as pivot → row echelon form
2
Back-substitute z, then y, then x
Solution: x = 2, y = 3, z = −1. Verify: 2(2)+3−(−1) = 4+3+1 = 8 ✓
Try this example →

Example 3 — No Solution (Parallel Lines)

2x + 4y = 6 and x + 2y = 5

1
D = (2)(2) − (1)(4) = 4 − 4 = 0
2
D⊂x; = (6)(2) − (5)(4) = 12 − 20 = −8 ≠ 0
No solution. D = 0 but D⊂x; ≠ 0 → the lines are parallel (same slope, different y-intercepts).
Try this example →

❓ Frequently Asked Questions

What is a system of linear equations?+
A system of linear equations is two or more equations with the same unknowns, where each equation is linear (first-degree: no x², xy, etc.). The solution is the set of values satisfying all equations at once. In 2D, each equation is a line; the solution is where all lines intersect. In 3D, each equation is a plane; the unique solution is where all planes meet at one point.
What is Cramer’s Rule and how does it work?+
Cramer’s Rule solves a 2×2 system a₁x + b₁y = c₁ and a₂x + b₂y = c₂ using 2×2 determinants. Compute D = a₁b₂ − a₂b₁. Then x = (c₁b₂ − c₂b₁)/D and y = (a₁c₂ − a₂c₁)/D. If D = 0, the system has no unique solution. The rule extends to 3×3 (using 3×3 determinants) but Gaussian elimination is more efficient for larger systems.
What is Gaussian elimination?+
Gaussian elimination converts a system’s augmented matrix to row echelon form (upper triangular) using three elementary row operations: (1) swap two rows, (2) multiply a row by a non-zero scalar, (3) add a multiple of one row to another. These operations don’t change the solution set. Once in echelon form, back substitution solves for the variables from bottom to top. The method works for any n×n system and detects singular (no unique solution) cases.
What does no solution mean?+
No solution means the system is inconsistent — the equations contradict each other. In 2D, the lines are parallel (same slope, different y-intercept). In Cramer’s Rule, D = 0 but at least one numerator determinant is non-zero. In Gaussian elimination, a row reduces to [0, 0, ..., 0 | c] with c ≠ 0, meaning 0 = c, which is impossible. The solution set is empty.
What does infinitely many solutions mean?+
Infinitely many solutions means the equations are dependent — at least one is a linear combination of the others. In 2D, both equations represent the same line. In Cramer’s Rule, D = D⊂x; = D_y = 0. In Gaussian elimination, a zero row appears [0, 0, ..., 0 | 0]. The solution is parameterized by one or more free variables (for a 2×2 system, the solution is a line; for 3×3, it can be a line or a plane).
What is the substitution method?+
In the substitution method, you solve one equation for one variable and substitute into the other. Example: 2x + y = 7 → y = 7 − 2x; substitute into 3x − y = 2: 3x − (7 − 2x) = 2 → 5x = 9 → x = 9/5; then y = 7 − 2(9/5) = 17/5. This works well for small systems where one variable is easy to isolate.
What is the elimination method?+
In the elimination (addition) method, you multiply equations by constants so that adding or subtracting them eliminates one variable. Example: to solve 2x + 3y = 7 and 4x − y = 6, multiply eq1 by 2: 4x + 6y = 14, then subtract eq2: 7y = 8, so y = 8/7. Back-substitute to find x. Gaussian elimination is the systematic matrix version of this method, applicable to any size system.
When does a 2×2 system have a unique solution?+
A 2×2 system has a unique solution when the coefficient determinant D = a₁b₂ − a₂b₁ is non-zero. This means the two lines have different slopes and must intersect at exactly one point. If D = 0, the lines are either parallel (no solution) or identical (infinitely many solutions) — the sign of the numerator determinants distinguishes these two cases.
What are real-world applications of systems of equations?+
Systems of linear equations appear in: (1) Circuit analysis — Kirchhoff’s voltage and current laws give a system for branch currents. (2) Economics — supply equals demand at equilibrium price. (3) Chemistry — balancing chemical equations by solving for stoichiometric coefficients. (4) GPS — each satellite gives a distance equation; the system gives your position. (5) Computer graphics — finding where a ray intersects geometry. (6) Machine learning — linear regression solves a system of normal equations.
How do I verify my solution?+
Substitute the computed x, y (and z for 3×3) back into every original equation and verify that both sides are equal. For the 2×2 example 2x + 3y = 7 with solution x = 1.786, y = 1.143: 2(1.786) + 3(1.143) = 3.571 + 3.429 = 7.000 ✓. Check both equations — a common error is a sign mistake in one equation. The calculator performs this check automatically in the working panel.

What is a system of linear equations?

A system of linear equations is a set of two or more equations, each of which is linear (no squared or higher-power terms), with the same unknowns. A 2×2 system has two equations and two unknowns (x and y). The solution is the set of values that satisfy all equations simultaneously. Geometrically, each equation represents a line in 2D, and the solution is the intersection point.

What is Cramer's Rule?

Cramer's Rule solves a 2×2 system a₁x + b₁y = c₁ and a₂x + b₂y = c₂ using determinants. The coefficient determinant is D = a₁b₂ − a₂b₁. Then x = Dₓ/D where Dₓ = c₁b₂ − c₂b₁, and y = Dy/D where Dy = a₁c₂ − a₂c₁. If D = 0, the system has no unique solution (the lines are parallel or identical). Cramer's Rule extends to 3×3 and larger systems but becomes less efficient than Gaussian elimination for large n.

What is Gaussian elimination?

Gaussian elimination is an algorithm for solving linear systems by applying row operations to the augmented matrix (coefficients plus constants) to reduce it to row echelon form (upper triangular). The operations are: swap two rows, multiply a row by a non-zero scalar, and add a multiple of one row to another. Once in echelon form, back substitution gives the solution. The method works for any size system and also detects dependent and inconsistent systems.

What does 'no solution' mean for a system of equations?

A system has no solution when the equations are inconsistent - they contradict each other. Geometrically in 2D, the two lines are parallel: they have the same slope but different y-intercepts. In Cramer's Rule, D = 0 but at least one of Dₓ or Dy is non-zero. In Gaussian elimination, a row of all zeros except in the constant column (e.g., 0 0 | 5) indicates inconsistency.

What does 'infinitely many solutions' mean?

A system has infinitely many solutions when the equations are dependent - one is a multiple of the other, so they represent the same geometric object. In 2D, both equations describe the same line, and every point on that line is a solution. In Cramer's Rule, D = Dₓ = Dy = 0. In Gaussian elimination, a zero row appears (0 0 | 0). The solution set is a line (in 2D) or a plane (in 3D).

How do you check a system of equations solution?

Substitute the computed values (x, y) into every original equation and verify that both sides are equal. For the 2×2 system: check a₁x + b₁y = c₁ and a₂x + b₂y = c₂. This calculator performs this verification automatically and shows it in the steps. Any discrepancy (beyond floating-point rounding, typically < 10⁻¹⁰) indicates an error.

What is the substitution method for systems of equations?

The substitution method solves one equation for one variable, then substitutes that expression into the other equation to get a one-variable equation. Example: from 2x + y = 7 → y = 7 − 2x, then substitute into 3x − y = 2: 3x − (7 − 2x) = 2 → 5x = 9 → x = 9/5. Back-substitute to find y. Cramer's Rule and Gaussian elimination are more systematic for larger systems.

What is the elimination method for systems of equations?

The elimination method multiplies equations by scalars so that adding or subtracting them eliminates one variable. Example: multiply eq1 by 2 and eq2 by 3, then subtract to eliminate x. This is essentially what Gaussian elimination formalizes. It is equivalent to Cramer's Rule in the 2×2 case and always gives the same answer when a unique solution exists.

What are real-world applications of systems of equations?

Systems of equations model any situation with multiple interdependent constraints: (1) Economics - supply and demand equilibrium, input-output analysis. (2) Engineering - circuit analysis (Kirchhoff's laws give a system for branch currents), structural force balance. (3) Chemistry - balancing chemical equations requires solving a system for stoichiometric coefficients. (4) Navigation - GPS triangulation uses a system of distance equations. (5) Computer graphics - intersection of lines, planes, and surfaces.

When should I use Cramer's Rule vs Gaussian elimination?

Use Cramer's Rule for 2×2 systems - it's fast and gives explicit formulas for x and y in terms of determinants. For 3×3 and larger systems, Gaussian elimination is more efficient and numerically stable. Cramer's Rule for 3×3 requires computing four 3×3 determinants (each with six multiplications), while Gaussian elimination on a 3×3 augmented matrix needs fewer operations and handles degenerate cases more cleanly.