maths.freeArithmetic › 8. Solving Linear Equations › Solve Equations with Variables and Constants on Both Sides

Solve Equations with Variables and Constants on Both Sides

Solve an equation with constants on both sides

Solve an Equation with Constants on Both Sides

You may have noticed that in all the equations we have solved so far, all the variable terms were on only one side of the equation with the constants on the other side. This does not happen all the time—so now we’ll see how to solve equations where the variable terms and/or constant terms are on both sides of the equation.

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. Then, we will use the Subtraction and Addition Properties of Equality, step by step, to get all the variable terms together on one side of the equation and the constant terms together on the other side.

By doing this, we will transform the equation that started with variables and constants on both sides into the form \(ax=b.\) We already know how to solve equations of this form by using the Division or Multiplication Properties of Equality.

Example

Try it.

Solve: \(4x+6=-14.\)

Solution

In this equation, the variable is only on the left side. It makes sense to call the left side the variable side. Therefore, the right side will be the constant side. We’ll write the labels above the equation to help us remember what goes where.

Since the left side is the variable side, the 6 is out of place.
We must "undo" adding 6 by subtracting 6,
and to keep the equality we must subtract 6 from both sides.
Use the Subtraction Property of Equality.
Simplify.
Now all the \(x\)s are on the left and the constant on the right.
Use the Division Property of Equality.
Simplify.
Check:
Let \(x=-5\).
Example

Try it.

Solve: \(2y-7=15.\)

Solution

Notice that the variable is only on the left side of the equation, so this will be the variable side and the right side will be the constant side. Since the left side is the variable side, the \(7\) is out of place. It is subtracted from the \(2y,\) so to ‘undo’ subtraction, add \(7\) to both sides.

Add 7 to both sides.
Simplify.
The variables are now on one side and the constants on the other.
Divide both sides by 2.
Simplify.
Check:
Substitute: \(y=11\).

Solve an Equation with Variables on Both Sides

What if there are variables on both sides of the equation? We will start like we did above—choosing a variable side and a constant side, and then use the Subtraction and Addition Properties of Equality to collect all variables on one side and all constants on the other side. Remember, what you do to the left side of the equation, you must do to the right side too.

Example

Try it.

Solve: \(5x=4x+7.\)

Solution

Here the variable, \(x,\) is on both sides, but the constants appear only on the right side, so let’s make the right side the “constant” side. Then the left side will be the “variable” side.

We don't want any variables on the right, so subtract the \(4x\).
Simplify.
We have all the variables on one side and the constants on the other. We have solved the equation.
Check:
Substitute 7 for \(x\).
Example

Try it.

Solve: \(5y-8=7y.\)

Solution

The only constant, \(-8,\) is on the left side of the equation and variable, \(y,\) is on both sides. Let’s leave the constant on the left and collect the variables to the right.

Subtract \(5y\) from both sides.
Simplify.
We have the variables on the right and the constants on the left. Divide both sides by 2.
Simplify.
Rewrite with the variable on the left.
Check: Let \(y=-4\).
Example

Try it.

Solve: \(7x=-x+24.\)

Solution

The only constant, \(24,\) is on the right, so let the left side be the variable side.

Remove the \(-x\) from the right side by adding \(x\) to both sides.
Simplify.
All the variables are on the left and the constants are on the right. Divide both sides by 8.
Simplify.
Check: Substitute \(x=3\).

Solve Equations with Variables and Constants on Both Sides

The next example will be the first to have variables and constants on both sides of the equation. As we did before, we’ll collect the variable terms to one side and the constants to the other side.

Example

Try it.

Solve: \(7x+5=6x+2.\)

Solution

Start by choosing which side will be the variable side and which side will be the constant side. The variable terms are \(7x\) and \(6x.\) Since \(7\) is greater than \(6,\) make the left side the variable side and so the right side will be the constant side.

Collect the variable terms to the left side by subtracting \(6x\) from both sides.
Simplify.
Now, collect the constants to the right side by subtracting 5 from both sides.
Simplify.
The solution is \(x=-3\).
Check: Let \(x=-3\).

We’ll summarize the steps we took so you can easily refer to them.

It is a good idea to make the variable side the one in which the variable has the larger coefficient. This usually makes the arithmetic easier.

Example

Try it.

Solve: \(6n-2=-3n+7.\)

Solution

We have \(6n\) on the left and \(-3n\) on the right. Since \(6>-3,\) make the left side the “variable” side.

We don't want variables on the right side—add \(3n\) to both sides to leave only constants on the right.
Combine like terms.
We don't want any constants on the left side, so add 2 to both sides.
Simplify.
The variable term is on the left and the constant term is on the right.
To get the coefficient of \(n\) to be one, divide both sides by 9.
Simplify.
Check: Substitute 1 for \(n\).

To solve an equation with fractions, we still follow the same steps to get the solution.

Example

Try it.

Solve: \(\frac{3}{2}\ x+5=\frac{1}{2}\ x-3.\)

Solution

Since \(\frac{3}{2}>\frac{1}{2},\) make the left side the variable side and the right side the constant side.

Subtract \(\frac{1}{2}x\) from both sides.
Combine like terms.
Subtract 5 from both sides.
Simplify.
Check: Let \(x=-8\).

Condensed — the full section is in OpenStax Prealgebra 2e.

Solve Equations Using a General Strategy

Each of the first few sections of this chapter has dealt with solving one specific form of a linear equation. It’s time now to lay out an overall strategy that can be used to solve any linear equation. We call this the general strategy. Some equations won’t require all the steps to solve, but many will. Simplifying each side of the equation as much as possible first makes the rest of the steps easier.

Example

Try it.

Solve: \(3(x+2)=18.\)

Solution
Simplify each side of the equation as much as possible.
Use the Distributive Property.
Collect all variable terms on one side of the equation—all \(x\)s are already on the left side.
Collect constant terms on the other side of the equation.
Subtract 6 from each side
Simplify.
Make the coefficient of the variable term equal to 1. Divide each side by 3.
Simplify.
Check: Let \(x=4\).
Example

Try it.

Solve: \(-(x+5)=7.\)

Solution
Simplify each side of the equation as much as possible by distributing.
The only \(x\) term is on the left side, so all variable terms are on the left side of the equation.
Add 5 to both sides to get all constant terms on the right side of the equation.
Simplify.
Make the coefficient of the variable term equal to 1 by multiplying both sides by -1.
Simplify.
Check: Let \(x=-12\).




Example

Try it.

Solve: \(4(x-2)+5=-3.\)

Solution
Simplify each side of the equation as much as possible.
Distribute.
Combine like terms
The only \(x\) is on the left side, so all variable terms are on one side of the equation.
Add 3 to both sides to get all constant terms on the other side of the equation.
Simplify.
Make the coefficient of the variable term equal to 1 by dividing both sides by 4.
Simplify.
Check: Let \(x=0\).

Condensed — the full section is in OpenStax Prealgebra 2e.

Key Concepts

  • Solve an equation with variables and constants on both sides
    1. Choose one side to be the variable side and then the other will be the constant side.
    2. Collect the variable terms to the variable side, using the Addition or Subtraction Property of Equality.
    3. Collect the constants to the other side, using the Addition or Subtraction Property of Equality.
    4. Make the coefficient of the variable 1, using the Multiplication or Division Property of Equality.
    5. Check the solution by substituting into the original equation.
  • General strategy for solving linear equations
    1. Simplify each side of the equation as much as possible. Use the Distributive Property to remove any parentheses. Combine like terms.
    2. Collect all the variable terms to one side of the equation. Use the Addition or Subtraction Property of Equality.
    3. Collect all the constant terms to the other side of the equation. Use the Addition or Subtraction Property of Equality.
    4. Make the coefficient of the variable term to equal to 1. Use the Multiplication or Division Property of Equality. State the solution to the equation.
    5. Check the solution. Substitute the solution into the original equation to make sure the result is a true statement.

Solve Equations with Variables and Constants on Both Sides

Solve an Equation with Constants on Both Sides

In the following exercises, solve the equation for the variable.

Try it.

\(6x-2=40\)

Try it.

\(7x-8=34\)

Solution

x = 6

Try it.

\(11w+6=93\)

Try it.

\(14y+7=91\)

Solution

y = 6

Try it.

\(3a+8=-46\)

Try it.

\(4m+9=-23\)

Solution

m = −8

Try it.

\(-50=7n-1\)

Try it.

\(-47=6b+1\)

Solution

b = −8

Try it.

\(25=-9y+7\)

Try it.

\(29=-8x-3\)

Solution

x = −4

Try it.

\(-12p-3=15\)

Try it.

\(-14\text{q}-15=13\)

Solution

q = −2

Solve an Equation with Variables on Both Sides

In the following exercises, solve the equation for the variable.

Try it.

\(8z=7z-7\)

Try it.

\(9k=8k-11\)

Solution

k = −11

Try it.

\(4x+36=10x\)

Try it.

\(6x+27=9x\)

Solution

x = 9

Try it.

\(c=-3c-20\)

Try it.

\(b=-4b-15\)

Solution

b = −3

Try it.

\(5q=44-6q\)

Try it.

\(7z=39-6z\)

Solution

z = 3

Try it.

\(3y+\frac{1}{2}=2y\)

Try it.

\(8x+\frac{3}{4}=7x\)

Solution

\(x=-\frac{3}{4}\)

Try it.

\(-12a-8=-16a\)

Try it.

\(-15r-8=-11r\)

Solution

r = −2

Solve an Equation with Variables and Constants on Both Sides

In the following exercises, solve the equations for the variable.

Try it.

\(6x-15=5x+3\)

Try it.

\(4x-17=3x+2\)

Solution

x = 19

Try it.

\(26+8d=9d+11\)

Try it.

\(21+6f=7f+14\)

Solution

f = 7

Try it.

\(3p-1=5p-33\)

Try it.

\(8q-5=5q-20\)

Solution

q = −5

Try it.

\(4a+5=-a-40\)

Try it.

\(9c+7=-2c-37\)

Solution

c = −4

Try it.

\(8y-30=-2y+30\)

Try it.

\(12x-17=-3x+13\)

Solution

x = 2

Try it.

\(2\text{z}-4=23-\text{z}\)

Try it.

\(3y-4=12-y\)

Solution

y = 4

Try it.

\(\frac{5}{4}\ c-3=\frac{1}{4}\ c-16\)

Try it.

\(\frac{4}{3}\ m-7=\frac{1}{3}\ m-13\)

Solution

m = −6

Try it.

\(8-\frac{2}{5}\ q=\frac{3}{5}\ q+6\)

Try it.

\(11-\frac{1}{4}\ a=\frac{3}{4}\ a+4\)

Solution

a = 7

Try it.

\(\frac{4}{3}\ n+9=\frac{1}{3}\ n-9\)

Try it.

\(\frac{5}{4}\ a+15=\frac{3}{4}\ a-5\)

Solution

a = −40

Try it.

\(\frac{1}{4}\ y+7=\frac{3}{4}\ y-3\)

Try it.

\(\frac{3}{5}\ p+2=\frac{4}{5}\ p-1\)

Solution

p = 15

Try it.

\(14n+8.25=9n+19.60\)

Try it.

\(13z+6.45=8z+23.75\)

Solution

z = 3.46

Try it.

\(2.4w-100=0.8w+28\)

Try it.

\(2.7w-80=1.2w+10\)

Solution

w = 60

Try it.

\(5.6r+13.1=3.5r+57.2\)

Try it.

\(6.6x-18.9=3.4x+54.7\)

Solution

x = 23

Solve an Equation Using the General Strategy

In the following exercises, solve the linear equation using the general strategy.

Try it.

\(5(x+3)=75\)

Try it.

\(4(y+7)=64\)

Solution

y = 9

Try it.

\(8=4(x-3)\)

Try it.

\(9=3(x-3)\)

Solution

x = 6

Try it.

\(20(y-8)=-60\)

Try it.

\(14(y-6)=-42\)

Solution

y = 3

Try it.

\(-4(2n+1)=16\)

Try it.

\(-7(3n+4)=14\)

Solution

n = −2

Try it.

\(3(10+5r)=0\)

Try it.

\(8(3+3\text{p})=0\)

Solution

p = −1

Try it.

\(\frac{2}{3}(9c-3)=22\)

Try it.

\(\frac{3}{5}(10x-5)=27\)

Solution

x = 5

Try it.

\(5(1.2u-4.8)=-12\)

Try it.

\(4(2.5v-0.6)=7.6\)

Solution

v = 1

Try it.

\(0.2(30n+50)=28\)

Try it.

\(0.5(16m+34)=-15\)

Solution

m = 0.25

Try it.

\(-(w-6)=24\)

Try it.

\(-(t-8)=17\)

Solution

t = −9

Try it.

\(9(3a+5)+9=54\)

Try it.

\(8(6b-7)+23=63\)

Solution

b = 2

Try it.

\(10+3(z+4)=19\)

Try it.

\(13+2(m-4)=17\)

Solution

m = 6

Try it.

\(7+5(4-q)=12\)

Try it.

\(-9+6(5-k)=12\)

Solution

\(k=\frac{3}{2}\)

Try it.

\(15-(3r+8)=28\)

Try it.

\(18-(9r+7)=-16\)

Solution

r = 3

Try it.

\(11-4(y-8)=43\)

Try it.

\(18-2(y-3)=32\)

Solution

y = −4

Try it.

\(9(p-1)=6(2p-1)\)

Try it.

\(3(4n-1)-2=8n+3\)

Solution

n = 2

Try it.

\(9(2m-3)-8=4m+7\)

Try it.

\(5(x-4)-4x=14\)

Solution

x = 34

Try it.

\(8(x-4)-7x=14\)

Try it.

\(5+6(3s-5)=-3+2(8s-1)\)

Solution

s = 10

Try it.

\(-12+8(x-5)=-4+3(5x-2)\)

Try it.

\(4(x-1)-8=6(3x-2)-7\)

Solution

\(x=\frac{1}{2}\)

Try it.

\(7(2x-5)=8(4x-1)-9\)

Condensed — the full section is in OpenStax Prealgebra 2e.

Practice (40)

Try each one on paper first. Reveal the answer to check; verified ones can be opened in the solver for every step.

  1. Simplify: \(4y-9+9.\)
    If you missed this problem, review .

    Gosi nzaghachi

    \(4y\)

  2. Solve: \(y+12=16.\)
    If you missed this problem, review .

    Gosi nzaghachi

    \(4\)

  3. Solve: \(-3y=63.\)
    If you missed this problem, review .

    Gosi nzaghachi

    \(-21\)

  4. Solve: \(4x+6=-14.\)

    Gosi nzaghachi

    In this equation, the variable is only on the left side. It makes sense to call the left side the variable side. Therefore, the right side will be the constant side. We’ll write the labels above the equation to help us remember what goes where.

    Since the left side is the variable side, the 6 is out of place.
    We must "undo" adding 6 by subtracting 6,
    and to keep the equality we must subtract 6 from both sides.
    Use the Subtraction Property of Equality.
    Simplify.
    Now all the \(x\)s are on the left and the constant on the right.
    Use the Division Property of Equality.
    Simplify.
    Check:
    Let \(x=-5\).
  5. Solve: \(3x+4=-8.\)

    Gosi nzaghachi

    x = −4

  6. Solve: \(5a+3=-37.\)

    Gosi nzaghachi

    a = −8

  7. Solve: \(2y-7=15.\)

    Gosi nzaghachi

    Notice that the variable is only on the left side of the equation, so this will be the variable side and the right side will be the constant side. Since the left side is the variable side, the \(7\) is out of place. It is subtracted from the \(2y,\) so to ‘undo’ subtraction, add \(7\) to both sides.

    Add 7 to both sides.
    Simplify.
    The variables are now on one side and the constants on the other.
    Divide both sides by 2.
    Simplify.
    Check:
    Substitute: \(y=11\).
  8. Solve: \(5y-9=16.\)

    Gosi nzaghachi

    y = 5

  9. Solve: \(3m-8=19.\)

    Gosi nzaghachi

    m = 9

  10. Solve: \(5x=4x+7.\)

    Gosi nzaghachi

    Here the variable, \(x,\) is on both sides, but the constants appear only on the right side, so let’s make the right side the “constant” side. Then the left side will be the “variable” side.

    We don't want any variables on the right, so subtract the \(4x\).
    Simplify.
    We have all the variables on one side and the constants on the other. We have solved the equation.
    Check:
    Substitute 7 for \(x\).
  11. Solve: \(6n=5n+10.\)

    Gosi nzaghachi

    n = 10

  12. Solve: \(-6c=-7c+1.\)

    Gosi nzaghachi

    c = 1

  13. Solve: \(5y-8=7y.\)

    Gosi nzaghachi

    The only constant, \(-8,\) is on the left side of the equation and variable, \(y,\) is on both sides. Let’s leave the constant on the left and collect the variables to the right.

    Subtract \(5y\) from both sides.
    Simplify.
    We have the variables on the right and the constants on the left. Divide both sides by 2.
    Simplify.
    Rewrite with the variable on the left.
    Check: Let \(y=-4\).
  14. Solve: \(3p-14=5p.\)

    Gosi nzaghachi

    p = −7

  15. Solve: \(8m+9=5m.\)

    Gosi nzaghachi

    m = −3

  16. Solve: \(7x=-x+24.\)

    Gosi nzaghachi

    The only constant, \(24,\) is on the right, so let the left side be the variable side.

    Remove the \(-x\) from the right side by adding \(x\) to both sides.
    Simplify.
    All the variables are on the left and the constants are on the right. Divide both sides by 8.
    Simplify.
    Check: Substitute \(x=3\).
  17. Solve: \(12j=-4j+32.\)

    Gosi nzaghachi

    j = 2

  18. Solve: \(8h=-4h+12.\)

    Gosi nzaghachi

    h = 1

  19. Solve: \(7x+5=6x+2.\)

    Gosi nzaghachi

    Start by choosing which side will be the variable side and which side will be the constant side. The variable terms are \(7x\) and \(6x.\) Since \(7\) is greater than \(6,\) make the left side the variable side and so the right side will be the constant side.

    Collect the variable terms to the left side by subtracting \(6x\) from both sides.
    Simplify.
    Now, collect the constants to the right side by subtracting 5 from both sides.
    Simplify.
    The solution is \(x=-3\).
    Check: Let \(x=-3\).
  20. Solve: \(12x+8=6x+2.\)

    Gosi nzaghachi

    x = −1

  21. Solve: \(9y+4=7y+12.\)

    Gosi nzaghachi

    y = 4

  22. Solve: \(6n-2=-3n+7.\)

    Gosi nzaghachi

    We have \(6n\) on the left and \(-3n\) on the right. Since \(6>-3,\) make the left side the “variable” side.

    We don't want variables on the right side—add \(3n\) to both sides to leave only constants on the right.
    Combine like terms.
    We don't want any constants on the left side, so add 2 to both sides.
    Simplify.
    The variable term is on the left and the constant term is on the right.
    To get the coefficient of \(n\) to be one, divide both sides by 9.
    Simplify.
    Check: Substitute 1 for \(n\).
  23. Solve: \(8q-5=-4q+7.\)

    Gosi nzaghachi

    q = 1

  24. Solve: \(7n-3=n+3.\)

    Gosi nzaghachi

    n = 1

  25. Solve: \(2a-7=5a+8.\)

    Gosi nzaghachi

    This equation has \(2a\) on the left and \(5a\) on the right. Since \(5>2,\) make the right side the variable side and the left side the constant side.

    Subtract \(2a\) from both sides to remove the variable term from the left.
    Combine like terms.
    Subtract 8 from both sides to remove the constant from the right.
    Simplify.
    Divide both sides by 3 to make 1 the coefficient of \(a\).
    Simplify.
    Check: Let \(a=-5\).

    Note that we could have made the left side the variable side instead of the right side, but it would have led to a negative coefficient on the variable term. While we could work with the negative, there is less chance of error when working with positives. The strategy outlined above helps avoid the negatives!

  26. Solve: \(2a-2=6a+18.\)

    Gosi nzaghachi

    a = −5

  27. Solve: \(4k-1=7k+17.\)

    Gosi nzaghachi

    k = −6

  28. Solve: \(\frac{3}{2}\ x+5=\frac{1}{2}\ x-3.\)

    Gosi nzaghachi

    Since \(\frac{3}{2}>\frac{1}{2},\) make the left side the variable side and the right side the constant side.

    Subtract \(\frac{1}{2}x\) from both sides.
    Combine like terms.
    Subtract 5 from both sides.
    Simplify.
    Check: Let \(x=-8\).
  29. Solve: \(\frac{7}{8}\ x-12=-\frac{1}{8}\ x-2.\)

    Gosi nzaghachi

    x = 10

  30. Solve: \(\frac{7}{6}\ y+11=\frac{1}{6}\ y+8.\)

    Gosi nzaghachi

    y = −3

  31. Solve: \(3.4x+4=1.6x-5.\)

    Gosi nzaghachi

    Since \(3.4>1.6,\) make the left side the variable side and the right side the constant side.

    Subtract \(1.6x\) from both sides.
    Combine like terms.
    Subtract 4 from both sides.
    Simplify.
    Use the Division Property of Equality.
    Simplify.
    Check: Let \(x=-5\).
  32. Solve: \(2.8x+12=-1.4x-9.\)

    Gosi nzaghachi

    x = −5

  33. Solve: \(3.6y+8=1.2y-4.\)

    Gosi nzaghachi

    y = −5

  34. Solve: \(3(x+2)=18.\)

    Gosi nzaghachi
    Simplify each side of the equation as much as possible.
    Use the Distributive Property.
    Collect all variable terms on one side of the equation—all \(x\)s are already on the left side.
    Collect constant terms on the other side of the equation.
    Subtract 6 from each side
    Simplify.
    Make the coefficient of the variable term equal to 1. Divide each side by 3.
    Simplify.
    Check: Let \(x=4\).
  35. Solve: \(5(x+3)=35.\)

    Gosi nzaghachi

    x = 4

  36. Solve: \(6(y-4)=-18.\)

    Gosi nzaghachi

    y = 1

  37. Solve: \(-(x+5)=7.\)

    Gosi nzaghachi
    Simplify each side of the equation as much as possible by distributing.
    The only \(x\) term is on the left side, so all variable terms are on the left side of the equation.
    Add 5 to both sides to get all constant terms on the right side of the equation.
    Simplify.
    Make the coefficient of the variable term equal to 1 by multiplying both sides by -1.
    Simplify.
    Check: Let \(x=-12\).




  38. Solve: \(-(y+8)=-2.\)

    Gosi nzaghachi

    y = −6

  39. Solve: \(-(z+4)=-12.\)

    Gosi nzaghachi

    z = 8

  40. Solve: \(4(x-2)+5=-3.\)

    Gosi nzaghachi
    Simplify each side of the equation as much as possible.
    Distribute.
    Combine like terms
    The only \(x\) is on the left side, so all variable terms are on one side of the equation.
    Add 3 to both sides to get all constant terms on the other side of the equation.
    Simplify.
    Make the coefficient of the variable term equal to 1 by dividing both sides by 4.
    Simplify.
    Check: Let \(x=0\).

Symbols used here

\pm
plus or minus
Both signs at once: x = 3 ± 2 means 5 and 1.
\neq
not equal
The two sides are different.
\leq,\ \geq
less/greater than or equal
Inequalities that allow equality; < and > exclude it.
\approx
approximately equal
Equal to the precision shown, not exactly.
\sqrt{x},\ \sqrt[n]{x}
square root, n-th root
The non-negative number whose square (n-th power) is x.
a \bmod n
remainder
What is left after dividing a by n.
\%
per cent
Per hundred: 15% = 15/100.
a : b,\ \frac{a}{b}
ratio, fraction
a for every b; a divided by b.

How to: Solve Equations with Variables and Constants on Both Sides

  1. Solve an equation with constants on both sides
  2. Solve an equation with variables on both sides
  3. Solve an equation with variables and constants on both sides
  4. Solve equations using a general strategy
  5. Choose one side to be the variable side and then the other will be the constant side.
  6. Collect the variable terms to the variable side, using the Addition or Subtraction Property of Equality.
  7. Collect the constants to the other side, using the Addition or Subtraction Property of Equality.
  8. Make the coefficient of the variable

Questions people ask

Why does the order of operations matter?

Because 2 + 3 × 4 would otherwise be two different numbers. The convention (brackets, exponents, multiplication and division, addition and subtraction) exists so every reader gets the same value from the same expression.

How do I check an arithmetic answer?

Estimate first (round every number and compute roughly), then compare. If the estimate and the exact answer disagree by more than a little, one of them is wrong. The solver shows every operation, so you can find which line went astray.

Why are fractions harder than decimals?

They are not harder, they are more exact: 1/3 is a precise number, 0.333 is an approximation. Fractions need a common denominator to add, which is the one extra step people trip on.

Jiri gị onwe gị

Parts of this page are adapted from OpenStax Prealgebra 2e (CC BY-NC-SA 4.0). Condensed and re-explained here; errors are ours.

Oge Arithmetic