Skip to content

System of Equations Calculator (2 × 2 and 3 × 3)

Solve 2 × 2 and 3 × 3 linear systems exactly, by elimination, substitution, Cramer’s rule or Gaussian elimination, with steps.

Your details

System size

Results update as you type

Solution

x = 3, y = 2

Type of system
One unique solution
Determinant D
-5
System solved
2x + 3y = 12, x − y = 1

Step-by-step solution
  1. System: 2x + 3y = 12, x − y = 1
  2. Multiply equation 1 by 1 and equation 2 by 2, then subtract to eliminate x:
  3. (1·3 − 2·(−1))y = 1·12 − 2·1 → 5y = 10 → y = 2
  4. Substitute into equation 1:
  5. 2x + 3·2 = 12 → x = 3
  6. Check: 2·3 + 3·2 = 12, 1·3 − 1·2 = 1 ✓

A system of linear equations asks for the values that satisfy several equations at once, such as 2x+3y=122x + 3y = 12 and x−y=1x - y = 1. This system of equations calculator solves systems of two equations in two unknowns and three equations in three unknowns, and tells you which of the three possible situations you are in: exactly one solution, no solution, or infinitely many.

Answers are exact fractions (with decimals beside them when useful), because the whole calculation runs on rational numbers: x=43/17x = 43/17 is shown as 43/1743/17, not as a rounded 2.529. You can enter decimal coefficients; they are converted to exact fractions too.

Pick the method you need to see in the steps. For two equations it can show elimination (combining equations to cancel xx), substitution (isolating one variable and replacing it), or Cramer's rule; for three equations, Gaussian elimination on the augmented matrix or Cramer's rule with 3 × 3 determinants. It is a simultaneous equations solver for homework checks, a two variable equation solver for word problems, and a quick way to see whether a dependent system needs a parameter.

How to use this calculator

  1. Choose the size: 2 equations with 2 unknowns, or 3 equations with 3 unknowns.
  2. Write each equation in standard form, unknowns on the left and the constant on the right: ax+by=dax + by = d or ax+by+cz=dax + by + cz = d.
  3. Enter the coefficients row by row. A missing variable has coefficient 0.
  4. Choose the method shown in the steps: elimination, substitution (2 × 2) or Cramer's rule.
  5. Read the solution, the type of system and the determinant; open the steps to follow the method and the final check.

The formula

Elimination (2 × 2). For a1x+b1y=d1a_1x + b_1y = d_1 and a2x+b2y=d2a_2x + b_2y = d_2, multiplying the first by a2a_2, the second by a1a_1 and subtracting removes xx:

(a2b1−a1b2) y=a2d1−a1d2(a_2b_1 - a_1b_2)\,y = a_2d_1 - a_1d_2

Cramer's rule. With the determinant D=a1b2−a2b1≠0D = a_1b_2 - a_2b_1 \neq 0:

x=DxD=d1b2−d2b1a1b2−a2b1,y=DyD=a1d2−a2d1a1b2−a2b1x = \frac{D_x}{D} = \frac{d_1b_2 - d_2b_1}{a_1b_2 - a_2b_1}, \qquad y = \frac{D_y}{D} = \frac{a_1d_2 - a_2d_1}{a_1b_2 - a_2b_1}

For 3 × 3 systems, DxD_x, DyD_y, DzD_z are the determinants obtained by replacing the matching column by the right-hand sides.

Gaussian elimination. Row operations on the augmented matrix [A∣d][A \mid d] (swap rows, scale a row, add a multiple of one row to another) do not change the solutions. Reduced to echelon form, a row [0 0 0∣k][0\ 0\ 0 \mid k] with k≠0k \neq 0 means no solution; fewer pivots than unknowns means infinitely many, described with a free parameter tt.

Worked example

Two variables. Solve 2x+3y=122x + 3y = 12 and x−y=1x - y = 1. Multiply the second equation by 2 and subtract it from the first: 5y=105y = 10, so y=2y = 2. Then x−2=1x - 2 = 1 gives x=3x = 3. The determinant is D=2×(−1)−1×3=−5D = 2 \times (-1) - 1 \times 3 = -5, so the solution is unique: x=3,y=2x = 3, y = 2.

Three variables. For 2x+3y+2z=122x + 3y + 2z = 12, x−y+z=1x - y + z = 1, 3x+y−z=33x + y - z = 3, the determinant is D=20D = 20 and Gaussian elimination gives (x,y,z)=(1,2,2)(x, y, z) = (1, 2, 2).

Dependent system. x+2y=4x + 2y = 4 and 2x+4y=82x + 4y = 8 are the same line (the second is twice the first). Setting y=ty = t gives x=4−2tx = 4 - 2t: infinitely many solutions, one for each real tt. Change the second right-hand side to 9 and the lines become parallel: no solution.

One solution, none, or infinitely many

Each linear equation in two variables is a line. Two lines either cross at one point, are parallel (no common point), or coincide (every point is shared). The determinant tells you which: D≠0D \neq 0 means exactly one solution; D=0D = 0 means parallel or identical lines, and the elimination steps show which one.

With three variables each equation is a plane, and the same three cases appear. For linear equations in two variables, the line equation calculator gives slope-intercept forms, and the graphing calculator lets you see where the lines cross.

Which method should I use?

  • Substitution is quickest when a variable already has coefficient 1 or −1, as in x−y=1x - y = 1.
  • Elimination suits equations with larger whole-number coefficients.
  • Cramer's rule gives a formula for each unknown and is handy for 2 × 2 systems, but it only works when D≠0D \neq 0.
  • Gaussian elimination scales to any size and also classifies singular systems. For bigger systems or matrix inverses, use the matrix calculator.

Frequently asked questions

How do I solve two equations with two unknowns?

Write both in the form ax + by = d. Then eliminate one variable, by adding a multiple of one equation to the other or by substituting an isolated variable, solve the single equation that remains, and substitute back to find the other unknown.

What does it mean when a system has no solution?

The equations contradict each other. For two variables the lines are parallel: same slope, different intercepts. Elimination then ends with an impossible statement such as 0 = 1.

How is an infinite solution written?

With a parameter. If x + 2y = 4 is the only independent equation, let y = t; then x = 4 − 2t. Every real value of t gives one solution.

Are the answers exact?

Yes. All arithmetic uses fractions, so 43/17 stays 43/17. Decimal approximations are shown separately when the answer is not a whole number.

Can it solve simultaneous equations that are not linear?

No: this tool is for linear systems, where each unknown appears to the first power. For one nonlinear equation in x, use the equation solver.

Sources

Last updated:

More Math calculators

People also use