System of Linear Equations Solver

Solve a system of two linear equations in two variables.

Equation 1:

Format: ax + by = c

Equation 2:

Format: ax + by = c

x =
y =
Enter coefficients and click solve

What is a Linear Equation?

A linear equation is an algebraic equation where every variable is raised to the power of one — no squares, cubes, or higher powers. When graphed, it always produces a straight line, which is the origin of the term "linear." The general form is ax + b = c for one variable, or ax + by = c for two variables, where a, b, and c are real-number constants and a ≠ 0.

What Makes an Equation "Linear"?

Three characteristics define a linear equation:

  • Each variable appears with an exponent of exactly 1 (e.g., x, not x² or x³)
  • No variable multiplies another variable (e.g., no xy terms)
  • No variable appears in a denominator or under a radical

Equations like 2x + 5 = 11 and 3x − 4y = 7 are linear. Equations like x² = 9 or xy = 6 are not.

Types of Linear Equations

One-Variable Linear Equations

These take the form ax + b = c, where a ≠ 0. There is exactly one unknown and the solution is a single value. Example: 3x + 6 = 15 → x = 3. These are solved by isolating the variable through inverse operations (addition, subtraction, multiplication, division).

Two-Variable Linear Equations

Written as ax + by = c, these have infinitely many solutions on their own — every point on the line is a solution. A single equation with two unknowns describes a straight line on the coordinate plane. To find a unique solution, a second equation is needed.

Systems of Linear Equations

A system groups two or more linear equations that share the same variables. The solution is the set of values satisfying all equations at once — geometrically, the point where the lines intersect. A 2×2 system (two equations, two unknowns) yields:

Determinant DResultGeometry
D ≠ 0One unique solutionLines intersect at one point
D = 0, Dₓ or Dᵧ ≠ 0No solutionParallel lines (never meet)
D = Dₓ = Dᵧ = 0Infinitely many solutionsSame line (coincident)

What the Linear Equation Calculator Does for Each Type

This calculator solves a system of two linear equations in two variables (2×2 system). Enter the coefficients a₁, b₁, c₁ for the first equation and a₂, b₂, c₂ for the second. It applies Cramer's Rule internally:

D = a₁b₂ − a₂b₁  |  Dₓ = c₁b₂ − c₂b₁  |  Dᵧ = a₁c₂ − a₂c₁
x = Dₓ / D     y = Dᵧ / D

It detects all three outcome types — unique solution, no solution, and infinite solutions — and reports which case applies along with the working.

How to Solve Linear Equations Manually

Isolation Method (One Variable)

Used for single-variable equations like 4x − 8 = 12:

  1. Add or subtract constants from both sides: 4x = 20
  2. Divide both sides by the coefficient: x = 5
  3. Check by substituting back: 4(5) − 8 = 12 ✓

Substitution Method (Two Variables)

Best when one equation can be easily solved for one variable:

  1. Solve one equation for x: x = (c₁ − b₁y) / a₁
  2. Substitute that expression into the second equation
  3. Solve the resulting single-variable equation for y
  4. Back-substitute to find x

Elimination Method (Two Variables)

Best when coefficients can be matched easily:

  1. Multiply one or both equations so a chosen variable has equal (and opposite) coefficients
  2. Add the equations to cancel that variable
  3. Solve the remaining single-variable equation
  4. Substitute back to find the other variable

Linear Equation Examples

Example 1 — One variable: 5x − 10 = 20
Add 10: 5x = 30 → x = 6

Example 2 — Two variables (substitution): x + y = 10 and 2x − y = 5
From eq. 1: x = 10 − y. Substitute: 2(10 − y) − y = 5 → 20 − 3y = 5 → y = 5, x = 5
Solution: x = 5, y = 5

Example 3 — Two variables (elimination): 3x + 2y = 16 and 3x − y = 7
Subtract eq. 2 from eq. 1: 3y = 9 → y = 3. Back-substitute: 3x = 10 → x = 10/3
Solution: x = 10/3, y = 3

Example 4 — No solution: x + y = 4 and x + y = 9
Subtracting gives 0 = 5, a contradiction. These lines are parallel — no solution.

A Brief History of Linear Equations

Linear equations are among the oldest mathematical tools on record. Ancient Egyptian papyri from around 1650 BCE (the Rhind Mathematical Papyrus) contain one-variable problems solved by the "method of false position." Babylonian clay tablets from 2000 BCE show systematic solutions to two-variable systems. Chinese mathematicians compiled multi-equation systems in the Nine Chapters on the Mathematical Art (circa 200 BCE), using methods equivalent to modern row reduction. The symbolic algebra notation we use today — with variables like x and y — was developed by René Descartes and François Viète in the 16th and 17th centuries.

Limitations of Manually Solving Linear Equations

Manual methods work well for small systems but become impractical quickly:

  • Fractions and decimals accumulate through multiple steps, increasing the chance of arithmetic errors
  • Larger systems (3×3, 4×4) require many elimination steps; a single sign error invalidates the entire solution
  • Near-parallel lines produce very small determinants, making hand calculations numerically unstable
  • Verification is essential but tedious — every variable must be substituted back into every original equation

A calculator eliminates these concerns and is particularly helpful when working with decimal coefficients or checking homework answers quickly.

Frequently Asked Questions

What is a linear equation?
A linear equation is an algebraic equation where every variable has an exponent of 1 and no variables are multiplied together. It produces a straight line when graphed. Examples include 2x + 3 = 7 (one variable) and 3x − 2y = 8 (two variables).
Can this solver handle fractions and decimals?
Yes. The input fields accept any real number, including decimals like 0.5 or 3.14. For fractions, convert them to their decimal equivalent before entering (e.g., enter 0.25 instead of 1/4). The result is shown as a decimal value.
What if the equation has no solution?
When the two equations represent parallel lines, the determinant D equals zero but Dₓ or Dᵧ is non-zero. The calculator detects this and reports "No solution — the equations are inconsistent (parallel lines)."
Can I solve systems of linear equations with three unknowns?
This calculator handles 2×2 systems (two equations, two unknowns). For three-variable systems, use the System of Equations Calculator or the Matrix Calculator, which support 3×3 and larger systems.
Is this calculator free to use?
Yes, completely free with no sign-up required. You can use it as many times as you like directly in your browser.
How accurate are the solutions?
Solutions are computed using standard floating-point arithmetic, accurate to at least 10 significant digits for typical inputs. Results are rounded to a readable number of decimal places for display. For very large or very small coefficients, some rounding may apply.