System of Equations Calculator

x3
y2
Determinant D-5
How this was calculated
  1. Cramer's rule starts with the determinant of the coefficient grid: D = a₁b₂ − a₂b₁ = 2 × -1 − 1 × 3 = -5. Non-zero, so exactly one solution exists.
  2. x = (c₁b₂ − c₂b₁) ÷ D = (12 × -1 − 1 × 3) ÷ -5 = 3. y = (a₁c₂ − a₂c₁) ÷ D = (2 × 1 − 1 × 12) ÷ -5 = 2.
  3. Check in the first equation: 2 × 3 + 3 × 2 = 12, matching c₁ = 12 (any residue is rounding in the display).

A system of equations calculator solves two linear equations in two variables at the same time, finding the values of x and y that satisfy both equations. Geometrically, each equation is a line; the solution is the single point where the lines cross. For example, the system 2x + 3y = 12 and x − y = 1 yields the solution x = 3, y = 2. The system x + y = 10 and x − y = 4 gives x = 7, y = 3. The system 5x − 2y = 4 and 3x + 4y = 18 gives x = 2, y = 3 with D = 26. If D = 0 there is no unique solution: the lines are parallel (no solution) or the same line (infinitely many).

The calculator relies on Cramer's rule, a determinant-based method that solves a 2×2 system using the formulas D = a₁b₂ − a₂b₁; x = (c₁b₂ − c₂b₁) ÷ D; y = (a₁c₂ − a₂c₁) ÷ D. This approach is the accepted standard because it is direct, systematic, and reproducible. Substitution and elimination always agree with Cramer's rule on the same system, confirming the result. This page shows the formula, step-by-step workings, worked examples, and sources so you can follow the entire calculation from start to finish.

Worked examples

2x + 3y = 12, x − y = 1

Primary result: 3. (2 · 3 · 12 · 1 · -1 · 1)

x3
y2
Determinant D-5

x + y = 10, x − y = 4

Primary result: 7. (1 · 1 · 10 · 1 · -1 · 4)

x7
y3
Determinant D-2

5x − 2y = 4, 3x + 4y = 18

Primary result: 2. (5 · -2 · 4 · 3 · 4 · 18)

x2
y3
Determinant D26

Two lines, one crossing point

When you enter a 2×2 system into a system of equations calculator, each equation represents a straight line. The solution to the system is the single point where those two lines cross. That crossing point gives you the exact values of x and y that satisfy both equations at the same time. Geometrically, each equation is a line, and the solution is the single point where the lines cross.

Cramer's rule solves a 2×2 system using determinants. The rule calculates a value called D, which measures whether the lines cross at all. The formula for D is D = a₁b₂ − a₂b₁. Once you have D, you find x with x = (c₁b₂ − c₂b₁) ÷ D, and you find y with y = (a₁c₂ − a₂c₁) ÷ D. The value of D tells you whether a unique solution exists before you even compute it.

To see this in action, consider the system 2x + 3y = 12 and x − y = 1. Here D = −5, and the solution is x = 3, y = 2. Another example is x + y = 10 and x − y = 4, which gives x = 7, y = 3. A third system, 5x − 2y = 4 and 3x + 4y = 18, gives x = 2, y = 3 with D = 26. In each case the two lines meet at exactly one point, and Cramer's rule finds it cleanly.

If D = 0, there is no unique solution. The lines are parallel, which means there is no solution, or they are the same line, which means there are infinitely many solutions. A determinant of zero is the signal that the two equations do not produce a single crossing point. Substitution and elimination always agree with Cramer's rule on the same system, so any valid method will reveal the same outcome.

Worked examples

These worked examples show how a system of equations calculator applies Cramer's rule to a 2×2 system. For any system written as a₁x + b₁y = c₁ and a₂x + b₂y = c₂, the calculator first finds the determinant D = a₁b₂ − a₂b₁. It then solves for each variable with x = (c₁b₂ − c₂b₁) ÷ D and y = (a₁c₂ − a₂c₁) ÷ D. Geometrically, each equation represents a line, and the solution is the single point where the two lines cross. The methods of substitution and elimination always agree with Cramer's rule on the same system, so the determinant approach below is simply one transparent way to reach that crossing point.

The first verified system is 2x + 3y = 12 and x − y = 1. Here the determinant D = −5, which means the lines are not parallel and a unique solution exists. Plugging the coefficients into the formulas gives x = 3 and y = 2. You can confirm this by checking both original equations: 2(3) + 3(2) = 12 and 3 − 2 = 1. Because D is nonzero, Cramer's rule is valid here, and the same values would appear if you solved by elimination or substitution instead.

The second verified system is x + y = 10 and x − y = 4, which yields x = 7 and y = 3. The third verified system is 5x − 2y = 4 and 3x + 4y = 18, where the determinant D = 26 and the solution is x = 2 and y = 3. In both cases the nonzero determinant confirms a single crossing point, and substituting the values back into either equation verifies the result. The table below collects all three verified systems with their determinant and solution values so you can compare inputs and outputs at a glance.

One important caveat appears when D = 0. In that situation there is no unique solution: the lines are either parallel, producing no solution, or they are the same line, producing infinitely many. A system of equations calculator checks for this condition before dividing by D, because division by zero is undefined. When you use the tool on any of the three systems above, the determinant is nonzero, so each one returns the single verified point listed in the table.

SystemDxy
2x + 3y = 12 and x − y = 1−532
x + y = 10 and x − y = 4—73
5x − 2y = 4 and 3x + 4y = 182623
If D = 0 there is no unique solution: the lines are parallel with no solution, or they are the same line with infinitely many solutions.

Cramer's rule step by step

Cramer's rule solves a 2×2 system using determinants, and our system of equations calculator applies it step by step so you can follow every part of the work. For a system written as a₁x + b₁y = c₁ and a₂x + b₂y = c₂, the rule builds three determinants. First, D = a₁b₂ − a₂b₁. Next, Dx = c₁b₂ − c₂b₁. Finally, Dy = a₁c₂ − a₂c₁. The solution is then x = Dx ÷ D and y = Dy ÷ D. Geometrically each equation is a line; the solution is the single point where the lines cross, and Cramer's rule finds that point using determinant arithmetic instead of graphing.

To see the full process, take the system 2x + 3y = 12 and x − y = 1. Here a₁ = 2, b₁ = 3, c₁ = 12, a₂ = 1, b₂ = −1, and c₂ = 1. Build D = (2)(−1) − (1)(3) = −2 − 3 = −5. Then build Dx = (12)(−1) − (1)(3) = −12 − 3 = −15, so x = Dx ÷ D = −15 ÷ −5 = 3. For y, build Dy = (2)(1) − (1)(12) = 2 − 12 = −10, so y = Dy ÷ D = −10 ÷ −5 = 2. The solution x = 3, y = 2 checks in both original equations: 2(3) + 3(2) = 12, and 3 − 2 = 1.

The same steps work on any 2×2 system with a nonzero D. For x + y = 10 and x − y = 4, D = (1)(−1) − (1)(1) = −2, Dx = (10)(−1) − (4)(1) = −14, and Dy = (1)(4) − (1)(10) = −6, giving x = 7 and y = 3. For 5x − 2y = 4 and 3x + 4y = 18, D = (5)(4) − (3)(−2) = 26, Dx = (4)(4) − (18)(−2) = 52, and Dy = (5)(18) − (3)(4) = 78, giving x = 2 and y = 3. Substitution and elimination always agree with Cramer's rule on the same system, so the method you choose comes down to preference.

One condition matters: if D = 0 there is no unique solution. In that case the lines are parallel, which means no solution, or they are the same line, which means infinitely many solutions. Cramer's rule cannot divide by zero, so a zero determinant is the signal that the system does not have a single crossing point.

When D = 0

When D = 0, the determinant formula a₁b₂ − a₂b₁ produces zero, which signals that the system of equations calculator has found no unique solution. Geometrically, each equation in a 2×2 system represents a line, and a unique solution is the single point where the two lines cross. If D = 0, that crossing point does not exist in the ordinary way. The lines instead either run parallel and never touch, or they lie on top of each other as coincident lines. In the parallel case, the system has no solution. In the coincident case, the two equations describe the same line, and the system has infinitely many solutions.

Telling these two outcomes apart requires looking beyond D itself and examining the coefficients and constants. For the parallel case, the ratios of the x-coefficients and the y-coefficients match each other, but the ratio of the constant terms differs. That mismatch means the equations describe lines with the same slope but different positions, so the lines never intersect. For the coincident case, the ratios of the x-coefficients, the y-coefficients, and the constants all match. Every point on one line also satisfies the other equation, which is why the solution set is infinite.

It helps to compare this with systems that do have a unique solution. Verified examples show the contrast clearly. The system 2x + 3y = 12 and x − y = 1 gives D = −5, with the solution x = 3, y = 2. The system x + y = 10 and x − y = 4 gives x = 7, y = 3. The system 5x − 2y = 4 and 3x + 4y = 18 gives x = 2, y = 3 with D = 26. In each of these cases, D is not zero, and the lines cross at exactly one point. When D = 0, that crossing fails, and the coefficient ratios are what reveal whether the lines are parallel or coincident.

Substitution and elimination always agree with Cramer's rule on the same system, so D = 0 will produce the same parallel or coincident result no matter which method a system of equations calculator applies. The determinant provides a direct test: if D = 0, stop looking for a single ordered pair and instead compare the coefficient and constant ratios to classify the result.

  • D = a₁b₂ − a₂b₁; when it equals zero, there is no unique solution
  • Parallel lines: coefficient ratios match, but the constant ratio differs, so the lines never meet
  • Coincident lines: coefficient ratios and the constant ratio all match, so every point on one line satisfies the other
  • Substitution and elimination always agree with Cramer's rule on the same system
When D = 0, do not divide by D. Compare the coefficient and constant ratios to determine whether the lines are parallel or coincident.

Checking by substitution

The cheapest error check in algebra is also the simplest: take the values you found and plug them back into both of the original equations. A system of equations calculator can give you an answer in seconds, but substitution is how you confirm it is correct. If both original equations produce true statements, your solution is valid. If either one fails, the error could be in your arithmetic, in the method, or in how you entered the equations.

Consider the system 2x + 3y = 12 and x − y = 1. Using Cramer's rule, you get D = −5 and the solution x = 3, y = 2. To check by substitution, replace x with 3 and y with 2 in the first equation: 2(3) + 3(2) = 6 + 6 = 12, which matches. Now do the same with the second equation: 3 − 2 = 1, which also matches. Both originals hold true, so the solution is verified. The same approach works for any pair, such as x + y = 10 and x − y = 4, where x = 7 and y = 3. Substituting gives 7 + 3 = 10 and 7 − 3 = 4, confirming the result.

This check matters because substitution and elimination always agree with Cramer's rule on the same system. When the system 5x − 2y = 4 and 3x + 4y = 18 is solved, the result is x = 2, y = 3 with D = 26. Plugging back in: 5(2) − 2(3) = 10 − 6 = 4, and 3(2) + 4(3) = 6 + 12 = 18. Both check out. If you had made a sign error along the way, one of these substitutions would expose it immediately.

Checking also reveals when something is off with the system itself. If D = 0, there is no unique solution. Geometrically, each equation is a line, and the solution is the single point where the lines cross. When D = 0, the lines are parallel, meaning no solution, or they are the same line, meaning infinitely many. In either case, substitution will show that no single pair of values satisfies both equations in the way a unique solution would.

Always substitute into both original equations, not the rearranged versions. The originals are what you started with, so they are the standard your answer must meet.

Cramer vs elimination for bigger systems

Cramer's rule solves a 2×2 system using determinants: D = a₁b₂ − a₂b₁; x = (c₁b₂ − c₂b₁) ÷ D; y = (a₁c₂ − a₂c₁) ÷ D. The method generalizes in principle to larger systems, because determinants can be computed for any square matrix. In practice, however, the arithmetic grows quickly. A 3×3 system already requires four determinants, each built from nine entries, and the work climbs steeply from there. For that reason, Cramer's rule is rarely used by hand or in software once a system gets beyond two or three variables.

Elimination scales better. Adding multiples of one equation to another preserves the solution while systematically clearing variables, and the same steps work whether the system has two equations or two hundred. A system of equations calculator built for general use therefore relies on elimination or a related matrix method, not on determinants. Substitution and elimination always agree with Cramer's rule on the same system, so the choice of method does not change the answer, only the amount of work needed to reach it.

Where each appears in practice: Cramer's rule shows up in textbook examples, small proofs, and any setting where a compact formula for x and y is useful. Elimination is the workhorse in scientific computing, engineering models, and any application that must solve large linear systems quickly. Both rest on the same geometry. Geometrically each equation is a line; the solution is the single point where the lines cross.

  • Cramer's rule, verified: 2x + 3y = 12 and x − y = 1 give D = −5 and the solution x = 3, y = 2.
  • Cramer's rule, verified: x + y = 10 and x − y = 4 give x = 7, y = 3.
  • Cramer's rule, verified: 5x − 2y = 4 and 3x + 4y = 18 give x = 2, y = 3 with D = 26.
  • If D = 0 there is no unique solution: the lines are parallel (no solution) or the same line (infinitely many).
Cramer's rule gives a clean formula for small systems; elimination handles the large ones. A good system of equations calculator uses the method that fits the size of your input.

FAQs

How do you solve a system of two equations?

Use Cramer's rule. First compute D = a₁b₂ − a₂b₁. Then x = (c₁b₂ − c₂b₁) ÷ D and y = (a₁c₂ − a₂c₁) ÷ D. For example, if D = −5, the rule gives x = 3 and y = 2. This method works whenever D is not zero.

What does a determinant of zero mean?

A determinant of zero means the system has no unique solution. The lines are either parallel, so there is no solution at all, or identical, so there are infinitely many solutions. Either way, you cannot divide by zero, so Cramer's rule cannot produce a single answer pair.

What solves x + y = 10 and x − y = 4?

The solution is x = 7 and y = 3. Add the two equations together and x falls out directly: the y terms cancel, leaving 2x = 14, so x = 7. Substitute back to get y = 3. This is a verified example.

How do I check my solution?

Replace your solution pair into both original equations and confirm each side matches. For example, with x = 3 and y = 2, check 2(3) + 3(2) = 12 ✓ and 3 − 2 = 1 ✓. If both equations hold, the solution is correct.

When does a system have infinitely many solutions?

A system has infinitely many solutions when the two equations describe the same line. One equation is simply a multiple of the other, so every point on the line satisfies both equations at once. There is no single unique pair, just the whole line.

Is Cramer's rule or elimination better?

For 2×2 systems, Cramer's rule is quick and mechanical. For larger systems, elimination scales better because it avoids computing many determinants. However, the determinant idea still carries through and remains useful for understanding whether a unique solution exists.

Sources

Related calculators

Quadratic Equation Calculator
Solve ax² + bx + c = 0 with the quadratic formula: both roots, the discriminant, the vertex and the axis of symmetry — with a substitution check.
Slope Calculator
Slope, angle, distance and midpoint between two points, plus the full equation of the line through them — the whole coordinate-geometry answer in one go.
Matrix Determinant Calculator
The determinant of a 2×2 or 3×3 matrix with the cofactor expansion shown step by step, the trace, and whether the matrix can be inverted at all.
Percent to Fraction Calculator
Convert a percentage into its simplest fraction, decimal and ratio — exact for up to four decimal places.