See How Things Work

Variables on both sides

Unit
Linear Equations
Part
1. Equations
Lesson
1.6

When the variable stands on both sides, as in 5x − 3 = 2x + 9, a variable term is subtracted from both sides so that the variable is collected on one side. This lesson proves that this step keeps the solutions, sets out the strategy for such equations, and proves the complete theorem on ax + b = cx + d: exactly one solution when a ≠ c, and no solution or every number when a = c.

Collecting the variable on one side

In the equations of lesson 1.4 and lesson 1.5 the variable appears on one side only. When it appears on both, the strategy is to choose one side to be the “variable side” and the other the “constant side”,⁠[1] to collect all the variable terms on the first and all the constants on the second,⁠[2] and so to reach an equation ax = b, which lesson 1.4 solves.⁠[3]

The new step is subtracting a variable term, such as 2x, from both sides. It needs no new theorem. Theorem 1 of lesson 1.3 allows adding or subtracting on both sides any expression that has a value at every number of the domain, not only a number, and 2x has a value at every number.

Proposition (subtracting a variable term).

For all rational numbers a, b, c and d, the equations ax + b = cx + d and (a − c)x + b = d are equivalent.

Proof.

The expression cx has a value at every number, so by Theorem 1 of lesson 1.3 the equation ax + b = cx + d is equivalent to ax + b − cx = cx + d − cx. Combining like terms (Algebraic Expressions 1.6), the left side is equivalent to (a − c)x + b and the right side to d, since cx − cx = 0x = 0. Replacing a side by an equivalent expression does not change the value of that side at any number, so it does not change the solutions.

4x + 1 = x + 10
xxxx11111111111x
4x + 1 − x = x + 10 − x
xxx1x1111111111x
3x + 1 − 1 = 10 − 1
xxx11111111111
3x = 9
xxx111111111
Figure. Collecting the variable on one side, pictured (schematic). Taking one box from each pan of a level balance leaves it level: three boxes and a weight balance ten weights. Taking one weight from each pan leaves three boxes against nine weights, so each box holds 3: x = 3. Check: 4 · 3 + 1 = 13 and 3 + 10 = 13. The picture is an intuition for positive amounts only; the Proposition holds for all rational numbers, and its proof is the reason.
Historical note.

Taking the same quantity away from both sides, as in the second balance, is al-Khwārizmī’s al-muqābala: to take away quantities that are the same on both sides.⁠[4] (Al-Khwārizmī and the word algebra.) Moving a term to the other side with its sign changed is also called transposing the term.⁠[5]

Example (Collect, then solve).

Solve 5x − 3 = 2x + 9.

5x − 3
=
2x + 9
5x − 3 − 2x
=
2x + 9 − 2x
subtract 2x from both sides
3x − 3
=
9
combine like terms
3x − 3 + 3
=
9 + 3
add 3 to both sides
3x
=
12
simplify each side
3x3
=
123
divide both sides by 3
x
=
4
simplify each side

Check: Left side: 5(4) − 3 = 17. Right side: 2(4) + 9 = 17. Both sides are 17, so x = 4 is a solution.

Which side for the variable?

Either side may be the variable side: every step is an equivalent step, so both choices give the same solution. A helpful choice is the side whose variable term has the larger coefficient, which usually makes the arithmetic easier,⁠[6] because the collected coefficient is then positive and there is less chance of a sign error.⁠[7]

Example (Both choices give the same answer).

Solve 2y + 11 = 7y − 4 with each side as the variable side.

  1. The right side has the larger coefficient, 7 > 2. Subtract 2y from both sides: 11 = 5y − 4. Add 4: 15 = 5y. Divide by 5: y = 3.
  2. The left side instead: subtract 7y from both sides: −5y + 11 = −4. Subtract 11: −5y = −15. Divide by −5: y = 3.
  3. Check: Left side: 2(3) + 11 = 17. Right side: 7(3) − 4 = 17. Both sides are 17, so y = 3 is a solution.

Answer: 3 both ways. The first way never met a negative coefficient.

Example (Negative coefficients).

Solve −3n + 8 = n − 12.

−3n + 8
=
n − 12
−3n + 8 + 3n
=
n − 12 + 3n
add 3n to both sides (1 > −3: the right side is the variable side)
8
=
4n − 12
combine like terms
8 + 12
=
4n − 12 + 12
add 12 to both sides
20
=
4n
simplify each side
n
=
5
divide both sides by 4; symmetric property

Check: Left side: −3(5) + 8 = −7. Right side: 5 − 12 = −7. Both sides are −7, so n = 5 is a solution. Removing −3n from the left side means adding 3n to both sides, since subtracting −3n is adding 3n.

Example (Fraction coefficients).

Solve 56t − 2 = 13t + 5.

56t − 2
=
13t + 5
56t − 2 − 13t
=
13t + 5 − 13t
subtract (1/3)t from both sides
12t − 2
=
5
5/6 − 2/6 = 3/6 = 1/2
12t
=
7
add 2 to both sides
t
=
14
multiply both sides by 2

Check: Left side: 56(14) − 2 = 293. Right side: 13(14) + 5 = 293. Both sides are 293, so t = 14 is a solution. Lesson 1.8 shows how to clear the fractions first.

Example (Decimal coefficients).

Solve 1.5m + 2.4 = 0.3m − 1.2.

1.5m + 2.4
=
0.3m − 1.2
1.2m + 2.4
=
−1.2
subtract 0.3m from both sides and combine
1.2m
=
−3.6
subtract 2.4 from both sides
m
=
−3
divide both sides by 1.2: 36 ÷ 12 = 3

Check: Left side: 1.5(−3) + 2.4 = −2.1. Right side: 0.3(−3) − 1.2 = −2.1. Both sides are −2.1, so m = −3 is a solution.

Example (Like terms on one side first).

Solve 6p − 4 − 2p = 9 + p.

6p − 4 − 2p
=
9 + p
4p − 4
=
p + 9
combine like terms on the left; reorder the right
3p − 4
=
9
subtract p from both sides
3p
=
13
add 4 to both sides
p
=
133
divide both sides by 3

Check: Left side: 6(133) − 4 − 2(133) = 403. Right side: 9 + 133 = 403. Both sides are 403, so p = 133 is a solution. Combining like terms within a side comes first; it is the simplifying of Algebraic Expressions 1.9.

Example (A common mistake: moving a term without changing its sign).

Someone solves 7x + 2 = 3x − 10 by writing 7x + 3x = −10 − 2, so 10x = −12 and x = −65. Find the error.

  1. Check: Left side: 7(−65) + 2 = . Right side: 3(−65) − 10 = . The sides differ, so is not a solution.
  2. The term 3x was “moved” to the left as +3x. What really happens is that 3x is subtracted from both sides: the left side becomes 7x + 2 − 3x. Transposing a term changes its sign because it is a subtraction from both sides.
  3. Correctly: subtract 3x, 4x + 2 = −10; subtract 2, 4x = −12; divide by 4, x = −3. Check: Left side: 7(−3) + 2 = −19. Right side: 3(−3) − 10 = −19. Both sides are −19, so x = −3 is a solution.

Answer: −3. Writing the subtraction on both sides, instead of “moving”, prevents this slip.

The equation ax + b = cx + d

Every equation of this lesson so far, and of lessons 1.4 and 1.5, has sides made only of variable terms and constants. Such equations have a name.

Definition (Linear equation in one variable).

An equation in one variable whose two sides are sums of terms of degree at most 1, that is, of variable terms such as 3x and of constants, is a linear equation in one variable.⁠[8]

The degree of a term is defined in Algebraic Expressions 1.9. Wu’s definition calls such sums polynomials of degree at most 1; polynomials are the subject of the unit Polynomials. Once each side is simplified, a linear equation reads ax + b = cx + d. Equations with parentheses and with fractions reduce to this form too (lesson 1.7, lesson 1.8). The next theorem says what all its solutions are, in every case.⁠[9]

Theorem (the linear equation ax + b = cx + d).

Let a, b, c and d be rational numbers.

  1. If a ≠ c, the equation has exactly one solution, x = d − ba − c.
  2. If a = c and b ≠ d, it has no solution.
  3. If a = c and b = d, every number is a solution.
Proof.

By the Proposition, the equation is equivalent to (a − c)x + b = d, and, subtracting b from both sides (Theorem 1 of lesson 1.3), to (a − c)x = d − b.

(1) If a ≠ c, the coefficient a − c is not 0, and by Theorem 2 of lesson 1.4 the equation (a − c)x = d − b has exactly one solution, d − ba − c.

(2) and (3) If a = c, the left side is 0 · x = 0 at every number, so the equation says 0 = d − b, whatever x is. If b ≠ d, this is false at every number: no solution. If b = d, it is true at every number: every number is a solution.

So a linear equation in one variable has exactly one solution, no solution, or infinitely many solutions;⁠[10] in the last two cases it is a contradiction or an identity (lesson 1.2). It never has exactly two solutions. The solving steps show which case occurs: when the variable terms cancel, what is left is a statement about numbers, true or false.

Looking ahead.

The lesson “Equations with no solution or infinitely many solutions”, later in this unit, studies the cases (2) and (3) in detail.

Example (Edge cases: the variable terms cancel).

Solve (a) 2x + 7 = 2x − 1; (b) 3x − 5 + x = 4x − 5.

  1. (a) Subtract 2x from both sides: 7 = −1. This is false, and every step was an equivalent step, so the original equation is false for every x: no solution. This is case (2), with a = c = 2 and 7 ≠ −1.
  2. (b) Combine like terms on the left: 4x − 5 = 4x − 5. Subtract 4x: −5 = −5, true for every x. Every number is a solution: case (3). For example, at x = 10 both sides are 35.

Answer: (a) no solution; (b) every number.

Example (A coefficient to choose).

For which numbers k does 6x − 1 = kx + 4 have exactly one solution? What is it?

  1. Here a = 6, b = −1, c = k, d = 4.
  2. By case (1), when k ≠ 6 there is exactly one solution, 4 − (−1)6 − k = 56 − k. For example, for k = 1 it is 1: 6 − 1 = 5 and 1 + 4 = 5.
  3. When k = 6, case (2) applies, since −1 ≠ 4: no solution.

Answer: exactly one solution, 56 − k, for every k ≠ 6; none for k = 6.

The strategy

The steps of this lesson, in order:

  1. Simplify each side: combine like terms (and first remove any parentheses, as in lesson 1.7).
  2. Choose the variable side, for example the one with the larger coefficient.
  3. Collect the variable terms on that side, adding or subtracting a variable term on both sides.⁠[11]
  4. Collect the constants on the other side, adding or subtracting a number on both sides.
  5. Make the coefficient 1, dividing both sides by it (or multiplying by its reciprocal).
  6. Check the solution in the original equation.⁠[12] If the variable terms cancel, read off the case instead: no solution or every number.
Game

Every solution

Round
1
Score
0
Streak
0

Solve: find every solution. Use the bench if you like (it also takes terms such as 3m), then type the solution, or choose “No solution” or “Every number”.

9m + 4 = −26 + 4m

Equation bench (optional): apply an operation to both sides.

9m + 4
=
−26 + 4m
or

Exercises

Exercise .

Solve and check: (a) 9a − 4 = 5a + 8; (b) 3b + 14 = 8b − 6; (c) −2c + 7 = 4c + 19; (d) 10 − d = 2d − 5.

▸ Show solution

(a) Subtract 5a: 4a − 4 = 8; add 4: 4a = 12; a = 3. Check: 27 − 4 = 23 and 15 + 8 = 23.

(b) Subtract 3b: 14 = 5b − 6; add 6: 20 = 5b; b = 4. Check: 12 + 14 = 26 and 32 − 6 = 26.

(c) Add 2c: 7 = 6c + 19; subtract 19: −12 = 6c; c = −2. Check: 4 + 7 = 11 and −8 + 19 = 11.

(d) Add d: 10 = 3d − 5; add 5: 15 = 3d; d = 5. Check: 10 − 5 = 5 and 10 − 5 = 5.

Exercise .

Solve and check: (a) 25u + 3 = 110u − 3; (b) 0.7v − 1.1 = 0.2v + 0.9.

▸ Show solution

(a) Subtract 110u: 25 − 110 = 410 − 110 = 310, so 310u + 3 = −3. Subtract 3: 310u = −6. Multiply by 103: u = −20. Check: 25 · (−20) + 3 = −8 + 3 = −5 and 110 · (−20) − 3 = −2 − 3 = −5.

(b) Subtract 0.2v: 0.5v − 1.1 = 0.9; add 1.1: 0.5v = 2; v = 4. Check: 2.8 − 1.1 = 1.7 and 0.8 + 0.9 = 1.7.

Exercise .

Find every solution: (a) 5x − 2 = 5x + 3; (b) 4x + 6 − x = 3x + 6; (c) 5x − 2 = 3x − 2.

▸ Show solution

(a) Subtracting 5x leaves −2 = 3, false: no solution (a contradiction).

(b) The left side combines to 3x + 6; subtracting 3x leaves 6 = 6, true: every number (an identity).

(c) Subtract 3x: 2x − 2 = −2; add 2: 2x = 0; so x = 0, exactly one solution. Check: −2 = −2.

Exercise .

Someone solves 4x − 9 = x + 6 by writing 4x + x = 6 + 9, so 5x = 15 and x = 3. Find the error and the solution.

▸ Show solution

The term x was moved to the left as +x; subtracting x from both sides gives 4x − x = 3x. Correctly: 3x − 9 = 6, so 3x = 15 and x = 5. The answer 3 fails the check: 4 · 3 − 9 = 3 but 3 + 6 = 9; and 5 passes: 20 − 9 = 11 = 5 + 6.

Exercise .

One phone plan costs 20 dollars a month plus 0.10 dollars a minute, another 8 dollars a month plus 0.25 dollars a minute. For how many minutes do they cost the same?

▸ Show solution

Let m be the number of minutes. The costs are 20 + 0.10m and 8 + 0.25m dollars; they are equal when 20 + 0.10m = 8 + 0.25m. Subtract 0.10m and 8: 12 = 0.15m, so m = 12 ÷ 0.15 = 1,200 ÷ 15 = 80. Check: 20 + 8 = 28 and 8 + 20 = 28. At 80 minutes both cost 28 dollars.

Exercise .

For which numbers c does 3x + 2 = cx + 2 have exactly one solution? Which?

▸ Show solution

Here a = 3, b = d = 2 and the coefficient on the right is c. By the Theorem, if c ≠ 3 there is exactly one solution, 2 − 23 − c = 0; if c = 3, then b = d and every number is a solution. So there is exactly one solution, 0, for every c ≠ 3.

Exercise .

Without solving, check by substitution that d − ba − c is a solution of ax + b = cx + d when a ≠ c.

▸ Show solution

Let s = d − ba − c. Then as + b = ad − aba − c + ab − bca − c = ad − bca − c, and cs + d = cd − bca − c + ad − cda − c = ad − bca − c.

The two sides have the same value, so s is a solution. The step needs a ≠ c: otherwise the fraction has the denominator 0 and no value. Wu gives the same check.⁠[13]

Summary

  1. Adding or subtracting a variable term such as cx on both sides gives an equivalent equation: cx has a value at every number (Theorem 1 of lesson 1.3).
  2. Strategy: simplify each side; collect the variable terms on one side (often the one with the larger coefficient) and the constants on the other; divide by the coefficient; check.
  3. “Moving a term to the other side with its sign changed” is subtracting it from both sides; writing the subtraction prevents sign errors.
  4. For ax + b = cx + d: exactly one solution (d − b)/(a − c) if a ≠ c; none if a = c and b ≠ d; every number if a = c and b = d.
  5. So a linear equation has one solution, none, or infinitely many, never exactly two.

Sources

  1. 1.
    Lynn Marecek, MaryAnne Anthony-Smith and Andrea Honeycutt Mathis, Elementary Algebra (2nd ed., OpenStax, Rice University, 2020).
    Chapter 2, “Solving Linear Equations and Inequalities”, section 2.3, “Solve Equations with Variables and Constants on Both Sides” (“Solve Equations with Constants on Both Sides”), p. 232 (the whole topic: pp. 232–239).
    “Our strategy will involve choosing one side of the equation to be the “variable side”, and the other side of the equation to be the “constant side.””
    Used for: the strategy chooses a variable side and a constant side.
  2. 2.
    Lynn Marecek, MaryAnne Anthony-Smith and Andrea Honeycutt Mathis, Elementary Algebra (2nd ed., OpenStax, Rice University, 2020).
    Chapter 2, “Solving Linear Equations and Inequalities”, section 2.3, “Solve Equations with Variables and Constants on Both Sides” (“Solve Equations with Constants on Both Sides”), p. 232 (the whole topic: pp. 232–239).
    “Then, we will use the Subtraction and Addition Properties of Equality to get all the variable terms together on one side of the equation and the constant terms together on the other side.”
    Used for: all the variable terms are collected on one side and the constants on the other.
  3. 3.
    Lynn Marecek, MaryAnne Anthony-Smith and Andrea Honeycutt Mathis, Elementary Algebra (2nd ed., OpenStax, Rice University, 2020).
    Chapter 2, “Solving Linear Equations and Inequalities”, section 2.3, “Solve Equations with Variables and Constants on Both Sides” (“Solve Equations with Constants on Both Sides”), p. 232 (the whole topic: pp. 232–239).
    “By doing this, we will transform the equation that began with variables and constants on both sides into the form ax = b.”
    Used for: collecting the terms leads to an equation ax = b.
  4. 4.
    Frederic Rosen (ed. and trans.), The Algebra of Mohammed ben Musa (Oriental Translation Fund, London, 1831).
    Chapter Notes, p. 179 (the whole topic: pp. 177–181). Read it online.
    “When applied to equations, it signifies, to take away such quantities as are the same and equal on both sides.”
    Used for: al-muqābala: taking away quantities that are the same on both sides.
  5. 5.
    H. Wu, Introduction to School Algebra (draft of July 24, 2010, Department of Mathematics, University of California, Berkeley, 2010).
    Chapter 3, “Linear Equations in One Variable”, p. 47 (the whole topic: pp. 45–47).
    “is usually referred to as transposing the terms Cx and B to the other side.”
    Used for: moving a term to the other side (from Ax + B = Cx + D to Ax − Cx = D − B) is called transposing it.
  6. 6.
    Lynn Marecek, MaryAnne Anthony-Smith and Andrea Honeycutt Mathis, Elementary Algebra (2nd ed., OpenStax, Rice University, 2020).
    Chapter 2, “Solving Linear Equations and Inequalities”, section 2.3, “Solve Equations with Variables and Constants on Both Sides” (“Solve Equations with Variables and Constants on Both Sides”), p. 236 (the whole topic: pp. 235–237).
    “In Step 1, a helpful approach is to make the “variable” side the side that has the variable with the larger coefficient. This usually makes the arithmetic easier.”
    Used for: a helpful choice of the variable side is the side with the larger coefficient; it usually makes the arithmetic easier.
  7. 7.
    Lynn Marecek, MaryAnne Anthony-Smith and Andrea Honeycutt Mathis, Elementary Algebra (2nd ed., OpenStax, Rice University, 2020).
    Chapter 2, “Solving Linear Equations and Inequalities”, section 2.3, “Solve Equations with Variables and Constants on Both Sides” (“Solve Equations with Variables and Constants on Both Sides”), p. 237 (the whole topic: pp. 235–237).
    “While we could work with the negative, there is less chance of errors when working with positives.”
    Used for: with a positive collected coefficient there is less chance of a sign error.
  8. 8.
    H. Wu, Introduction to School Algebra (draft of July 24, 2010, Department of Mathematics, University of California, Berkeley, 2010).
    Chapter 3, “Linear Equations in One Variable”, p. 42 (the whole topic: pp. 42–48).
    “equations which ask for numbers x so that two given polynomials in x of degree at most 1 are equal. These are called linear equations of one variable.”
    Used for: the definition of a linear equation in one variable.
  9. 9.
    H. Wu, Introduction to School Algebra (draft of July 24, 2010, Department of Mathematics, University of California, Berkeley, 2010).
    Chapter 3, “Linear Equations in One Variable”, p. 47 (the whole topic: pp. 45–47).
    “(i) The equation has a unique solution (D − B)/(A − C) if A ≠ C. (ii) The equation has no solution if A = C but B ≠ D. (iii) Every number is a solution if A = C and B = D.”
    Used for: the Theorem on ax + b = cx + d, with its three cases; the proof follows Wu’s proof.
  10. 10.
    National Governors Association Center for Best Practices and Council of Chief State School Officers, “Common Core State Standards for Mathematics”, Common Core State Standards Initiative (2010).
    Section “Expressions and Equations, standard 8.EE.7a (p. 54)”. corestandards.org/wp-content/uploads/2023/09/Math_Standards1.pdf · open at the quoted passage.
    “Give examples of linear equations in one variable with one solution, infinitely many solutions, or no solutions. Show which of these possibilities is the case by successively transforming the given equation into simpler forms”
    Used for: a linear equation in one variable has one solution, infinitely many, or none; the solving steps show which case occurs.
  11. 11.
    Lynn Marecek, MaryAnne Anthony-Smith and Andrea Honeycutt Mathis, Elementary Algebra (2nd ed., OpenStax, Rice University, 2020).
    Chapter 2, “Solving Linear Equations and Inequalities”, section 2.3, “Solve Equations with Variables and Constants on Both Sides” (“Solve Equations with Variables and Constants on Both Sides”), p. 236 (the whole topic: pp. 235–237).
    “Collect the variable terms to the “variable” side of the equation, using the Addition or Subtraction Property of Equality.”
    Used for: the variable terms are collected on the variable side by adding or subtracting on both sides.
  12. 12.
    Lynn Marecek, MaryAnne Anthony-Smith and Andrea Honeycutt Mathis, Elementary Algebra (2nd ed., OpenStax, Rice University, 2020).
    Chapter 2, “Solving Linear Equations and Inequalities”, section 2.3, “Solve Equations with Variables and Constants on Both Sides” (“Solve Equations with Variables and Constants on Both Sides”), p. 236 (the whole topic: pp. 235–237).
    “Check the solution by substituting it into the original equation.”
    Used for: the solution is checked in the original equation.
  13. 13.
    H. Wu, Introduction to School Algebra (draft of July 24, 2010, Department of Mathematics, University of California, Berkeley, 2010).
    Chapter 3, “Linear Equations in One Variable”, p. 46 (the whole topic: pp. 45–46).
    “We now check that (D − B)/(A − C) is indeed a solution of the original equation Ax + B = Cx + D”
    Used for: exercise 7: the check by substitution that (d − b)/(a − c) solves ax + b = cx + d follows Wu’s check.