Skip to content

System of Equations Calculator

Solve 2×2, 3×3 and 4×4 systems of linear equations step by step by elimination, substitution or Cramer's rule, with exact fractions and a graph.

Calculator Details

One solution:x = 2, y = 1See results ↓

One equation per line (or separated by ;), using x, y, z and w; e.g. 2x + 3y = 7

Elimination (row reduction), substitution (2 equations) or Cramer’s rule (determinants)

Your Results

One solution: x = 2, y = 1

One solution

x = 2, y = 1

2 equations, 2 unknowns

Determinant of A

−5

Non-zero: exactly one solution

Rank

2

Number of independent equations

The system has one solution: x = 2, y = 1.

Compare scenarios

Save these inputs as a scenario, change them, and compare the results side by side.

Loading, available in a moment

The two equations as lines

The two equations as lines

Detailed Breakdown

Solution
UnknownValue
x2
y1

Row reduction of the augmented matrix

Start
[     2     3 |     7 ]
[     1    −1 |     1 ]

R1 → (1/2)·R1
[     1   3/2 |   7/2 ]
[     1    -1 |     1 ]

R2 → R2 − 1·R1
[     1   3/2 |   7/2 ]
[     0  -5/2 |  -5/2 ]

R2 → −(2/5)·R2
[     1   3/2 |   7/2 ]
[     0     1 |     1 ]

R1 → R1 − (3/2)·R2
[     1     0 |     2 ]
[     0     1 |     1 ]

How This Calculator Works

How it's calculated

The equations become an augmented matrix [A | b]. Row operations (swap rows, multiply a row by a non-zero number, add a multiple of one row to another) never change the solutions, so the calculator reduces it until each unknown can be read off. A row 0 = c with c ≠ 0 means no solution; fewer pivots than unknowns means infinitely many. Cramer's rule gives each unknown as det(Aᵢ) ÷ det(A).

(1) 2x + 3y = 7
(2) x − y = 1
→ x = 2, y = 1

Check: put the values back into each of your 2 equations; both sides match.

Frequently Asked Questions

How do I type the equations?

One equation per line (or separate them with semicolons), using x, y, z and w for the unknowns: 2x + 3y = 7, x − y = 1. Fractions and brackets work, for example x/2 + y/3 = 1 or 2(x + y) = 5. Terms can be on either side of the equals sign.

Which method should I use?

They all give the same answer. Elimination (row reduction) works for any size and shows every row operation; substitution is the usual first method for two equations; Cramer’s rule is neat for small square systems and shows how the determinant decides whether there is one solution.

What does it mean if there is no solution?

The equations contradict each other. For two unknowns the lines are parallel and never cross, as with x + y = 2 and 2x + 2y = 5. During elimination this shows up as a row that says 0 = a non-zero number.

What does infinitely many solutions mean?

At least one equation repeats the information in the others, so some unknowns can take any value. For x + y = 2 and 2x + 2y = 4 (the same line twice), every point x = 2 − t, y = t is a solution. The calculator writes the answer in this parametric form.

What is the determinant telling me?

For a square system, a non-zero determinant of the coefficient matrix means exactly one solution. A determinant of zero means the equations are dependent: either no solution or infinitely many, and row reduction tells you which.

How does elimination work?

Write the coefficients and right-hand sides as an augmented matrix. Use one equation to remove an unknown from the others by adding a multiple of it, repeat for the next unknown, then scale each row so its leading coefficient is 1. The last column then holds the answer.

What is Cramer's rule?

Each unknown equals a ratio of two determinants: replace that unknown’s column of coefficients with the right-hand sides, take the determinant, and divide by the determinant of the original coefficients. For 2x + 3y = 7, x − y = 1: x = (−10) ÷ (−5) = 2.

Can it solve non-linear systems?

No. It checks that each equation is linear (no products like xy and no powers like x²) and says so if not. For a single equation in one unknown, including quadratics, use the equation solver.

Solves linear systems of up to four equations in x, y, z and w with exact fractions: Gauss–Jordan elimination (the same row reduction as the matrix calculator), substitution for two equations, and Cramer's rule for square systems, following OpenStax College Algebra 2e chapter 7 and Strang's Introduction to Linear Algebra. Not included: non-linear systems (xy, x², sin x), more than four unknowns, least-squares solutions of over-determined systems, and decimal answers rounded to a precision you choose.

System of Equations Calculator: Elimination, Substitution and Cramer's Rule

By FindMySum · Last reviewed

A system of equations is a set of equations that must all be true at the same time. Solving it means finding the values of the unknowns that satisfy every equation at once. This calculator solves linear systems with two, three or four unknowns, by elimination, by substitution or by Cramer's rule, and shows the working. It keeps every number as an exact fraction, tells you whether there is one solution, none or infinitely many, and graphs two-unknown systems. The opening example is 2x + 3y = 7 and x − y = 1.

One, none or infinitely many

For two unknowns, each linear equation is a straight line, and a solution is a point on both lines. Two lines can:

  • cross once: exactly one solution (the usual case);
  • be parallel: no solution, because they never meet;
  • be the same line: infinitely many solutions, every point on it.

The same three possibilities hold for any number of unknowns. With three, each equation is a plane, and three planes can meet at a point, along a line, or not at all.

Substitution

Solve one equation for one unknown and put the result into the other. For the default system:

  • From x − y = 1, x = y + 1.
  • Substitute: 2(y + 1) + 3y = 7, so 5y + 2 = 7 and y = 1.
  • Back-substitute: x = 1 + 1 = 2.

Substitution is natural when one equation already has a variable with coefficient 1. It becomes messy with three or more unknowns, so the calculator offers it for two equations only.

Elimination and row reduction

Elimination adds a multiple of one equation to another to cancel an unknown. Subtracting twice the second equation from the first gives 5y = 5 directly. Written systematically, this is Gaussian elimination on the augmented matrix: the coefficients with the right-hand sides in an extra column.

[ 2   3 |  7 ]
[ 1  −1 |  1 ]

Three row operations are allowed, and none of them changes the solutions: swap two rows, multiply a row by a non-zero number, and add a multiple of one row to another. The calculator applies them in order (Gauss–Jordan elimination) until the left block is the identity and the right column holds the answer, listing every step, the same procedure as the reduced row echelon form on the matrix calculator.

Row reduction also detects the special cases. A row that reads 0 0 | 3 says 0 = 3, which is impossible: no solution. If some unknowns have no pivot (no leading 1 in their column), they are free: they can take any value, written as parameters such as t, and the others are expressed in terms of them. The system x + y = 2, 2x + 2y = 4 reduces to the single equation x + y = 2, so the answer is x = 2 − t, y = t for any t.

Cramer's rule

For a square system with a non-zero determinant, each unknown is a ratio of determinants:

xᵢ = det(Aᵢ) ÷ det(A)

where Aᵢ is the coefficient matrix with column i replaced by the right-hand sides. For the default system, det(A) = 2 × (−1) − 3 × 1 = −5. Replacing the x column gives det = 7 × (−1) − 3 × 1 = −10, so x = −10 ÷ −5 = 2; replacing the y column gives 2 × 1 − 7 × 1 = −5, so y = 1.

Cramer's rule is elegant for 2 × 2 and 3 × 3 systems and shows clearly why a zero determinant means trouble: you would be dividing by zero. For larger systems elimination is much less work.

Fractions and exact answers

Real problems rarely have whole-number answers. The calculator accepts fractions in the equations (x/2 + y/3 = 1) and keeps every intermediate value exact, so the answer to x/2 + y/3 = 1, x − y = 1/2 is exactly x = 7/5, y = 9/10, shown as 1.4 and 0.9. Answers with repeating decimals stay as fractions, such as 1/3.

Checking linearity

The methods here only work for linear equations: each unknown appears to the first power, multiplied by a number, with no products of unknowns. The calculator tests every equation, and if you type something like xy = 6 or x² + y = 3 it tells you the equation is not linear. A single quadratic or polynomial equation can be solved with the equation solver instead.

A worked 3 × 3 example

Take x + y + z = 6, 2x − y + z = 3 and x + 2y − z = 2. Subtract twice the first equation from the second and the first from the third to remove x: −3y − z = −9 and y − 2z = −4. Use the second of these to remove y from the first: −7z = −21, so z = 3. Then y = −4 + 6 = 2 and x = 6 − 2 − 3 = 1. The determinant of the coefficients is 7, confirming a single solution, (1, 2, 3).

More questions

Where are systems of equations used in real life?

Anywhere several unknowns are linked by several facts: mixing two solutions to get a target concentration, splitting an investment between two accounts to earn a set amount of interest, balancing chemical equations, working out currents in an electrical circuit with Kirchhoff's laws, or finding the break-even point where cost and revenue lines meet.

How many equations do I need?

As many independent equations as there are unknowns for a single solution: two for x and y, three for x, y and z. With fewer you get infinitely many solutions; with more than you need they may contradict each other, leaving no exact solution.

Why is elimination preferred for bigger systems?

It scales. Gaussian elimination takes roughly n³/3 operations for n unknowns, while Cramer's rule needs n + 1 determinants, which quickly becomes more work. Computers solve systems with millions of unknowns using refined versions of elimination.

Can I check my answer without the calculator?

Yes, always: substitute the values back into every original equation. If x = 2 and y = 1, then 2(2) + 3(1) = 7 and 2 − 1 = 1, so both equations hold. A mistake anywhere in the working will show up as an equation that doesn't balance.

What is the graphical meaning of a 3 × 3 system?

Each equation in x, y and z is a plane in three-dimensional space. Three planes usually meet at a single point (one solution), but they can also meet along a line (infinitely many) or have no common point at all, for instance when two of them are parallel.

Sources

This article explains how the calculator works and is general information, not financial, tax, legal or medical advice. Rules change; check the sources above or a qualified professional before you act.

Spotted a wrong result or a bug? Report a problem

May we count your visits with Invoker Analytics? It keeps a random visitor number in your browser. Your calculator inputs are never sent. Privacy policy