In short

An identity is true for every value of its variables. So if you expand (a+b)^3 and want to check whether you got it right, plug in a = 1, b = 1 and compute both sides. If LHS \ne RHS, your expansion is wrong — guaranteed. Arithmetic with 1s is trivial, so the check costs you five seconds, and it usually catches both sign mistakes and coefficient mistakes. If it passes, retry with a = 2, b = 1 for an even stronger check.

You have just expanded (a + b)^3 in the margin of your notebook. You wrote down a^3 + 2a^2b + 2ab^2 + b^3. Is it right? You are not sure. The exam clock is ticking. Re-deriving from scratch will take a minute. Looking it up will cost more.

Here is a faster move. Plug in a = 1, b = 1 in both sides.

8 \ne 6. Something is wrong. You re-derive — and find the correct expansion is a^3 + 3a^2 b + 3ab^2 + b^3 (which gives 1 + 3 + 3 + 1 = 8, matching LHS). The middle coefficients should have been 3, not 2. Five seconds of arithmetic saved you from a wrong answer.

This is the sanity check. It is the cheapest, most reliable error-catcher in algebra, and you should run it on every identity expansion you do not fully trust.

Why this works

An identity is an equation that is true for all values of its variables. Why: that is the definition. (a+b)^2 = a^2 + 2ab + b^2 is not true only for a = 3, b = 5 — it is true for every pair of numbers you can imagine, including a = 1, b = 1.

So if you have a candidate expansion and you plug in any specific values of a and b, the two sides must give the same number. Why: a single counter-example is enough to disprove an identity. If LHS and RHS disagree on even one input, the equation cannot be a true identity — it has to be wrong somewhere.

The contrapositive is what you actually use: if your two sides disagree at a = 1, b = 1, the expansion is broken. Go fix it.

The reverse, sadly, is not airtight. If LHS = RHS at a = b = 1, your expansion might still be wrong — you could have an error that happens to vanish at that one point. But this is rare in practice, especially for the standard identities, where most mistakes are sign flips or coefficient slips that show up immediately at a = b = 1. Why: a sign flip on a 2ab term flips +2 to -2, a difference of 4 in the RHS — which a check at a = b = 1 instantly notices.

The workflow

Sanity-check workflow for identity expansionsA flowchart with four boxes connected by arrows. The first box says "Expand the identity". An arrow leads to the second box, "Plug in a equals 1, b equals 1". An arrow leads to the third box, a diamond labelled "LHS equals RHS?". From the diamond, a "Yes" arrow leads to a green box "Accept (or retry with a equals 2, b equals 1)". A "No" arrow leads to a red box "Re-derive — there is a mistake". Expand Plug in a = 1, b = 1 LHS = RHS? yes no Accept ✓ Re-derive ✗
Four steps, one of which is just plugging in $1$s. The whole loop takes longer to read than to do.

Three worked examples

A clean check that passes

You have just expanded (a + b)^2 as a^2 + 2ab + b^2. Quickly verify with a = 1, b = 1.

  • LHS: (1 + 1)^2 = 2^2 = 4.
  • RHS: 1^2 + 2 \cdot 1 \cdot 1 + 1^2 = 1 + 2 + 1 = 4.

4 = 4. The expansion passes the check. You move on with confidence.

Catching a sign error

A friend writes (a - b)^2 = a^2 + 2ab + b^2 on the board. You suspect the middle sign is wrong. Pick a = 2, b = 1 — slightly larger than 1 so the sign actually matters (at a = b = 1, both signs of 2ab would still give different totals, but a = 2, b = 1 makes the gap impossible to ignore).

  • LHS: (2 - 1)^2 = 1^2 = 1.
  • RHS: 4 + 4 + 1 = 9.

1 \ne 9. The expansion is wrong. You point to the +2ab term: that should be -2ab, because the cross-products in (a - b)(a - b) are -ab and -ab. Switching the sign gives RHS = 4 - 4 + 1 = 1, which now matches LHS.

Why pick a = 2, b = 1 here instead of a = b = 1? Because at a = b = 1, +2ab = +2 and -2ab = -2, so the wrong RHS would be 1 + 2 + 1 = 4 and the right RHS would be 1 - 2 + 1 = 0 — both still detectable, but the a = 2, b = 1 version makes the gap larger and the conclusion more emphatic.

Catching a coefficient error

You expand (a + b)^3 and write a^3 + 2a^2 b + 2ab^2 + b^3. Sanity check at a = b = 1.

  • LHS: (1 + 1)^3 = 2^3 = 8.
  • RHS: 1 + 2 + 2 + 1 = 6.

8 \ne 6. The total comes up 2 short, which means your middle coefficients are too small. The correct identity is (a + b)^3 = a^3 + 3a^2 b + 3ab^2 + b^3, with coefficients 1, 3, 3, 1 — the row of Pascal's triangle for n = 3. Plugging in: 1 + 3 + 3 + 1 = 8. ✓

Why a = 1, b = 1 specifically?

Because the arithmetic is trivial. Every power of 1 is 1, every product of 1s is 1, so the RHS becomes "just add up the coefficients." For (a + b)^n, the RHS at a = b = 1 is the sum of the binomial coefficients, which equals 2^n — a number you already know. So your check reduces to: "do the coefficients I wrote add up to 2^n?"

For (a + b)^2: do they add to 4? (1 + 2 + 1) = 4. ✓ For (a + b)^3: do they add to 8? (1 + 3 + 3 + 1) = 8. ✓ For (a + b)^4: do they add to 16? (1 + 4 + 6 + 4 + 1) = 16. ✓

This makes the check almost free — you do it in your head while writing the next line.

When a = 1, b = 1 is not enough

Because 1^k = 1 for every k, the check at a = b = 1 cannot distinguish a^2 b from a b^2 or from a^3 — they all evaluate to 1. So if your error swaps two terms with the same coefficient sum, a = b = 1 will not catch it.

The fix: after a = b = 1 passes, retry with a = 2, b = 1 (or a = 2, b = 3). Different powers now give different numbers, so any swapped term shows up. Two checks, ten seconds total, gives you near-certainty.

The bigger principle

Mathematicians do this all the time, and not just with identities. After deriving any messy formula, plug in a special case where you already know the answer:

This is what is sometimes called a smell test or "sanity check," and it is one of the most useful habits you can build. Why: derivations are long; mistakes are short. A two-line check at the end protects an entire half-page of work.

The next time you expand an identity in an exam, write the answer, then immediately scribble "a = b = 1: LHS = ?, RHS = ?" in the margin. Three seconds. Then you know.

References

  1. Pascal's triangle — Wikipedia — the row sums equal 2^n, which is exactly what the a = b = 1 check tests for.
  2. Binomial theorem — Wikipedia — the general identity (a + b)^n that all the special cases are instances of.
  3. Polya, How to Solve It — Section "Can you check the result?" makes the case for sanity-checking every derivation.
  4. Sanity check — Wikipedia — the broader idea, used everywhere from software to physics.