🪸 infra.garden 🪸

Quick Math

Here are some tricks I use to calculate things quickly, either in my head or on paper.

Squaring

Since single-digit multiplication is relatively easy for most people, we can build on that instead of using the traditional method of multiplication on paper and having to juggle a bunch of numbers in our head.

By separating the number into a sum of two smaller numbers (one for the tens place, x, and another for the ones place, y), we can then use this equation to know how to calculate the result:

( 10 x + y ) 2 = 100 x 2 + 20 x y + y 2

Broken down into simple instructions, what we do is:

  1. Square the digit in the tens place.
  2. Put two zeros at the end of the result.
  3. Remember that.
  4. Multiply the tens and ones place.
  5. Double it.
  6. Put a zero at the end of the result.
  7. Add it to the last number you remembered.
  8. Remember that.
  9. Square the digit in the ones place.
  10. Add it to the last number you remembered.

Example

As an example, say I want to square 29. In the traditional way, first I imagine the number on top of itself and try to multiply 29 by 9. Once I get the result (261) and memorize it, I move on to multiplying 29 by 20, and getting 580. After remembering that too, I then finally add those numbers together to get 841.

Now consider doing it the way I mentioned about: I separate 29 in my head into (20 + 9)2. When expanding, this becomes (20 + 9)(20 + 9) and we FOIL; 20 × 20 is 400, 20 × 9 is 180, doubling it gets us 360, add it to 400 and get 760, then finally 9 × 9 is 81 and add it all to get 841.

Neighboring Square

If you ~for some reason~ need to calculate a neighboring square, here are the equations for reusing your answer and save you some time.

For the neighbor above,

( x + 1 ) 2 = x 2 + 2 x + 1

  1. Get the square you had before.
  2. Add the number you were originally given.
  3. Do it again.
  4. Add 1.

For the neighbor below,

( x - 1 ) 2 = x 2 - 2 x + 1

  1. Get the square you had before.
  2. Subtract the number you were originally given.
  3. Do it again.
  4. Add 1.

Rectangling

We can generalize the trick in the previous section to also make it easier to multiply any two double-digit numbers.

Until I can get around to completing this, it’s left as an exercise to the reader.

Square rooting

This one I definitely should’ve figured out way back when I was taking my physics exams without a graphing calculator. Intentionally.

You can certainly get 2 significant digits in your head with this, although 3 or more may require paper.

The algorithm goes something like this:

  1. If the given number has an odd number of digits, put a zero at the beginning of it.
  2. Divide the number of digits by 2. That’s how many digits your answer will have.
  3. Set the most significant digit of your answer to 1 and the rest to 0.
    • We’ll call this the lower square.
  4. Increment the most significant digit and get its square.
    • We’ll call this the higher square.
  5. If the given number falls within the lower and higher squares, continue. Otherwise, go to step 4.
  6. Get the difference between the higher and lower squares.
  7. Divide it by 10.
  8. Get the difference between the given number and the lower square.
  9. Estimate how many times the result in (6) can go in the result in (7).
    • If you’re split on which digit to use, go with the lower one.
  10. This is the next digit in your answer.
  11. Check your answer.
  12. For each consecutive digit (and virtual bonus points you can spend in your mind palace), go to step 6.