Modular Arithmetic is the habit of studying remainders to simplify divisibility, powers, congruences, and impossibility arguments. In contest math, that habit turns a crowded setup into a relation the student can test, bound, count, or compute. MathGrit teaches it as a recognizable signal, a deliberate move, and a final translation back to the original question.
Working modulo $n$ means replacing every integer by its remainder on division by $n$, and these remainders add, subtract, and multiply just like ordinary numbers.
Why It Works
1
Two integers are congruent mod $n$ exactly when they leave the same remainder, i.e. their difference is a multiple of $n$.
2
If $a \equiv b$ and $c \equiv d \pmod{n}$, then $n \mid (a-b)$ and $n \mid (c-d)$, so $n$ divides $(a+c)-(b+d)$ and addition is well defined.
3
For products, $ac - bd = a(c-d) + d(a-b)$; since $n$ divides both pieces, $ac \equiv bd \pmod{n}$.
4
Repeating multiplication gives $a^k \equiv b^k \pmod{n}$, so you may reduce bases mod $n$ before raising to a power.
Worked Examples
Example 1
Find the last two digits of $7^{2024}$.
1
The last two digits are the value mod $100$, so compute $7^{2024} \pmod{100}$.
2
Find a small power that is $1$: $7^2 = 49$, and $7^4 = 49^2 = 2401 \equiv 1 \pmod{100}$.
Prove that $n^5$ and $n$ always have the same last digit, i.e. $n^5 \equiv n \pmod{10}$ for every integer $n$.
1
By the Chinese Remainder Theorem it suffices to prove $n^5 \equiv n \pmod 2$ and $n^5 \equiv n \pmod 5$, since $10 = 2 \cdot 5$ with $\gcd(2,5) = 1$.
2
Mod $2$: if $n$ is even both sides are $0$; if $n$ is odd both sides are $1$. So $n^5 \equiv n \pmod 2$ always.
3
Mod $5$: Fermat's little theorem gives $n^5 \equiv n \pmod 5$ for all $n$ (true even when $5 \mid n$, since both sides are $0$).
4
Both congruences hold, so $n^5 - n$ is divisible by $2$ and by $5$, hence by $10$, giving $n^5 \equiv n \pmod{10}$.
Answer:
$n^5 \equiv n \pmod{10}$ for all integers $n$.
Going Deeper
Generalization: congruences respect addition, subtraction, and multiplication but NOT division — you may only 'divide by $a$' (multiply by $a^{-1}$) when $\gcd(a,n) = 1$. To split a modulus, use $a \equiv b \pmod{mn} \iff a \equiv b \pmod m$ and $a \equiv b \pmod n$ whenever $\gcd(m,n) = 1$, which reduces hard moduli to coprime prime-power pieces.
Where it appears: last-digit and last-$k$-digit problems (work mod $10^k$), divisibility and remainder questions, and any problem with an astronomically large exponent — find a power that is $\equiv 1$ and the exponent collapses to its residue modulo that period.
Pitfall: you may reduce a base before exponentiating ($a \equiv b \Rightarrow a^k \equiv b^k$), but you may NOT reduce the exponent modulo $n$. Exponents reduce modulo the order of the base (or $\varphi(n)$ when $\gcd(a,n)=1$), never modulo $n$ itself — confusing the two is the most common error in 'last digits of $a^N$' problems.
Spot the Signal
Look for problems where the key step is studying remainders to simplify divisibility, powers, congruences, and impossibility arguments.
You can describe the hard part as studying remainders to simplify divisibility, powers, congruences, and impossibility arguments, but a direct attack starts producing clutter.
The problem rewards preserving structure instead of expanding, listing, or guessing too early.
Learn the Move
Start by identify the integer constraint that calls for modular arithmetic, then rewrite the givens around it.
Name the relation that makes Modular Arithmetic legal before doing computation.
Use the new relation to replace the messiest part of the problem with a cleaner one.
Translate the result back to the quantity the problem actually asks for.
Avoid These Traps
Do not use Modular Arithmetic just because the surface looks familiar; verify the required condition first.
Applying Modular Arithmetic because it sounds relevant, without checking the trigger first.
Stopping after spotting the technique instead of finishing the calculation or proof.
MathGrit Coach Note
Let modular arithmetic reveal the integer structure; then compute only what remains.
Try it on:
Practice a contest problem where the key step is studying remainders to simplify divisibility, powers, congruences, and impossibility arguments.