◆ Rebuild

Part 15 · Knowledge and Science

Algebra

Using letters for unknown numbers so you can solve problems step by step — equations, formulas you can rearrange, graphs of your measurements, quadratic equations, and logarithms, including how to compute your own table of logarithms by hand.

Difficulty
●●●●●
Time
A month of evenings to become comfortable; making a full log table takes one person several weeks
Steps from zero
2 prerequisites →

You need first

Arithmetic and Fractions

This unlocks

Calculating AidsCalculusStrength of Materials

Objects made here

log table
The full path from nothing — 2 steps before this one
  1. Writing and Numbers
  2. Arithmetic and Fractions
  3. Algebra

Do them roughly in this order. See it on the tech tree →

Why it matters

Arithmetic answers "what is 37 × 12?" Algebra answers the reverse kind of question: "what number, multiplied by 12 and added to 5, gives 449?" — and, more importantly, it lets you write a rule once and use it forever. A formula like area = π × r × r is a machine: put in a radius, get an area. Algebra lets you run the machine backwards (what radius gives this area?), combine machines, and discover the rule hidden in a table of measurements.

You will use it to size beams and Springs, design Gears, mix alloys like Bronze, dilute alcohol and acids, set the length of a clock pendulum, and understand every formula in Forces, Energy and Heat and Atoms, Elements and Reactions. Logarithms, at the end of this chapter, turn hard multiplication into easy addition — the foundation of the slide rule and printed tables in Calculating Aids.

This chapter assumes the arithmetic of Arithmetic and Fractions, including fractions, decimals and negative numbers.

How it works

A letter stands for a number you don't know yet — usually x. Writing 3x means 3 × x. Writing x² means x × x.

An equation is a balance. The = sign says both sides weigh the same. You may do anything you like to one side — add, subtract, multiply, divide — as long as you do exactly the same to the other side. The balance stays level. Keep doing this until x stands alone.

xxx1. Start3x + 5 = 203 bags + 5 stones balance 20 stonesxxx2. Same to both sides3x = 15take 5 stones off each sidex3. Same againx = 5share each side into 3
Fig. 1 An equation is a balance. Three bags of unknown weight x plus 5 stones balance 20 stones. Take 5 stones off each side; then share both sides into three. Each bag weighs 5 stones.

What you need

A slate or wax tablet for working; Paper for keeping results; a ruler and squared lines for graphs (rule a grid with your straightedge, or weave a grid of threads over a frame); and the table of multiplication, squares and square roots from Arithmetic and Fractions.

Solving equations

Worked example 1. 3x + 5 = 20. Take 5 from both sides: 3x = 15. Divide both sides by 3: x = 5. Check by putting it back: 3 × 5 + 5 = 20. Correct.

Worked example 2 — a rope. A rope 20 m long is cut into two pieces, one 4 m longer than the other. Call the short piece x. The long piece is x + 4. Together: x + x + 4 = 20, so 2x + 4 = 20, 2x = 16, x = 8. 8 m and 12 m.

Worked example 3 — alloying. You have 4 kg of bronze with 8% tin and want 10% tin (see Bronze). How much tin to add? Call it t kg. Tin now: 0.08 × 4 = 0.32 kg. After adding: (0.32 + t) must be 10% of the new total (4 + t):

0.32 + t = 0.10 × (4 + t) = 0.4 + 0.1t

Take 0.1t from both sides: 0.32 + 0.9t = 0.4. Take 0.32: 0.9t = 0.08. Divide: t = 0.089 kg — about 89 g of tin.

Worked example 4 — diluting. You have spirit at 90% alcohol (see Distillation) and want 2 litres at 70% for cleaning wounds and instruments (see Sterilising Instruments and Dressings). Call the spirit needed x. The alcohol in it must equal the alcohol in the result: 0.9x = 0.7 × 2 = 1.4, so x = 1.56 litres of spirit, topped up with clean water to 2 litres. The same reasoning dilutes acids, lye and brine.

Tip Moving a term across. "Subtract 5 from both sides" has the same effect as moving +5 to the other side and changing it to −5. Likewise "× 3" on one side becomes "÷ 3" on the other. Once you understand why (the balance), use the shortcut.

Brackets. A number outside a bracket multiplies everything inside: 3(x + 2) = 3x + 6. Two brackets multiply every part by every part: (x + 3)(x + 5) = x² + 5x + 3x + 15 = x² + 8x + 15 — the same area picture as long multiplication in Arithmetic and Fractions.

Negative signs. Minus times minus is plus: −(x − 4) = −x + 4.

Rearranging formulas

A formula is an equation with several letters. You can solve it for any one of them.

Area of a circle: A = πr². What radius gives a circular threshing floor of 50 m²? Divide by π: r² = A ÷ π. Square-root: r = √(A ÷ π) = √(50 ÷ 3.1416) = √15.92 = 3.99 m.

The pendulum. The time for one swing of a pendulum (one way) is T = π × √(L ÷ g), where L is the length in metres and g = 9.81 (the strength of gravity). To find the length for a swing of exactly one second, solve for L: divide by π, square both sides, multiply by g: L = g × T² ÷ π² = 9.81 × 1 ÷ 9.87 = 0.994 m — the seconds pendulum of Measurement from Scratch.

Two unknowns

When there are two unknowns you need two facts.

At a market, 3 sacks of wheat and 2 of barley cost 34 coins; 1 of wheat and 4 of barley cost 28 coins. What does each cost? Let w and b be the prices.

  1. 3w + 2b = 34
  2. w + 4b = 28

From (2): w = 28 − 4b. Put that into (1): 3(28 − 4b) + 2b = 34 → 84 − 12b + 2b = 34 → 10b = 50 → b = 5. Then w = 28 − 20 = 8. Check in (1): 24 + 10 = 34. Correct.

Graphs

A graph turns a table of numbers into a picture, and shows the rule hidden in it. Draw two lines square to each other. The horizontal one (the x-axis) is for the thing you control; the vertical one (the y-axis) is for what you measure. Mark even scales on both. Each measurement is a dot.

12345246810120load (kg)stretch (cm)Spring: a straight linesack stretches it 7 cm3.5 kgslope 2 cm per kg0.511.522.5310203040500time to splash (s)depth (m)Falling stone: a curve4.9 m19.6 m44.1 mdepth = 4.9 × t²
Fig. 2 Left: calibrating a spring. The stretch measured for each load falls on a straight line; an unknown sack that stretches the spring 7 cm weighs 3.5 kg. Right: a stone dropped down a well falls 4.9 × t² metres in t seconds — a curve, not a line.

Worked example — a spring scale. Hang a coiled spring and add known weights (from Measurement from Scratch):

Load (kg) 0 1 2 3 4 5
Stretch (cm) 0 1.9 4.1 6.0 7.9 10.1

The dots lie almost on a straight line through zero. Lay a straightedge through them so that roughly as many dots fall above as below. The line rises 2.0 cm for every 1 kg: its slope is 2.0 cm per kg. So the rule is stretch = 2.0 × load, or load = stretch ÷ 2.0. A sack that stretches it 7.0 cm weighs 3.5 kg. You have made a spring balance.

Any straight-line rule can be written y = m × x + c: m is the slope (how much y rises for each step of x), and c is where the line crosses the y-axis.

Reading between points (interpolation) is safe. Reading beyond them (extrapolation) is risky: overload the spring and it bends permanently, and the rule fails. Never trust a graph far outside the range you measured.

Curves. Not every rule is a line. A stone dropped down a well falls 4.9 × t² metres in t seconds (ignoring air). Count the seconds until you hear the splash: 2 seconds means about 4.9 × 4 = 19.6 m; 3 seconds, about 44 m (the sound takes a moment to come back up — about 0.13 s from 44 m — so the true depth is a little less).

Quadratic equations

An equation with x² in it is called quadratic. It usually has two answers.

By spotting factors. You have 40 m of fence to make three sides of a pen against a wall, enclosing 150 m². How deep is the pen? Let the depth be x; the side along the wall is then 40 − 2x. Area: x(40 − 2x) = 150 → 40x − 2x² = 150 → divide by 2 and rearrange: x² − 20x + 75 = 0. Look for two numbers that multiply to 75 and add to 20: 5 and 15. So (x − 5)(x − 15) = 0, which is true when x = 5 or x = 15. Both work: 5 m deep and 30 m long, or 15 m deep and 10 m long.

By the formula, which always works. For a × x² + b × x + c = 0:

x = (−b ± √(b² − 4ac)) ÷ 2a

(The ± means: work it once with + and once with −.)

A field must be 10 m longer than it is wide, with an area of 1,000 m². How wide? Width w: w(w + 10) = 1,000 → w² + 10w − 1,000 = 0. Here a = 1, b = 10, c = −1,000. √(100 + 4,000) = √4,100 = 64.03. w = (−10 + 64.03) ÷ 2 = 27.02 m (the minus answer gives a negative width — throw it away). Check: 27.02 × 37.02 = 1,000.3. Correct.

If b² − 4ac is negative, there is no answer: the thing you asked for is impossible (for example, no pen made from 40 m of fence can enclose 250 m²).

Powers and big numbers

x³ means x × x × x. Rules: multiplying powers of the same number adds the small raised numbers (the exponents): 10² × 10³ = 10⁵. Dividing subtracts them: 10⁵ ÷ 10² = 10³. And 10⁰ = 1, 10⁻¹ = 0.1, 10⁻² = 0.01.

Scientific notation writes huge and tiny numbers compactly: the speed of light, 300,000,000 m/s, is 3 × 10⁸; a bacterium 0.000002 m long is 2 × 10⁻⁶ m.

Growth. Something that grows by the same percentage each year grows faster and faster. A herd growing 5% a year multiplies by 1.05 each year: after n years, by 1.05ⁿ. Rule of 72: it doubles in about 72 ÷ 5 = 14 years. Grain that yields 20 seeds for each one sown can multiply a single handful into a field in three seasons (see Saving Seed and Breeding Plants).

Logarithms

The logarithm (log) of a number is the power you raise 10 to, to get it. log 100 = 2 because 10² = 100. log 1,000 = 3. log 2 = 0.30103, because 10^0.30103 = 2.

Their magic follows from the power rules: multiplying numbers adds their logs, and dividing subtracts them. With a table of logs, every multiplication becomes an addition, every division a subtraction, every square root a halving. For astronomers, navigators and engineers before machines, this was the greatest labour-saving invention in history.

Using a log table

Every number is written as a number between 1 and 10 times a power of 10. The table gives logs for 1 to 10 (between 0 and 1); the power of 10 just adds a whole number.

Worked example: 37.4 × 2.86.

  1. log 37.4 = 1 + log 3.74 = 1 + 0.5729 = 1.5729 (37.4 is between 10 and 100, so the whole part is 1).
  2. log 2.86 = 0.4564.
  3. Add: 2.0293.
  4. Find which number has log 0.0293 in the table: 1.0698. The whole part, 2, means × 100: 107.0. (Exact answer 106.964 — a four-figure table gives about four good figures.)

Cube root of 200: log 200 = 2.3010; divide by 3: 0.7670; the number with log 0.7670 is 5.848.

Making a log table by hand

You need the logs of the prime numbers (2, 3, 5, 7, 11, 13…); all others come from adding them (log 6 = log 2 + log 3; log 8 = 3 × log 2). Here is one recipe that climbs from each whole number to the next:

log(n + 1) = log n + 0.8685890 × (y + y³/3 + y⁵/5 + y⁷/7 + …), where y = 1 ÷ (2n + 1).

(The number 0.8685890 is a fixed constant — it is 2 divided by 2.302585, the "natural" logarithm of 10. Use it as given.) The terms in the bracket shrink very fast; stop when they no longer change the seventh decimal.

  • log 2 (from n = 1): y = 1/3. Bracket = 0.3333333 + 0.0123457 + 0.0008230 + 0.0000653 + 0.0000056 + 0.0000005 = 0.3465734. × 0.8685890 = 0.30103.
  • log 3 (from n = 2): y = 1/5. Bracket = 0.2 + 0.0026667 + 0.0000640 + 0.0000018 = 0.2027325. × 0.868589 = 0.17609. Add log 2: 0.47712.
  • log 5 (from n = 4, where log 4 = 2 × log 2 = 0.60206): y = 1/9. Bracket = 0.1115718; × 0.868589 = 0.09691. log 5 = 0.69897. Check: log 2 + log 5 must equal log 10 = 1. 0.30103 + 0.69897 = 1.00000. Correct.
  • log 7 (from n = 6, log 6 = 0.77815): y = 1/13; bracket = 0.0770753; × 0.868589 = 0.06695. log 7 = 0.84510.

As n grows, y becomes tiny and one or two terms are enough, so the work speeds up. Fill in every number from 1.00 to 9.99 (900 entries) by stepping and adding, checking against values you can get two ways (log 8 by stepping from 7 must equal 3 × log 2). Divide the work among several people, have each entry checked by a second person, and print it (see Printing and Calculating Aids).

Interpolation. For a value between two table entries, take the same fraction of the difference. log 3.745: log 3.74 = 0.57287, log 3.75 = 0.57403; halfway is 0.57345.

How to tell it worked

  • Put the answer back into the original equation. Both sides must match.
  • Check the units. If you are finding a length, the answer must come out in metres, not square metres. Write the units through every step of a formula.
  • Does it make sense? A negative length, a mixture stronger than either ingredient, a pen bigger than the fence can enclose: something is wrong.
  • Graph it. If an answer should lie on a curve you have measured, see if it does.
  • For log tables: log 2 + log 5 = 1 exactly; log 9 = 2 × log 3; every entry rises smoothly, with the differences between neighbours shrinking steadily. A sudden jump in the differences marks an error.

Note Troubleshooting. The equation gets messier instead of simpler → you did something to only one side, or only to part of a side. Multiply every term by the same number. Sign errors → write each step on a new line; never do two moves at once. Quadratic gives a strange answer → check b² − 4ac with the signs of b and c as they really are (a "− 1,000" means c = −1,000). Graph points scattered, not on a line → the relationship may be a curve; or your measurements are rough. Repeat them. Log answer off by a factor of 10 → the whole-number part (the power of 10) is wrong. Estimate first.

Dangers

Warning Mixed-up units have caused disasters. In 1983 a Canadian airliner ran out of fuel in flight because the fuel was calculated in pounds where kilograms were needed. In 1999 a NASA spacecraft was lost at Mars because one team's software used pound-force where the other expected newtons. Write the unit beside every number, every time.

  • Formulas have limits. A formula fitted to your measurements is only known to hold over the range you measured. Beams, springs, ropes and boilers fail suddenly when pushed beyond it. Test before you trust, and build in a safety margin.

Going further

With algebra you can follow Forces, Energy and Heat and Atoms, Elements and Reactions, work with Geometry and Trigonometry as formulas, and step into Calculus, which deals with things that change continuously. Logarithms lead straight to the slide rule (Calculating Aids). The true/false algebra of George Boole underlies Logic and Binary and computers.

How it was first done

Babylonian scribes solved what we call quadratic equations around 1800 BC, as word problems about fields and lengths. The Greek Diophantus (about AD 250) used symbols for unknowns. In AD 628 the Indian mathematician Brahmagupta gave a general solution of the quadratic, with negative numbers and zero. Around AD 820 Muhammad al-Khwarizmi in Baghdad wrote The Compendious Book on Calculation by Completion and Balancing; its word al-jabr ("restoring" — moving a term across) gave us "algebra," and his name gave us "algorithm." Letters for unknowns and for given quantities became standard with François Viète in France (1591), and René Descartes joined algebra to geometry with graphs in 1637. John Napier in Scotland published logarithms in 1614; Henry Briggs turned them into base-10 logs and in 1624 published tables of the logarithms of 1–20,000 and 90,000–100,000 to 14 decimal places, computed by hand.

Source: content/entries/knowledge/algebra.md