← All math guides · Open the calculator

How to Solve Systems of Equations

Three methods for finding values that make several equations true at the same time.

A system of equations is a set of equations that share the same unknowns. A solution is a set of values that satisfies every equation at once. For two equations in x and y, each equation is a line or curve, and the solutions are the points where the graphs meet.

Method 1: Substitution

Solve one equation for one variable, then substitute that expression into the other equation. Use substitution when one equation already has a variable on its own.

Example: Solve y = 2x + 1 and 3x + 2y = 16.

Replace y in the second equation: 3x + 2(2x + 1) = 16, so 7x + 2 = 16 and x = 2.

Put x = 2 back into y = 2x + 1 to get y = 5. The solution is (2, 5).

Try it in CasCalc →

Method 2: Elimination

Add or subtract the equations so that one variable cancels. You may need to multiply one or both equations by a number first so that the coefficients match.

Example: Solve x + y = 10 and x − y = 4.

Add the equations: the y terms cancel, leaving 2x = 14, so x = 7. Then 7 + y = 10 gives y = 3. The solution is (7, 3).

Try it in CasCalc →

Example with multiplying: Solve 2x + 3y = 12 and 4x − y = 10.

Multiply the second equation by 3: 12x − 3y = 30. Add it to the first: 14x = 42, so x = 3.

Then 4(3) − y = 10 gives y = 2. The solution is (3, 2). Check: 2(3) + 3(2) = 12 and 4(3) − 2 = 10.

Try it in CasCalc →

Method 3: Graphing

Graph both equations and find the point where they cross. Graphing is less precise by hand, but it shows at a glance how many solutions there are. In CasCalc, put each equation on its own line and the graphs appear together, with intersection points marked.

Graph y = 2x + 1 →

No solution or infinitely many

Not every system has exactly one answer:

What happensGraphNumber of solutions
You get one value for each variableLines cross onceOne
You get a false statement, like 0 = 4Parallel linesNone
You get a true statement, like 0 = 0Same lineInfinitely many

For example, y = 2x + 1 and y = 2x − 3 have the same slope but different intercepts. Subtracting them gives 0 = 4, which is impossible, so there is no solution.

A nonlinear system

Substitution also works when one equation is a curve.

Example: Solve x² + y² = 25 and y = x + 1.

Substitute: x² + (x + 1)² = 25, so 2x² + 2x − 24 = 0, or x² + x − 12 = 0.

That factors as (x + 4)(x − 3) = 0, so x = 3 or x = −4. The line meets the circle at (3, 4) and (−4, −3).

Graph the circle →

Which method should you choose?

CasCalc · Math guides · About · Privacy