Invariance Examples: 47 Problems with Answers

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

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

Concept Recap

A property of a mathematical object that remains unchanged when the object undergoes a particular transformation or operation.

What stays the same when things change? That's often the key.

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 the quantity or property that does not change while a transformation acts on everything else.

Common stuck point: The procedure for invariance is the easy part; the trap is saying invariant without naming the transformation. Asking "Is there a quantity that stays exactly the same every time the given transformation is applied?" first is what keeps a correct-looking calculation from being attached to the wrong concept.

Sense of Study hint: Ask: Is there a quantity that stays exactly the same every time the given transformation is applied?

Worked Examples

Example 1

easy
Show that the sum of the digits of a multiple of 9 is always a multiple of 9. Verify with n=198 and n=729.

Answer

9∣n⇔9∣(digit sum of n)

First step

1
Any integer n can be written as n=∑iai⋅10i where ai are digits. Since 10≡1(mod9), we get n≡∑iai(mod9).

Full solution

  1. 2
    So 9∣n⇔9∣(sum of digits) — the divisibility by 9 is an invariant property shared by n and its digit sum.
  2. 3
    Check n=198: digit sum =1+9+8=18, which is a multiple of 9. And 198=9×22. Confirmed.
  3. 4
    Check n=729: digit sum =7+2+9=18, multiple of 9. And 729=9×81. Confirmed.
An invariant is a property preserved across transformations. Here, taking digit sums preserves divisibility by 9 because of how 10 behaves modulo 9.

Example 2

medium
A sequence starts at 1 and each step either doubles the value or adds 3. Show that the parity (odd/even) of the value changes predictably and identify an invariant.

Example 3

medium
On a board are the numbers 1,2,3,…,100. You may replace any two numbers a,b with ∣a−b∣. After 99 such operations, one number remains. Is its parity determined, and if so, what is it?

Example 4

medium
Show that the sum ∑i=1nai is invariant under any permutation σ of the indices {1,2,…,n}.

Example 5

hard
In a row of integers, you may pick two adjacent numbers a,b and replace them with a+b and a−b (in that order). Show the sum of squares is invariant.

Example 6

hard
Show that an odd permutation cannot be written as a composition of an even number of transpositions.

Example 7

challenge
An n×n grid is filled with ±1. In one step you may flip the signs in any row or column. Find an invariant that determines reachability.

Practice Problems

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

Example 1

easy
Show that the expression x2+y2 is invariant under the transformation (x,y)↦(−x,−y).

Example 2

medium
In a game, you start with the number 6. Each move you may subtract 1 or divide by 2 (if even). Show that the quantity n(mod3) is not always preserved and find an invariant that is preserved.

Example 3

easy
When you rotate a square about its center, what stays the same about it?

Example 4

easy
You add 5 to both sides of x=3. What is invariant?

Example 5

easy
Under reflection across a line, is the area of a triangle invariant?

Example 6

easy
Is the perimeter of a rectangle invariant when you scale it by a factor of 2?

Example 7

easy
What is invariant when you multiply both sides of 2x=6 by 12?

Example 8

easy
Under any rotation, is the distance between two points invariant?

Example 9

easy
When you reorder the addends 3+5 to 5+3, what is invariant?

Example 10

easy
Is the number of vertices of a polygon invariant under rotation?

Example 11

medium
A checkerboard has 32 black and 32 white squares. A domino always covers one black and one white square. After placing several dominoes, what stays invariant about the difference (black covered) minus (white covered)?

Example 12

medium
Two opposite corners are removed from an 8×8 board (both same color). Using the domino color invariant, can the remaining 62 squares be tiled by dominoes?

Example 13

medium
What quantity is invariant under the transformation x↦−x for the function f(x)=x2?

Example 14

medium
A frog jumps on a number line, each jump ±2. Starting at 0, what is invariant about the parity of its position?

Example 15

medium
In the equation 3x+7=7, subtract 7 from both sides. What is invariant and what is the result?

Example 16

medium
Under the map that swaps a and b, is the expression a2+b2 invariant?

Example 17

medium
Numbers 1 through 7 are written; you may replace any two by their difference (larger minus smaller). The sum starts at 28. What is invariant about the sum's parity?

Example 18

challenge
Numbers 1,2,…,1024 are on a board. Repeatedly erase two numbers a,b and write ∣a−b∣. After 1023 steps one number remains. Show its parity is determined, and find that parity.

Example 19

challenge
A 5×5 grid has 13 cells of one color and 12 of the other in a checkerboard pattern. Explain why this color count is an invariant obstruction proving the grid cannot be tiled by 1×2 dominoes.

Example 20

challenge
Let f(x,y,z) be invariant under all permutations of x,y,z. If f=x+y+z at one point equals 6 and you permute the inputs, what is the most you can conclude about f after permutation?

Example 21

medium
A token sits at 0 on a number line; each move adds 3 or subtracts 3. What is invariant about its position mod 3?

Example 22

medium
Under the substitution x↦x+2π, is sin⁡x invariant?

Example 23

easy
You replace x=7 with x+4=11. Is the solution set invariant?

Example 24

easy
A bag has 5 red and 7 blue marbles. You shuffle them. What is invariant?

Example 25

easy
Numbers 1,2,3,4,5 are on a board. You repeatedly replace two numbers by their sum. Is the sum of all numbers on the board invariant?

Example 26

easy
Are the digits' sum mod 9 invariant when you permute the digits of a number? (e.g., 234→423)

Example 27

medium
A knight starts at (0,0) on an infinite chessboard. After any number of knight moves, what is invariant about (x+y)(mod2)?

Example 28

medium
In the equation 4(x−1)=12, divide both sides by 4. What is invariant and what is the result?

Example 29

medium
Under the swap (a,b)↦(b,a), is the expression a2−b2 invariant?

Example 30

medium
A lamp toggles ON/OFF each press. After 2025 presses starting from OFF, what state is it in, and which invariant tells you?

Example 31

medium
Numbers 1,1,2,3,5,8 are on a board. You may replace any two numbers a,b with a⋅b. Is the product of all numbers on the board invariant?

Example 32

medium
In an 8×8 checkerboard with TWO opposite corners removed (same color), explain in one line why no domino tiling exists.

Example 33

hard
You have 20 stones in piles of sizes 5,7,8. Each move: pick two piles, remove one stone from each. What invariant determines whether you can reach the configuration (0,0,0)?

Example 34

hard
A token at (0,0) on the integer plane can move by (+2,+3) or (−1,+4). What is invariant about its position mod a small number?

Example 35

hard
On a board are 30 pluses and 25 minuses. Each step: erase two signs; if they were equal, write a plus; if different, write a minus. After 54 steps, one sign remains. Which one?

Example 36

hard
15 numbers are on a board, starting at 1,2,…,15. Each step: replace two numbers a,b with a+b−1. After 14 steps, one number remains. Find it.

Example 37

hard
Under the substitution x↦1/x, the function f(x)=x+1/x is mapped to ____.

Example 38

hard
For a triangle with sides a,b,c, the quantity a+b+c is the perimeter. Under any relabeling of vertices, what kind of invariant is this?

Example 39

challenge
A frog on the integer line at 0 can jump ±2 or ±5. Which positions can it reach?

Example 40

challenge
Three jars contain a,b,c liters of water with a+b+c=9. A move: pick two jars and equalize them (each gets the average). Find an invariant.

Background Knowledge

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

transformation geo