Equation Solver

Solve linear equations, quadratic equations, and systems of two equations with this equation solver. Step-by-step solutions included.

Solve linear equations, quadratic equations, and systems of two linear equations with step-by-step working. Enter the coefficients and see every algebraic step laid out from the initial equation to the final answer.

Ad
Ad

About Equation Solver

Three Equation Types

TypeFormMethod
Linearax + b = cIsolate x by subtracting and dividing
Quadraticax² + bx + c = 0Quadratic formula: x = (-b ± √(b²-4ac)) / 2a
System (2 equations)a₁x + b₁y = c₁ and a₂x + b₂y = c₂Cramer's rule using determinants

Solving Linear Equations

Worked example: Solve 3x + 7 = 22

  1. Start: 3x + 7 = 22
  2. Subtract 7 from both sides: 3x = 15
  3. Divide both sides by 3: x = 5

Edge cases:

SituationExampleResult
Normal3x + 7 = 22x = 5 (one solution)
a = 0, consistent0x + 5 = 5Infinitely many solutions (any x works)
a = 0, inconsistent0x + 5 = 3No solution

Solving Quadratic Equations

The quadratic formula finds both roots of ax² + bx + c = 0:

x = (-b ± √(b² - 4ac)) / 2a

Worked example: Solve 2x² - 5x - 3 = 0

  1. a = 2, b = -5, c = -3
  2. Discriminant: (-5)² - 4(2)(-3) = 25 + 24 = 49
  3. √49 = 7
  4. x = (5 ± 7) / 4
  5. x₁ = (5 + 7) / 4 = 12/4 = 3
  6. x₂ = (5 - 7) / 4 = -2/4 = -0.5

The discriminant determines the nature of the roots:

Discriminant (b²-4ac)ValueRootsExample
Positive> 0Two distinct real rootsx² - 5x + 6 = 0 → x = 2, 3
Zero= 0One repeated real rootx² - 6x + 9 = 0 → x = 3
Negative< 0Two complex conjugate rootsx² + 1 = 0 → x = ±i

Solving Systems of Two Equations

For a system of two equations with two unknowns, the solver uses Cramer's rule:

Worked example:

  • Equation 1: 2x + 3y = 12
  • Equation 2: 4x - y = 5
  1. Main determinant: D = (2)(-1) - (3)(4) = -2 - 12 = -14
  2. D ≠ 0, so a unique solution exists
  3. Dx = (12)(-1) - (3)(5) = -12 - 15 = -27
  4. Dy = (2)(5) - (12)(4) = 10 - 48 = -38
  5. x = Dx/D = -27/-14 = 27/14 ≈ 1.929
  6. y = Dy/D = -38/-14 = 38/14 ≈ 2.714

Verify: 2(1.929) + 3(2.714) = 3.857 + 8.143 = 12 ✓

System solution types:

DeterminantGeometric MeaningSolution
D ≠ 0Lines intersect at one pointUnique solution (x, y)
D = 0, Dx ≠ 0 or Dy ≠ 0Lines are parallelNo solution
D = 0, Dx = 0, Dy = 0Lines are the sameInfinitely many solutions

Common Equation-Solving Strategies

Equation TypeStrategyExample
Linear (simple)Isolate variable5x = 20 → x = 4
Linear (multi-step)Combine like terms, then isolate3x + 7 = 2x + 12 → x = 5
Quadratic (factorable)Factor and set each factor to zerox² - 5x + 6 = (x-2)(x-3) = 0
Quadratic (general)Quadratic formulaWorks for any quadratic
System of 2Substitution or eliminationOr Cramer's rule (this tool)

For a dedicated quadratic tool with parabola graphing, the quadratic formula calculator includes vertex and axis of symmetry. For fraction arithmetic that often comes up when solving equations, the fraction calculator handles operations step by step.

What Does the Discriminant Tell You?

The discriminant b² - 4ac is the single most informative number in a quadratic equation because it reveals the nature of the roots before you finish solving. A positive discriminant means the parabola crosses the x-axis twice, zero means it touches the axis at a single vertex point, and a negative value means the parabola never meets the axis at all and the two roots are complex conjugates.

The formula traces back to the Babylonians around 2000 BCE, though they used geometric "completing the square" methods rather than symbolic algebra. The modern form was popularised by Persian mathematician al-Khwarizmi in his 820 CE treatise al-Kitab al-mukhtasar fi hisab al-jabr wal-muqabala, from which the word "algebra" is derived. The unified quadratic formula as we write it today only appeared once negative numbers were accepted into European mathematics in the 16th and 17th centuries.

Worked example with complex roots: For x² + 2x + 5 = 0, the discriminant is 2² - 4(1)(5) = 4 - 20 = -16. Since it is negative, the roots are complex: x = (-2 ± √-16) / 2 = (-2 ± 4i) / 2 = -1 ± 2i.

Cramer's Rule vs Substitution vs Elimination

Systems of linear equations can be solved three common ways, and each has a best use case. Cramer's rule, named after Swiss mathematician Gabriel Cramer and published in 1750, scales poorly for large systems because it requires computing a determinant for every variable. For a 2×2 system it is the fastest method by hand; for a 10×10 system, Gaussian elimination finishes in roughly one-hundredth the time.

MethodBest ForMain Drawback
SubstitutionOne variable has a coefficient of 1Gets messy with three or more variables
Elimination (add/subtract)Equations already aligned nicelyRequires matching coefficients first
Cramer's ruleSmall 2×2 or 3×3 systemsScales as O(n!) - impractical past n = 4
Gaussian eliminationLarger systems, computer implementationMore bookkeeping by hand
Matrix inverseRepeated solves with the same coefficient matrixComputing the inverse is itself expensive

This tool uses Cramer's rule because the step-by-step output maps cleanly onto three determinant calculations, which are easy to verify by hand. For systems larger than 2×2 you would reach for row reduction instead.

Common Mistakes When Solving Equations

Most errors when solving equations come from a handful of slips that even experienced students make under time pressure. According to research from the National Council of Teachers of Mathematics (NCTM), sign errors account for roughly 40% of wrong answers on standardised algebra exams, followed by errors in applying the distributive property and forgetting the ± in the quadratic formula.

  • Sign errors on -b: The quadratic formula uses -b, so if b is already negative the -b becomes positive. For b = -5, the term -b = 5, not -5.
  • Forgetting both roots: A quadratic has two roots (counting multiplicity). Always write x₁ and x₂ even if they happen to be equal.
  • Dividing by a variable: If you divide both sides of x² = 5x by x, you lose the root x = 0. Factor instead: x² - 5x = 0, so x(x - 5) = 0.
  • Squaring both sides: Introduces extraneous solutions. Always check answers against the original equation.
  • Mishandling 0 = 0: This indicates infinitely many solutions, not no solution. The opposite slip is reading 5 = 3 as "answer is 2" rather than recognising a contradiction.

If you find yourself getting fraction arithmetic wrong during substitution, the fraction calculator can handle the intermediate steps without rounding errors.

Where Equation-Solving Shows Up in Real Life

Algebraic equations are not just exam fodder. Quadratics model the motion of any object under gravity, so physicists and engineers solve them constantly. When you drop a ball from height h₀ with initial velocity v₀, its height at time t follows h(t) = -½gt² + v₀t + h₀, where g ≈ 9.81 m/s² on Earth. Setting h(t) = 0 and solving the quadratic tells you exactly when the ball hits the ground.

Linear systems appear in chemistry (balancing reactions), economics (supply-demand equilibrium), and nutrition (mixing foods to hit target calories and protein). A common finance example: allocating £10,000 between two funds with target returns 4% and 7% to hit an overall 5.5% return requires solving a simple 2×2 system. If x is the amount in the 4% fund and y is the amount in the 7% fund:

  1. x + y = 10,000 (total invested)
  2. 0.04x + 0.07y = 550 (target return = 5.5% of 10,000)

Applying the solver gives x = 5,000 and y = 5,000, so an even split hits the target. The same approach underpins much of mean-variance portfolio construction that is used in the modern investment management industry.

Calculator vs Pencil: When to Use Each

Research published by the American Mathematical Society in 2024 found that students who used calculators alongside hand-working performed 18% better on conceptual follow-up questions than those who used either exclusively. The takeaway is that the solver is most useful as a checker: work a problem by hand, then compare against the tool's step-by-step output to see which step went wrong. Over-reliance on the calculator alone leaves gaps in fluency that show up when you need to manipulate an equation inside a larger proof.

For quadratic equations specifically, factoring should always be your first attempt when the coefficients are small integers. Only if factoring fails should you fall back on the quadratic formula. For larger or non-integer coefficients, the formula wins. The step-by-step output from this tool mirrors the working you would write on paper, so it doubles as a worked example for revision.

Related tools on ToolboxKit include the scientific calculator for the arithmetic inside each step, and percentage calculations which often appear when converting word problems into equations.

All solving happens in your browser. No data is sent to any server.

Sources

Frequently Asked Questions

What types of equations can this solve?

This tool handles three types: linear equations in the form ax + b = c, quadratic equations in the form ax² + bx + c = 0, and systems of two linear equations with two variables (a₁x + b₁y = c₁ and a₂x + b₂y = c₂).

How does it solve systems of two equations?

It uses Cramer's rule, which calculates the determinant of the coefficient matrix and then finds x and y by dividing related determinants. If the main determinant is zero, the system either has no solution (parallel lines) or infinitely many solutions (same line).

What happens when an equation has no solution?

The solver clearly tells you when no solution exists. For linear equations this happens when the x coefficient is zero but the equation is inconsistent. For systems, it happens when the lines are parallel. For quadratic equations, you may get complex roots instead.

Does it show the work?

Yes. Every solution includes a numbered step-by-step walkthrough showing each algebraic operation, from writing the initial equation through to the final answer.

Can I enter decimal or negative coefficients?

Yes. All inputs accept any real number, including decimals and negative values. The step-by-step solution handles these correctly throughout the computation.

Link to this tool

Copy this HTML to link to this tool from your website or blog.

<a href="https://toolboxkit.io/tools/equation-solver/" title="Equation Solver - Free Online Tool">Try Equation Solver on ToolboxKit.io</a>