Pre-Calculus for Programmers

Algebra foundations: the toolkit calculus never reteaches

4 / 397
Contents

Contents

Pre-Calculus for Programmers

0 of 397 complete

10 min read

Exponents, including the strange ones

Walk the powers of 2 downwards past zero and the meaning of $2^{0}$ and $2^{-3}$ is forced on you.

Writing 2×2×2×22 \times 2 \times 2 \times 2 as 242^{4} is only shorthand, and if that were all exponents were, they would need no lesson. The interesting question is what the shorthand ought to mean when the little number is zero, or negative, and there is nothing left to multiply.

Rather than being told, watch the pattern walk down past the point where the shorthand runs out.

Powers of 2, counting downPython

Change the base from 2.0 to 10.0 and run it again. Then try 3.0. The value of the power at k=0k = 0 is the same in all three cases. What is it?

Reading upwards, every step multiplies by 2: 8, 16, 32, 64. So reading downwards, every step must divide by 2: 64, 32, 16, 8, 4, 2, and then 1. That 1 is 202^{0}, and it did not come from a rule somebody invented. It is where the halving lands.

Keep halving. After 1 comes 12\frac{1}{2}, which the output calls 0.5, and that is 2−12^{-1}. Then 14\frac{1}{4}, which is 2−22^{-2}. A negative exponent is not a negative number and it never produces one; it is a division.

The definitions the pattern forces

For any real number aa that is not zero, and any positive whole number nn:

a0=1a−n=1an1a−n=ana^{0} = 1 \qquad\qquad a^{-n} = \frac{1}{a^{n}} \qquad\qquad \frac{1}{a^{-n}} = a^{n}
A negative exponent moves the power across the fraction line and changes its sign.

Zero is excluded because 000^{0} has no single sensible value and 0−10^{-1} would be a division by zero. Every other real base is fine.

The five laws

All five come from the same observation: an exponent counts how many copies of the base are being multiplied, and multiplying two piles of copies together makes one bigger pile.

LawWhyCheck
am⋅an=am+na^{m} \cdot a^{n} = a^{m+n}mm copies next to nn copies is m+nm+n copies23⋅22=8⋅4=32=252^{3} \cdot 2^{2} = 8 \cdot 4 = 32 = 2^{5}
aman=am−n\dfrac{a^{m}}{a^{n}} = a^{m-n}dividing cancels nn of the copies2522=324=8=23\dfrac{2^{5}}{2^{2}} = \dfrac{32}{4} = 8 = 2^{3}
(am)n=amn(a^{m})^{n} = a^{mn}nn copies of a pile of mm copies(23)2=82=64=26(2^{3})^{2} = 8^{2} = 64 = 2^{6}
(ab)n=anbn(ab)^{n} = a^{n}b^{n}the copies can be sorted into aas and bbs(2⋅3)2=36=4⋅9(2 \cdot 3)^{2} = 36 = 4 \cdot 9
(ab)n=anbn\left(\dfrac{a}{b}\right)^{n} = \dfrac{a^{n}}{b^{n}}same sorting, for a quotient(23)2=49\left(\dfrac{2}{3}\right)^{2} = \dfrac{4}{9}
The laws of exponents, with a small numeric check of each.

The laws hold for negative exponents too, which is the real reason the definitions above were chosen. Test a few at once and watch the two columns agree.

Do the laws survive negative exponents?Python

Change a = 3.0 to a = 0.5 and run it again, then to a = -2.0. The columns still agree. Now try a = 0.0 and see which lines break.

What a negative exponent does to the picture
y=x2y = x^{2}
024680.251.192.133.064
Value at x=ax = a
4
And 1/an1/a^{n}
0.25

Set n to 2 and then to −2-2, and compare the two output lines each time. A negative exponent swaps the two of them over.

Two traps worth meeting on purpose

The first is about what a minus sign in front is attached to. An exponent binds more tightly than a minus sign, so −32-3^{2} means "take 323^{2}, then negate it", which is −9-9. Only (−3)2(-3)^{2} squares the negative number, giving 99.

Where the minus sign goesPython

The first pair disagree and the second pair agree. In the last two lines change the exponent from 3 to 4, so both lines are fourth powers, and run it again. The agreement disappears. Work out which of the two lines changed sign and why.

The second trap is the belief that an exponent spreads across a sum the way it spreads across a product. It does not, and one pair of numbers is enough to prove it.

Does squaring a sum square the pieces?Python

One row does have the two columns agreeing. Which one, and what is special about it? Add the pair (0, 7) and see whether it agrees too.

A worked example, every step

Simplify (2x3y−2)−24x−1y\dfrac{\left(2x^{3}y^{-2}\right)^{-2}}{4x^{-1}y} and leave no negative exponents in the answer.

  1. Deal with the bracket first. The outer −2-2 hits every factor inside: 2−22^{-2}, then (x3)−2\left(x^{3}\right)^{-2}, then (y−2)−2\left(y^{-2}\right)^{-2}.
  2. 2−2=142^{-2} = \frac{1}{4}. For the letters, multiply the exponents: x3⋅(−2)=x−6x^{3 \cdot (-2)} = x^{-6} and y(−2)⋅(−2)=y4y^{(-2)\cdot(-2)} = y^{4}.
  3. So the numerator is 14x−6y4\frac{1}{4}x^{-6}y^{4}.
  4. Now divide by 4x−1y4x^{-1}y. The plain numbers give 14÷4=116\frac{1}{4} \div 4 = \frac{1}{16}.
  5. Dividing subtracts exponents: x−6−(−1)=x−6+1=x−5x^{-6-(-1)} = x^{-6+1} = x^{-5}, and y4−1=y3y^{4-1} = y^{3}.
  6. That leaves 116x−5y3\frac{1}{16}x^{-5}y^{3}.
  7. Finally clear the negative exponent by moving x−5x^{-5} to the bottom as x5x^{5}: the answer is y316x5\dfrac{y^{3}}{16x^{5}}.

Scientific notation

A number is in scientific notation when it is written as one digit, then a decimal point, then the rest, all multiplied by a power of ten. Formally it is a×10na \times 10^{n} where nn is an integer and 1≤∣a∣<101 \le |a| < 10. The mass of the Earth is 5.97×10245.97 \times 10^{24} kilograms and the mass of an electron is 9.11×10−319.11 \times 10^{-31} kilograms.

The exponent says how far to move the decimal point: positive moves right and makes the number big, negative moves left and makes it small. Most languages write it with an e, so 5.97e24 is the same thing typed on a keyboard.

Very large over very smallPython

Change 9.11e-31 to 9.11e-310 and run it again, then to 9.11e-320. The printed value starts losing digits: there is a smallest size the machine can represent, which is exactly why the algebra is done on the exponents rather than on the digits.

Multiplying two such numbers is one law of exponents and one ordinary multiplication. Take (3.2×105)(4×10−9)(3.2 \times 10^{5})(4 \times 10^{-9}). Multiply the fronts: 3.2×4=12.83.2 \times 4 = 12.8. Add the exponents: 5+(−9)=−45 + (-9) = -4. That gives 12.8×10−412.8 \times 10^{-4}, which is not yet in scientific notation because 12.8 is bigger than 10. Move the point one place left and add one to the exponent: 1.28×10−31.28 \times 10^{-3}.

Dividing works the same way with the other two laws: divide the fronts, and subtract the exponents. Here is one all the way through.

  1. The problem is 6×1081.5×10−3\dfrac{6 \times 10^{8}}{1.5 \times 10^{-3}}. Split it into the fronts and the powers: 61.5×10810−3\dfrac{6}{1.5} \times \dfrac{10^{8}}{10^{-3}}.
  2. Divide the fronts: 6÷1.5=46 \div 1.5 = 4.
  3. Divide the powers by subtracting exponents: 8−(−3)=8+3=118 - (-3) = 8 + 3 = 11, so that part is 101110^{11}. Subtracting a negative adds, which is where this step goes wrong most often.
  4. Put them back together: 4×10114 \times 10^{11}.
  5. Check that it is in scientific notation: the front is 4, and 1≤4<101 \le 4 < 10, so nothing needs moving.
  6. Sanity check the size. The top is a few hundred million, the bottom is about a thousandth, and dividing by a thousandth multiplies by a thousand, so an answer in the hundreds of billions is the right order of magnitude.
Write 0.000460.00046 in scientific notation, and 7.1×1047.1 \times 10^{4} as an ordinary number.

0.00046=4.6×10−40.00046 = 4.6 \times 10^{-4}. The point has to move four places to the right to sit after the 4, and moving right means the exponent is negative. For the second, 7.1×1047.1 \times 10^{4} moves the point four places right, giving 7100071000.

Check yourself

Simplify (x5x2)−1\left(\dfrac{x^{5}}{x^{2}}\right)^{-1}.

All lessons in Pre-Calculus for Programmers