Invariants Examples in Math

Start with the recap, study the fully worked examples, then use the practice problems to check your understanding of Invariants.

This page combines explanation, solved examples, and follow-up practice so you can move from recognition to confident problem-solving in Math.

Concept Recap

Quantities or properties that remain unchanged during a process, operation, or transformation—values that stay the same no matter how the system is rearranged or acted upon.

Rearranging an equation keeps both sides equal—equality is the invariant.

Read the full concept explanation →

How to Use These Examples

  • Read the first worked example with the solution open so the structure is clear.
  • Try the practice problems before revealing each solution.
  • Use the related concepts and background knowledge badges if you feel stuck.

What to Focus On

Core idea: An invariant is a quantity that holds steady no matter how you transform or rearrange the system.

Common stuck point: The procedure for invariants is the easy part; the trap is assuming any unchanged-looking quantity is the invariant. Asking "Is there a property that holds equal before and after the transformation?" first is what keeps a correct-looking calculation from being attached to the wrong concept.

Sense of Study hint: Ask: Is there a property that holds equal before and after the transformation?

Worked Examples

Example 1

medium
A sequence starts at 1 and each term is 3 times the previous minus 2: an+1=3an2a_{n+1} = 3a_n - 2. Show that the quantity an1a_n - 1 grows by a factor of 3 each step (i.e., an1=3n1(a11)a_n - 1 = 3^{n-1}(a_1 - 1) is an invariant structure).

Answer

an=1a_n = 1 for all nn; fixed point is an invariant

First step

1
Define bn=an1b_n = a_n - 1. Then bn+1=an+11=(3an2)1=3an3=3(an1)=3bnb_{n+1} = a_{n+1} - 1 = (3a_n - 2) - 1 = 3a_n - 3 = 3(a_n-1) = 3b_n.

See the full worked solution + why-it-works coaching

SetupKey insightWhy it worksCommon pitfallConnection

Unlock answer keys One Family plan — every worked solution, all subjects

Example 2

hard
In a game, you can add 3 or subtract 5 from a number. Starting at 0, can you reach 1? Use an invariant (parity or modular) argument.

Example 3

medium
The sum of digits of a number doesn't change modulo 9 when you add 9. Verify: 47 → 47+9=56. Is the digit sum invariant mod 9?

Example 4

medium
Numbers 1,2,,101,2,\dots,10 are on a board. You repeatedly erase two and write their sum mod 1111. What is invariant, and what is the last number?

Example 5

medium
Numbers 1,2,,n1,2,\dots,n are on a board. You may replace any two a,ba,b with ab|a-b|. Show the parity of the sum is invariant.

Practice Problems

Try these problems on your own first, then open the solution to compare your method.

Example 1

medium
Show that for any right triangle with legs a,ba, b and hypotenuse cc, the quantity a2+b2c2=0a^2 + b^2 - c^2 = 0 is an invariant (Pythagorean theorem).

Example 2

hard
A 2×n2 \times n grid of squares is colored with 22 colors, where nn is a positive **even** integer. You repeatedly flip all colors in any row or column. Show that the parity of the number of black squares is an invariant.

Example 3

easy
When you rotate a square, what stays the same — its area or its position?

Example 4

easy
You rearrange 3+53+5 into 5+35+3. What is the invariant?

Example 5

easy
Solving an equation, you add 44 to both sides. What stays invariant?

Example 6

easy
A bag has 77 red and 33 blue marbles. You swap two marbles' positions. What is invariant — the count of red marbles?

Example 7

easy
Stretching a rubber band changes its length. Is length an invariant under stretching?

Example 8

easy
Scaling a triangle by factor 22 — is its number of sides invariant?

Example 9

easy
Two different objects both weigh 55 kg. Does sharing the invariant 'weight =5=5 kg' make them identical?

Example 10

easy
Folding a piece of paper in half — is the paper's area invariant?

Example 11

medium
On a board, you may replace two numbers a,ba,b with a+ba+b. Start with 1,2,3,4,51,2,3,4,5. What is invariant, and what is the final number?

Example 12

medium
Reflecting a triangle across a line — is its area invariant?

Example 13

medium
You add the same number to every entry of the list {4,9,4}\{4,9,4\}. Is the RANGE (max minus min) invariant?

Example 14

medium
Numbers 11 to 1010 are written. You repeatedly erase two and write their difference. Is the parity of the total sum invariant?

Example 15

medium
A frog jumps on a number line by ±3\pm 3 each move, starting at 00. Is its position mod 33 invariant?

Example 16

medium
A 4×44\times 4 grid is colored like a checkerboard. You place dominoes covering two adjacent squares. What invariant does each domino preserve?

Example 17

medium
You repeatedly multiply or divide a positive number by 22. Is whether it is a power of 22 times the original invariant?

Example 18

medium
Is area invariant under rotation but not under scaling? Justify with a unit square.

Example 19

medium
Coins show 55 heads, 33 tails. A move flips any two coins at once. Is the parity of the number of heads invariant?

Example 20

challenge
Numbers 1,2,,20241,2,\dots,2024 are on a board. You erase two, aa and bb, and write a+b1a+b-1. After many moves one number remains. Find it.

Example 21

challenge
A 5×55\times 5 board has a piece on each square. Each move shifts every piece to an adjacent square. Show pieces on black squares stay invariant in count parity. Why can't all pieces leave?

Example 22

challenge
Three jars hold 3,5,83,5,8 liters. A pour doubles one jar by transferring from another. Is the total 1616 invariant, and can a jar reach 00?

Example 23

easy
You translate a triangle 5 units to the right. Which property is invariant: area, position, or both?

Example 24

easy
On a clock, you advance the hour hand by 12. Is the displayed hour invariant?

Example 25

easy
When you multiply every entry in a list by 2, is the median invariant?

Example 26

easy
You change every $1\$1 bill in a stack to four quarters. Is the total dollar amount invariant?

Example 27

medium
A chess knight moves on an infinite board. Show its color (of the square it stands on) alternates each move, so 'color after nn moves' has parity invariant in nn.

Example 28

medium
A grasshopper at 00 jumps ±7\pm 7 each move. Can it reach 5050?

Example 29

medium
On a 4×44\times 4 checkerboard with 88 black and 88 white squares, can 1515 dominoes (each covering 11B+1+1W) tile any 1515-square subset?

Example 30

medium
Numbers a,b,ca,b,c on a blackboard transform as (a,b,c)(b+c,a+c,a+b)(a,b,c) \to (b+c, a+c, a+b). Is a+b+ca+b+c invariant?

Example 31

medium
Three numbers 1,1,11,1,1 start on a board. A move replaces (a,b,c)(a,b,c) with (a,b,c+1)(a,b,c+1) for some chosen coordinate. Is the parity of a+b+ca+b+c invariant?

Example 32

medium
A point on a 5×55\times 5 grid moves ±1\pm 1 horizontally or vertically each step. Is its grid-color (checkerboard) invariant?

Example 33

medium
On a number line, you may add 22 or subtract 33. Starting at 00, can you reach 11?

Example 34

medium
An 8×88\times 8 board has its two opposite corners removed. Can the resulting 6262 squares be tiled by 3131 dominoes?

Example 35

hard
Numbers 1,2,31,2,3 are on a board. A move replaces them with a+b2,ab2,c\frac{a+b}{\sqrt 2}, \frac{a-b}{\sqrt 2}, c (for chosen a,ba,b from the three). Show a2+b2+c2a^2 + b^2 + c^2 is invariant.

Example 36

hard
On a 3×33\times 3 grid you place +1+1 or 1-1 in each cell. You may flip all signs in a row or column. Is the product of all 99 entries invariant?

Example 37

hard
An n×nn\times n chessboard, nn even, is to be tiled by LL-shaped trominoes (3 squares). For which nn is the count of squares (n2n^2) divisible by 3?

Example 38

hard
Two stacks have aa and bb tokens. A move adds 11 to one stack and subtracts 11 from the other. Is a+ba + b invariant?

Example 39

hard
The digit sum of a positive integer nn satisfies S(n)n(mod9)S(n) \equiv n \pmod 9. Use this to find the digit sum of 91009^{100} modulo 9.

Example 40

hard
A 4×44\times 4 grid is filled with ±1\pm 1. You may flip all entries in any single row OR any single column. Can you always make all entries equal to 11?

Example 41

challenge
Numbers 1,2,,1001, 2, \ldots, 100 are on a board. A move erases two numbers a,ba, b and writes a+b+aba + b + ab. After 99 moves, one number remains. Find it.

Example 42

challenge
A 7×77\times 7 board has 4949 lights, all off. A move toggles every light in one row OR every light in one column. Can you reach a configuration with exactly one light on?

Related Concepts

Background Knowledge

These ideas may be useful before you work through the harder examples.

equal