System of Equations Calculator

Solve systems of equations by substitution or elimination, with steps.

Result

Type two or three equations separated by commas, like 2x + 3y = 12, 3x - 2y = 5.

Type two or three equations, separated by commas, and they are solved by substitution or elimination with each step and a graph of where they meet: 2x + 3y = 12 and x − y = 1 give x = 3, y = 2. A line with a parabola or circle is solved by substitution.

Substitution or elimination?

Substitution is quickest when a variable has coefficient 1 or −1, like the y in y = 2x + 1: solve that equation for y and put the expression into the other equation. Elimination is quickest otherwise: multiply the equations so one variable has the same size of coefficient, then add (opposite signs) or subtract (same signs) so it disappears. The calculator chooses the variable that needs the smallest multipliers.

Solve 2x + 3y = 12,\ 3x - 2y = 5 by elimination.

\begin{aligned} 6x + 9y &= 36 && (1) \times 3 \\ 6x - 4y &= 10 && (2) \times 2 \\ 13y &= 26 && \text{subtract} \\ y &= 2,\quad x = 3 \end{aligned}

From a word problem to a system

A school sells 20 tickets – adults at ₹12 and children at ₹7 – for ₹185 in all. With x adult and y child tickets, one equation counts tickets and one counts money:

x + y = 20,\qquad 12x + 7y = 185

Substituting y = 20 − x gives 12x + 140 − 7x = 185, so 5x = 45: 9 adults and 11 children. Check in the money equation: 108 + 77 = 185. Mixtures, two prices, speeds with and against a current and ages “in 5 years’ time” all turn into the same two-equation form.

Cramer’s rule for two equations

For a_1x + b_1y = c_1 and a_2x + b_2y = c_2 there is a formula, as long as D = a_1b_2 - a_2b_1 \ne 0:

x = \frac{c_1b_2 - c_2b_1}{D},\qquad y = \frac{a_1c_2 - a_2c_1}{D}

For 2x + 3y = 12 and 3x − 2y = 5, D = −4 − 9 = −13, x = (−24 − 15)/(−13) = 3 and y = (10 − 36)/(−13) = 2. When D = 0 the lines are parallel or the same line – see below.

Three equations in three unknowns

Use one equation to eliminate the same variable from the other two. That leaves two equations in two unknowns, which you solve as above, then substitute back to find the third variable. Larger systems are solved by Gaussian elimination on the augmented matrix, with every row operation shown.

No solution or infinitely many

If the variables cancel and a false statement is left (0 = −3), the equations contradict each other – two parallel lines – and there is no solution. If a true statement is left (0 = 0), the equations describe the same line and there are infinitely many solutions; the calculator writes them in terms of the free variable.

Non-linear systems

For a system like y = x^2, x + y = 6, solve the linear equation for one variable and substitute into the other. You get a single equation (here a quadratic) whose solutions give the intersection points: (−3, 9) and (2, 4).

Frequently asked questions

What do the numbers (1), (2) mean in the steps?

They label the equations so each step can say which ones were combined, the way it is written on a board.