Reversing the Digits

  • Easy
  • Number puzzles
  • Tests: Writing a number in terms of its digits

The puzzle

Take a two-digit number, reverse its digits and subtract the smaller from the larger. For 72 you get 72 - 27 = 45.

Why is the result always a multiple of nine?

Stuck?

One at a time, smallest first. Open only as many as you need — the whole point of the puzzle is the part you work out yourself.

Hint 1

Write the number as 10a + b, where a and b are its digits.

Hint 2

Now write the reverse the same way and subtract.

Show the answer Hide the answer

Because the difference is always 9 times the gap between the two digits: (10a + b) - (10b + a) = 9(a - b).

How to get there

A two-digit number with digits a and b is 10a + b. Its reverse is 10b + a.

Subtracting: 10a + b - 10b - a = 9a - 9b = 9(a - b).

For 72: a = 7, b = 2, so the difference is 9 x 5 = 45. The result depends only on how far apart the digits are, which is why 72, 83 and 94 all give 45.

The technique worth keeping

Write a number in terms of its digits and place values before trying examples. Almost every "why does this trick work" question collapses into one line of algebra once the number is written that way.