SigmaField
Mathematical Foundations for Quant Finance
0 of 256 lessons

Level 0, Orientation and fluency 0.3 Algebra fluency Lesson 2 of 5

ConceptLesson 0.3.2 in Level 0, Orientation and fluency. About 15 minutes.

Rearranging equations

Do the same thing to both sides

An equation says two things are equal. It stays true if you do the same thing to both sides: add the same number, subtract it, multiply by it, or divide by it (as long as it is not zero).

To solve for xx, undo what was done to xx, in reverse order. In 3x+5=203x + 5 = 20, the xx was multiplied by 3 and then had 5 added. So take away 5 first, then divide by 3.

  1. 1
    3x+5=203x + 5 = 20
  2. 2
    3x=153x = 15
  3. 3
    x=5x = 5

Rule: Balancing an equation

a=b⟹a+c=b+ca=b⟹ac=bc\begin{gathered} a = b \quad\Longrightarrow\quad a + c = b + c \\ a = b \quad\Longrightarrow\quad ac = bc \end{gathered}

Whatever you do to one side, do to the other. Undo the operations on the unknown in reverse order. Never divide by something that could be zero.

Try it

Always check an answer by putting it back into the original equation. Both sides should match.

⌘/Ctrl + Enter runs the cell

The unknown on both sides

When xx appears on both sides, first gather every xx term on one side and every plain number on the other. In 5x−3=2x+95x - 3 = 2x + 9, subtract 2x2x from both sides to get 3x−3=93x - 3 = 9. Then add 3 to get 3x=123x = 12, so x=4x = 4.

Clear fractions first

Fractions make every later step harder. Multiply both sides by a number that every denominator divides into, and they disappear. In x3+x4=7\frac{x}{3} + \frac{x}{4} = 7, both 3 and 4 go into 12:

12⋅x3+12⋅x4=12⋅74x+3x=84\begin{aligned} 12 \cdot \frac{x}{3} + 12 \cdot \frac{x}{4} &= 12 \cdot 7 \\ 4x + 3x &= 84 \end{aligned}

So 7x=847x = 84 and x=12x = 12. Multiply every term by 12, including the 7 on the right.

Try it

Check both answers by substitution.

The second line uses Fraction from lesson 0.3.1, so the check is exact rather than a decimal close to 7.

⌘/Ctrl + Enter runs the cell

Making a letter the subject

A formula with several letters can be rearranged to give any one of them on its own. That letter is then the subject. The method is the same as solving for xx; the other letters are treated like numbers.

Take y=mx+cy = mx + c, the equation of a line (lesson 1.2.1). To make xx the subject, subtract cc, then divide by mm:

y−c=mx⟹x=y−cmy - c = mx \quad\Longrightarrow\quad x = \frac{y - c}{m}

Sometimes the letter you want appears in two terms. Gather those terms on one side, then factor the letter out. Here is ax+b=cx+dax + b = cx + d solved for xx:

  1. 1
    ax−cx=d−bax - cx = d - b
  2. 2
    x(a−c)=d−bx(a - c) = d - b
  3. 3
    x=d−ba−cx = \frac{d - b}{a - c}

Rule: Making a letter the subject

clear fractions  →  gather→  factor  →  divide\begin{gathered} \text{clear fractions} \;\to\; \text{gather} \\ \to\; \text{factor} \;\to\; \text{divide} \end{gathered}

Clear fractions. Gather the terms containing the letter on one side. Factor the letter out. Divide by what multiplies it, and note that this must not be zero.

Case study 0.3.5 uses exactly this to turn one interest formula into four.

Let SymPy check your algebra

Try it

SymPy rearranges formulas exactly, which makes it a good answer-checker. sp.symbols creates letters, sp.Eq(left, right) builds an equation, and sp.solve makes the chosen letter the subject.

The first run takes a few seconds while SymPy loads. SymPy may print the terms in a different order, such as (-c + y)/m for y−cm\frac{y - c}{m}.

⌘/Ctrl + Enter runs the cell

Common mistakes

Try it

  1. Divide every term. 2x+62\frac{2x + 6}{2} is x+3x + 3, not x+6x + 6. Both terms on top are divided by 2.
  2. Moving a term changes its sign. From 3x+5=203x + 5 = 20, subtracting 5 gives 3x=153x = 15, not 3x=253x = 25.
  3. Multiply every term when clearing fractions, including terms with no fraction.
  4. Watch for dividing by zero. x=d−ba−cx = \frac{d - b}{a - c} needs a≠ca \neq c.

The cell checks the first mistake with x=4x = 4.

⌘/Ctrl + Enter runs the cell

Solving and rearranging

0 of 8 correct

  1. 1.
  2. 2.
  3. 3.
  4. 4.
  5. 5.
  6. 6.
  7. 7.
  8. 8.
How to type answers
  • Powers with ^: x^7, 2^(1/3), a^-2.
  • Multiply with * or by writing side by side: 3x^2, 2(x+1).
  • ln(x) is the natural log, log(x, 2) is log base 2, e is Euler's number, sqrt(x) is a square root.
  • sin(x), cos(x) and tan(x) take radians; write pi for π and sin(x)^2 for sin²x.
  • Your first answer to each question is saved: it counts towards your score and brings the question back for review.
  • Exact answers like ln(20)/ln(3) are best. Decimals need about 4 significant figures.

Summary card

  • Do the same thing to both sides. Undo the operations on the unknown in reverse order.
  • Gather the unknown on one side; clear fractions by multiplying every term by a common denominator.
  • To make a letter the subject: clear fractions, gather, factor it out, divide. The divisor must not be zero.
  • Check every answer by substitution, or with sp.solve(sp.Eq(left, right), letter).

Free further reading

Optional. This lesson covers what you need; these add more examples and practice. All are free to read.