Math

System of equations calculator (2 × 2 and 3 × 3)

A system of linear equations is a set of equations that share the same unknowns, and solving it means finding values that make every equation true at once. This system of equations calculator solves systems of two equations in x and y, or three equations in x, y and z, with exact fraction answers, the determinants used, and a clear message when there is no solution or infinitely many.

Runs in your browser. Nothing you type is sent to us.

Solution

x = 1, y = 2

D
-5
Dx
-5
Dy
-10

Key facts

  • The system 2x + 3y = 8 and x − y = −1 has the unique solution x = 1, y = 2.
  • Cramer’s rule: x = Dₓ ÷ D, y = Dᵧ ÷ D (and z = D_z ÷ D), where D is the determinant of the coefficients.
  • If D ≠ 0 there is exactly one solution. If D = 0 there is either no solution (parallel lines or planes) or infinitely many (the same line or plane).
  • Graphically, each equation in two variables is a line, and the solution is where the lines cross.
  • Answers are exact: x + y = 1 and x − y = 0 gives x = 1/2, y = 1/2, not rounded decimals.

How to enter the system

Write each equation in the form ax + by = c (or ax + by + cz = d for three unknowns) and type the coefficients. Move every variable term to the left side and the constant to the right first. A missing variable has a coefficient of 0, and −y has a coefficient of −1.

Methods for solving

Substitution

Solve one equation for a variable and substitute it into the other. From x − y = −1, x = y − 1. Then 2(y − 1) + 3y = 8, so 5y = 10, y = 2 and x = 1.

Elimination

Multiply equations so one variable cancels when you add them. Multiply x − y = −1 by 3 to get 3x − 3y = −3, add it to 2x + 3y = 8: 5x = 5, so x = 1, then y = 2.

Cramer’s rule (used by this calculator)

For a₁x + b₁y = c₁ and a₂x + b₂y = c₂:

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

For three equations, the same idea uses 3 × 3 determinants: replace the column of the variable you want with the constants.

Worked examples: systems of equations

Example 1: two equations

2x + 3y = 8 and x − y = −1. D = 2(−1) − 3(1) = −5. Dₓ = 8(−1) − 3(−1) = −5. Dᵧ = 2(−1) − 8(1) = −10. x = 1, y = 2.

Example 2: three equations

x + y + z = 6, 2y + 5z = −4, 2x + 5y − z = 27. The solution is x = 5, y = 3, z = −2.

Example 3: a word problem

A theatre sold 30 tickets for $296. Adult tickets cost $12 and child tickets $8. With a adults and c children: a + c = 30 and 12a + 8c = 296. Solution: a = 14, c = 16.

Example 4: no solution

x + y = 1 and 2x + 2y = 5. D = 0, and the second equation would need x + y = 2.5, so the lines are parallel: no solution.

The three possible outcomes

OutcomeDeterminantGraph (2 variables)
One solutionD ≠ 0Lines cross at one point
No solutionD = 0, inconsistentParallel lines
Infinitely manyD = 0, consistentThe same line

Where systems of equations appear

Mixture and pricing problems, break-even analysis (cost = revenue), balancing chemical equations, electrical circuits (Kirchhoff’s laws), supply and demand, and fitting a curve through given points. Larger systems are solved with matrices; see the matrix calculator.

Mistakes to avoid with systems of equations

  • Not moving all variable terms to one side before entering coefficients.
  • Forgetting the sign of a coefficient, especially −1 for −y.
  • Dividing by D when D = 0.
  • Checking only one equation. Substitute the answer back into every equation.

From the Nine Chapters to linear programming

Systems of linear equations were being solved by elimination in China two thousand years ago. Chapter 8 of *The Nine Chapters on the Mathematical Art*, titled *Fangcheng* ("rectangular arrays"), arranges coefficients in a table on a counting board and eliminates unknowns, the method now called Gaussian elimination after Carl Friedrich Gauss, who used it in the early 1800s to compute the orbit of the asteroid Pallas. Gabriel Cramer published his determinant formula, Cramer’s rule, in 1750.

Linear systems are the backbone of applied mathematics: circuit analysis with Kirchhoff’s laws, structural engineering, economics and computer graphics all reduce to them, and modern software solves systems with millions of unknowns. In 1947 George Dantzig invented the simplex method for linear programming, optimizing a goal subject to linear constraints, which airlines and logistics firms still use. A system can have one solution, none (parallel lines) or infinitely many (the same line), which the rank of the coefficient matrix detects. In US high schools, Common Core standard A-REI.C.6 asks students to solve linear systems exactly and approximately. To use matrices directly, try the matrix calculator and the determinant calculator; for a single line, the slope-intercept form calculator.

How this calculator works

  • Solves 2 × 2 or 3 × 3 linear systems by elimination.
  • Compares the rank of the coefficient matrix and the augmented matrix to detect a unique solution, no solution or infinitely many.
  • Shows the solution as fractions and decimals.
  • Equations are entered as coefficients; a zero row means that equation added no information.

Frequently asked questions

How do you solve a system of two equations?

Use substitution, elimination or Cramer’s rule. Each finds the x and y that satisfy both equations at once.

What is Cramer’s rule?

A formula that gives each unknown as a ratio of determinants: x = Dₓ ÷ D, where D is the determinant of the coefficients and Dₓ replaces the x column with the constants.

How do I know if a system has no solution?

If the coefficient determinant is zero and the equations contradict each other, the system has no solution. In two variables this means parallel lines.

What does infinitely many solutions mean?

The equations describe the same line (or plane), so every point on it satisfies all of them.

Can this calculator solve three equations?

Yes. Choose 3 equations and enter the coefficients of x, y and z and the constant for each.

Which method is best by hand?

Elimination is usually fastest for two equations. Substitution is easy when one variable already has a coefficient of 1. Cramer’s rule is neat for 2 × 2 and 3 × 3 systems.

Can the answers be fractions?

Yes. The calculator works with exact fractions and also shows the decimal value.

How do I check my answer?

Substitute the values into every original equation. Each one must be true.

Sources

  1. Wolfram MathWorld, Cramer’s rule
  2. Math is Fun, systems of linear equations
  3. MIT OpenCourseWare, 18.06 Linear Algebra

Updated November 25, 2026. Formulas checked against published sources and worked examples.

Cite this page: CalcRoster. "System of equations calculator (2 × 2 and 3 × 3)." calcroster.com/system-of-equations-calculator/. Updated November 25, 2026.

Results are estimates for general information. They are not financial, medical or legal advice. Check important decisions with a qualified professional.