Back to Blog
    Math

    How to Solve Simultaneous Equations: Substitution vs Elimination

    Y
    Ytools Team
    October 2, 2026 5 min read
    Share →
    Two equations, one answer — 2x + 3y = 12 and x − y = 1 give (3, 2)

    Simultaneous equations are two (or more) equations that must be true at the same time. With two unknowns you need two equations, and the solution is the pair of values that satisfies both. This guide covers the two everyday methods — substitution and elimination — plus Cramer's rule, the special cases, and how to check your answer.

    What "simultaneous" means

    Each linear equation in xx and yy is a straight line. The solution is the point where the lines cross.

    Graph of the lines 2x + 3y = 12 and x − y = 1 crossing at (3, 2)
    Graph of the lines 2x + 3y = 12 and x − y = 1 crossing at (3, 2)

    For 2x+3y=122x + 3y = 12 and x−y=1x - y = 1, the lines meet at (3,2)(3, 2): that is, x=3x = 3 and y=2y = 2. Graphs are a good picture but slow and imprecise; algebra gives exact answers.

    Method 1 — Substitution

    Solve one equation for one variable, then substitute that expression into the other equation.

    Worked example: 2x+3y=122x + 3y = 12 and x−y=1x - y = 1

    1. The second equation is easy to rearrange: x=1+yx = 1 + y.
    2. Substitute into the first: 2(1+y)+3y=122(1 + y) + 3y = 12.
    3. Expand and solve: 2+2y+3y=12⇒5y=10⇒y=22 + 2y + 3y = 12 \Rightarrow 5y = 10 \Rightarrow y = 2.
    4. Back-substitute: x=1+2=3x = 1 + 2 = 3.
    5. Check both equations: 2(3)+3(2)=122(3) + 3(2) = 12 ✓ and 3−2=13 - 2 = 1 ✓.

    Step 3 is just a one-variable equation — see solving one equation for x if that part is shaky.

    Method 2 — Elimination

    Add or subtract the equations so that one variable cancels out.

    Worked example: 3x+2y=163x + 2y = 16 and 5x−2y=165x - 2y = 16

    1. The yy-coefficients are +2+2 and −2-2, so add the equations: 8x=328x = 32.
    2. x=4x = 4.
    3. Substitute into the first equation: 3(4)+2y=16⇒2y=4⇒y=23(4) + 2y = 16 \Rightarrow 2y = 4 \Rightarrow y = 2.
    4. Check: 5(4)−2(2)=20−4=165(4) - 2(2) = 20 - 4 = 16 ✓.

    When you must multiply first: 2x+3y=132x + 3y = 13 and 3x+2y=123x + 2y = 12

    No coefficients match, so make them match. Multiply the first equation by 3 and the second by 2:

    6x+9y=396x+4y=246x + 9y = 39 \qquad 6x + 4y = 24

    Subtract: 5y=155y = 15, so y=3y = 3. Then 2x+9=13⇒x=22x + 9 = 13 \Rightarrow x = 2. Check: 3(2)+2(3)=123(2) + 2(3) = 12 ✓.

    Which method should you use?

    Side-by-side comparison of the substitution and elimination methods
    Side-by-side comparison of the substitution and elimination methods
    Use substitution when…Use elimination when…
    one variable already has a coefficient of 1 or −1 (x−y=1x - y = 1)coefficients already match or are opposites
    one equation is already solved for a variable (y=2x+1y = 2x + 1)both equations are in the form ax+by=cax + by = c
    the system is non-linear (e.g. a line and a curve)substitution would create messy fractions

    Both methods always give the same answer, so you can use one to check the other.

    Method 3 — Cramer's rule (using determinants)

    For a1x+b1y=c1a_1x + b_1y = c_1 and a2x+b2y=c2a_2x + b_2y = c_2:

    x=DxD,y=DyD,D=∣a1b1a2b2∣,  Dx=∣c1b1c2b2∣,  Dy=∣a1c1a2c2∣x = \frac{D_x}{D}, \quad y = \frac{D_y}{D}, \quad D = \begin{vmatrix} a_1 & b_1 \\ a_2 & b_2 \end{vmatrix},\; D_x = \begin{vmatrix} c_1 & b_1 \\ c_2 & b_2 \end{vmatrix},\; D_y = \begin{vmatrix} a_1 & c_1 \\ a_2 & c_2 \end{vmatrix}

    For 2x+3y=122x + 3y = 12, x−y=1x - y = 1: D=(2)(−1)−(3)(1)=−5D = (2)(-1) - (3)(1) = -5, Dx=(12)(−1)−(3)(1)=−15D_x = (12)(-1) - (3)(1) = -15, Dy=(2)(1)−(12)(1)=−10D_y = (2)(1) - (12)(1) = -10. So x=−15−5=3x = \frac{-15}{-5} = 3 and y=−10−5=2y = \frac{-10}{-5} = 2 ✓. Cramer's rule needs D≠0D \neq 0 and extends to three unknowns using 3×3 determinants. The 2×2 determinant calculator speeds up the arithmetic.

    No solution and infinitely many solutions

    SystemWhat happensLinesSolutions
    x+y=3x + y = 3, x+y=5x + y = 5subtracting gives 0=20 = 2 (false)parallelnone (inconsistent)
    x+y=3x + y = 3, 2x+2y=62x + 2y = 6the second is 2 × the first; you get 0=00 = 0the same lineinfinitely many (dependent)

    In both cases D=0D = 0, which is why Cramer's rule can't be used.

    A word problem

    Two pens and three notebooks cost 12. A pen costs 1 more than a notebook. Find each price.

    Let xx = pen price and yy = notebook price: 2x+3y=122x + 3y = 12 and x−y=1x - y = 1. That's our first example, so a pen costs 3 and a notebook costs 2. Check: 2(3)+3(2)=122(3) + 3(2) = 12 ✓.

    Common mistakes

    • Substituting back into the equation you rearranged (it will always "check") — check in both original equations.
    • Subtracting equations but forgetting to subtract every term, especially negatives.
    • Multiplying only one side of an equation when scaling it.
    • Stopping after finding one variable.

    Use the simultaneous equations calculator

    Enter both equations in the simultaneous equations calculator to see a full solution, or use the linear equation solver for the single-variable step.

    FAQ

    How do you solve simultaneous equations? Use substitution (rearrange one equation and substitute into the other) or elimination (add/subtract the equations to cancel one variable), then back-substitute and check.

    Which is easier, substitution or elimination? Substitution when a variable has coefficient 1; elimination when coefficients match or can easily be made to match.

    How do I know if there is no solution? If eliminating a variable leaves a false statement like 0=20 = 2, the lines are parallel and there is no solution.

    Can simultaneous equations have infinitely many solutions? Yes, when both equations describe the same line — eliminating gives 0=00 = 0.

    How do I check my answer? Substitute both values into both original equations.

    Is there a simultaneous equations calculator with steps? Yes — the simultaneous equations calculator shows the full working.

    Further reading: Wolfram MathWorld — Linear System of Equations · OpenStax Elementary Algebra 2e, chapter 5.