ThisCalculator

Everyday

System of Equations Solver with Steps

Updated · Standard formula, shown below

The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.

This calculator solves a system of two linear equations with two unknowns (x and y) and shows each step of the substitution or elimination method. You enter the coefficients and constants of both equations, and you get the solution values for x and y, along with a clear step-by-step breakdown of how the answer was found.

Formula

For a system of two linear equations:

a₁x + b₁y = c₁
a₂x + b₂y = c₂

The solution using Cramer’s rule is:

x = (c₁b₂ − c₂b₁) / (a₁b₂ − a₂b₁)
y = (a₁c₂ − a₂c₁) / (a₁b₂ − a₂b₁)

Where the denominator D = a₁b₂ − a₂b₁ is the determinant of the coefficient matrix. If D ≠ 0, the system has a unique solution. If D = 0, the system has either no solution or infinitely many solutions.

Worked Example

Using the default values:

Equation 1: 2x + 3y = 7
Equation 2: 5x − 1y = 9

Step 1: Compute the determinant D = (2)(−1) − (5)(3) = −2 − 15 = −17

Step 2: Compute x = (7)(−1) − (9)(3) over D = (−7 − 27) / (−17) = (−34) / (−17) = 2

Step 3: Compute y = (2)(9) − (5)(7) over D = (18 − 35) / (−17) = (−17) / (−17) = 1

Solution: x = 2, y = 1. You can verify: 2(2) + 3(1) = 7 and 5(2) − 1(1) = 9.

How the Step-by-Step Solution Works

The calculator uses Cramer’s rule, which is a direct algebraic method. It calculates three determinants: one for the denominator and one for each variable. The steps shown are exactly those you would write in a math class:

  • Write the system in standard form (ax + by = c).
  • Compute the main determinant D.
  • Replace the x-column with the constants to get Dx, then compute x = Dx / D.
  • Replace the y-column with the constants to get Dy, then compute y = Dy / D.

This method is efficient and avoids the back-substitution steps of the elimination method, but it gives the same result.

When to Use This Solver

You would use this tool when you have two linear equations and need a quick, accurate solution. It is especially helpful for:

  • Homework problems in algebra or precalculus.
  • Checking answers you got by substitution or graphing.
  • Solving word problems that translate into two linear equations (e.g., mixture, distance, or cost problems).
  • Understanding the relationship between coefficients and the solution.

If you have more than two equations or the equations are nonlinear, this solver will not work – you need a different method or a more advanced tool.

Common Mistakes and How to Avoid Them

One frequent error is mixing up the order of coefficients when entering them. Always write each equation in the form ax + by = c before entering. Another mistake is forgetting to include the sign of a negative coefficient – for example, entering 5 and 1 instead of 5 and −1 for the equation 5x − y = 9. That changes the determinant and leads to a wrong answer.

Also, be careful with fractions or decimals. The calculator works with any real numbers, but if you enter decimals, the step-by-step display might show long numbers. Rounding intermediate results can cause small errors; it is best to keep full precision until the final answer.

Limitations of the Formula

Cramer’s rule is only valid when the determinant D is not zero. If D = 0, the system is either inconsistent (no solution) or dependent (infinitely many solutions). This calculator will show an error or undefined result in that case. For systems with three or more variables, Cramer’s rule becomes computationally heavy, and methods like Gaussian elimination are preferred. Also, this solver does not handle equations with exponents, absolute values, or trigonometric functions – those are not linear systems.

Frequently Asked Questions

Can this solver handle three equations?

No, this calculator is designed for two linear equations with two unknowns. For three equations, you would need a 3×3 system solver, which uses a different determinant formula.

What if the system has no solution or infinite solutions?

If the determinant D equals zero, the system is either inconsistent (parallel lines, no intersection) or dependent (same line, infinite intersections). The calculator will not produce a numeric answer because the denominator is zero. You can check by graphing or by comparing the ratios of coefficients.

How do I enter equations with fractions?

Convert fractions to decimals or enter them as decimal numbers. For example, 1/2 x + 3 y = 5 can be entered as 0.5 for the coefficient of x. The calculator will treat it as a decimal and compute accordingly.

Is Cramer’s rule the same as elimination?

Both methods solve the same system and give the same answer, but they work differently. Elimination combines equations to remove one variable, while Cramer’s rule uses determinants directly. The steps shown by this calculator follow Cramer’s rule, not elimination.

Can I use this for word problems?

Yes, if you can translate the word problem into two linear equations. For example, “The sum of two numbers is 10 and their difference is 2” becomes x + y = 10 and x − y = 2. Enter the coefficients and constants accordingly.

Related

Formula used
in a1 | Coefficient of x in eq1 | - | 2 | 0
in b1 | Coefficient of y in eq1 | - | 3 | 0
in c1 | Constant in eq1 | - | 7 | 0
in a2 | Coefficient of x in eq2 | - | 5 | 0
in b2 | Coefficient of y in eq2 | - | -1 | 0
in c2 | Constant in eq2 | - | 9 | 0
out x | x value | - | (c1*b2 - c2*b1) / (a1*b2 - a2*b1) | 4
out y | y value | - | (a1*c2 - a2*c1) / (a1*b2 - a2*b1) | 4

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.