ExplorationsA digit trick whose missing zero explains its exception

Why the Sum Becomes 1089

Exhaustively checkedplace valuedigit reversalinvariantscurious

Write three digits, such as 532, reverse them to get 235 and subtract the smaller arrangement from the larger. Keep the difference in three places, reverse it and add the two: 297 + 792 = 1089. This always gives 1089 when the original outside digits differ, including cases that need a leading zero.

Current view: Digit working

Follow the digits through four operations, with the current calculation written below.

Three decimal positionsStage 0 of 4

Starting digits

532

532

The three positions hold 5, 3, 2. The first and last digits differ by 3.

Complete arithmetic transcript
All four operations are available here, including while playback is paused.
StageWorking
Starting digits532
Reverse the start532 → 235
Subtract532 − 235 = 297
Reverse the difference297 → 792
Add297 + 792 = 1089
digit tile
one position in the number currently being written
three places
leading zeroes remain available to the next reversal

Each tile holds one decimal digit. Reversal changes its position, subtraction produces a new three-place value, and addition produces the final sum. The stage buttons let you revisit any operation.

Stage 0 of 4: 532. The three positions hold 5, 3, 2. The first and last digits differ by 3.

Outside-digit gap
3
Padding rule
Three places

Starting value

Use different outside digits for the 1089 guarantee. Starts such as 001 are allowed because the rule keeps three positions.

Step by step

Use Step for one change you can inspect, or Run to watch the changes accumulate.

Speed

Change the assumption

Turning padding off changes the rule. Try 201 to see why the zero in 099 matters.

Cases worth seeing

Try this

Compare 532 with 572 and predict which calculation changes.

1/2

What is going on

Each explanation begins with a worked example and follows the same operation through intuition, formal statements and proofs. Later sections distinguish what is established from questions that remain open, so you can follow the level of detail useful to you.

Worked by handStarting with 532, two reversals connect a subtraction to an addition. Keep the values in three positions until the final sum.
  1. 532reverse the three positions235The outside digits exchange places.
  2. 235532 − 235297The larger arrangement is reduced by the smaller one.
  3. 297reverse the three positions792The difference becomes the next value to reverse.
  4. 792297 + 7921089The calculation ends at this sum.
The laboratory moves the digit tiles through these same positions and writes each operation below them, so you can connect the motion to the arithmetic.
Changing the middle digit changes the two numbers you subtract but not their difference. The cancellation is what makes many starting choices lead to the same calculation.
01

What you are seeing

Follow the positions before looking for a pattern

Write 532 on three separate cards. Swapping the outside cards gives 235. Subtract the smaller number from the larger to obtain 297, reverse that to 792, then add 297 and 792. The sum is 1089. You can pause after each operation and check it without needing a formula.

The rule does not require the middle digit to sit between the other two in size. It requires the outside digits to differ. It also keeps three written positions when the subtraction produces only two digits: 99 must be written as 099 before it is reversed.

02

Why it starts to make sense

The middle position cancels out

Compare 532 and 572. Their reversals are 235 and 275, and both subtractions give 297. Raising the middle digit by four adds forty to each side of the subtraction, leaving the difference unchanged.

The outside digits do matter, but only through their gap. For a gap of three the difference is 99 × 3 = 297. Gaps of one through nine give just nine possible differences. The second view lays these cases out without requiring you to search through every starting number.

03

The key idea

A representation choice is part of the rule

Starting with 201 gives 201 − 102 = 99. If you write 099, reversal gives 990 and the final sum is 1089. If you discard the leading zero, reversal gives 99 and the sum is 198. The numerical value of 099 is still ninety-nine, but the digit string is different from 99.

This is also why 1089 should not be described as an here. We performed a fixed list of operations and then stopped. We did not repeatedly feed the sum through the same transformation or prove that it is a .

04

Formal statement

The assumptions specify exactly which inputs are covered

Let be digits with , allowing because the laboratory stores three positions. Let and . Define , write in three positions, and let be the value of that three-position reversal. Then

When , the procedure instead gives zero. That is a case outside the 's , not a contradiction of its conclusion. All arithmetic here uses .

05

Proof

reduces the calculation to one digit gap

The middle terms cancel, so . Put , where . The identity

shows that the three digits of are , and . Their outside sum is nine. Reversing these digits and adding therefore gives

The expression includes : its hundreds digit is zero, and retaining that digit is precisely the padding condition. This algebra covers every admissible input, independently of the finite check performed by the tests.

06

Limits and further questions

The is complete for this rule, not for every reversal process

The test suite checks all 1000 three-place strings, including their 100 equal-outside-digit exceptions. That is a complete finite check, while the argument above explains why the check must succeed. Neither calculation establishes a result for longer strings or a different base.

You can investigate those variants by rewriting the place-value argument with another base or another number of positions. For a contrast with a genuinely unresolved reversal process, the 196 exploration repeatedly reverses and adds, and does not inherit the proved here.

What is actually established

Every statement on this page, with its status, its exact scope, and the date that status was last checked.

Proved

Every three-place decimal start with unequal outside digits gives 1089 under the padded procedure.

Scope
All strings abc with a, b, c in 0 through 9 and a ≠ c; subtraction is larger minus smaller and its result is kept in three places.
Why
Put d = |a − c|. The difference is 99d, with digits (d − 1), 9, (10 − d). Adding its reversal gives 101 × 9 + 180 = 1089. This includes d = 1, where the first digit is zero.
Status checked
Sources
Magic 1089
Exhaustively checked

All 900 starts with unequal outside digits give 1089, while the 100 remaining starts give zero.

Scope
Every three-place decimal string from 000 through 999, with padding enabled.
Computation (exact)
The test suite evaluates exactly 1000 inputs through four finite operations with exact integer arithmetic. Algorithm reverse1089-v1.
Status checked
Proved

For 201, discarding the leading zero gives 198 instead of 1089.

Scope
The unpadded variant at this start.
Why
201 − 102 = 99, and 99 + 99 = 198. Retaining three places instead gives 099 + 990 = 1089.
Status checked

Sources

Review notes show which bibliographic details Mathomaly has checked and which remain unresolved. Checking a publication record does not independently verify its proof.

  1. Francis E. Su, Magic 1089, Harvey Mudd College, Math Fun Facts. Link

    An author-hosted explanation of the subtraction identity and the eight three-digit differences in the traditional version. This page also treats the padded 099 case and proves that extension directly.

    Bibliographic record checked. This is not an independent verification of the proof.

    Bibliographic review:

    AI-assisted bibliographic audit. Evidence type: source text.

    Author-hosted explanation confirms attribution and traditional three-digit reversal construction.

Connected by how they work, not by sharing a topic label.