When a ≡ b (mod n), adding multiples of n to one number doesn’t change its gcd with n. This snapshot explains why gcd(a, n) = gcd(b, n) holds, using the idea that any common divisor of a and n also divides b, and vice versa, so the divisor sets align.

Multiple Choice

If a ≡ b (mod n) with n > 0, which statement is necessarily true?

Being congruent modulo n means a − b is a multiple of n, so a = b + kn for some integer k. The greatest common divisor with n doesn’t change when you add a multiple of n to a: gcd(a, n) = gcd(b + kn, n) = gcd(b, n). This is because any common divisor of b and n also divides a (since a − b = kn), and any common divisor of a and n also divides b. So the sets of common divisors are the same, giving equal gcds. Therefore gcd(a, n) equals gcd(b, n) is always true. The other statements aren’t guaranteed by congruence alone, since the gcd need not be larger or smaller, nor must it be a multiple of n except in the special case where n divides a.

A gentle reminder about congruences and gcd

If two integers a and b share the same remainder when you divide by n, that is a ≡ b (mod n) with n > 0, then something neat happens: their greatest common divisors with n are the same. In the language of numbers, gcd(a, n) = gcd(b, n). It sounds almost like magic, but it’s really a tidy consequence of how divisors work.

Let me explain it in a down-to-earth way. When we say a ≡ b (mod n), we’re saying a − b is a multiple of n. So you can write a as b plus some multiple of n: a = b + kn for some integer k. Now, what does that do to common divisors with n?

A friendly viewpoint: common divisors care only about what divides both numbers, not about the exact values themselves. If d divides both b and n, does it also divide a? Since a − b = kn, any divisor of b and n will divide kn as well, and hence will divide a = b + kn. So every common divisor of b and n also divides a and n. That gives gcd(a, n) ≥ gcd(b, n) in the sense of sharing the same set of divisors that work for both a and n.

But the story doesn’t stop there. Flip the perspective: if d divides a and n, does it necessarily divide b? Since a − b = kn, we can rearrange b = a − kn. If d divides both a and n, it certainly divides kn as well, and thus divides a − kn, which is b. So any common divisor of a and n also divides b and n. That means the sets of common divisors for (a, n) and (b, n) are identical.

When two sets of divisors match exactly, the greatest one—the gcd—must match as well. So gcd(a, n) = gcd(b, n). It’s a tiny but powerful symmetry: shifting a by a multiple of n doesn’t wobble the gcd with n.

Concrete intuition you can hold onto

Think of gcd as a measure of “how much you share with n.” If you tweak a by adding or removing full scoops of n, you’re not changing that shared amount. The leftover pieces that align with n stay the same, because you’re only reshuffling by full blocks of n. It’s like rearranging bricks in a wall by adding whole rows of bricks that stretch across the whole structure; the overall height you share with a fixed base doesn’t suddenly jump up or shrink.

A quick example helps. Take n = 12, a = 35, and b = 11. Notice that 35 ≡ 11 mod 12 (since 35 − 11 = 24, which is 12 × 2). Now, gcd(35, 12) is 1, because 12 shares no nontrivial divisor with 35. The same goes for gcd(11, 12), which is also 1. The congruence hasn’t changed the gcd with 12. If you like a more dramatic case, pick a = 48 and b = 12 with n = 12. Here a ≡ b mod 12 (since 48 − 12 = 36, a multiple of 12). We get gcd(48, 12) = 12 and gcd(12, 12) = 12. Same story, same gcd.

When the gcd can feel tricky—and when it can’t

The only caveat is the more specific scenario where n divides a. If a is already a multiple of n, then a ≡ 0 mod n, and gcd(a, n) becomes gcd(0, n) which equals n. That’s the one special case where the gcd with n is as big as it can be, because every divisor of n divides 0 as well. But even there, the essential equality gcd(a, n) = gcd(b, n) still holds if b is congruent to a modulo n; you’re just looking at a pair of numbers that land in the same residue class modulo n.

Connecting to broader ideas in number theory

This little property is one thread in a larger tapestry. Congruence classes modulo n form a ring-like structure, and many gcd-related statements behave nicely under these modular shifts. It’s not just a curiosity from a textbook; it underpins algorithms and proofs across math, computer science, and cryptography.

For instance, the Euclidean algorithm, which churns out gcds by a sequence of divisions, interacts smoothly with congruence. If you replace a by a − kn, you don’t disturb the gcd with n, which is why a modular view often simplifies reasoning about divisors and common factors. It also explains why certain modular arithmetic tricks—like reducing a before testing divisibility by n—don’t lose essential information about gcds.

A quick tangent on pedagogy and intuition

If you’re helping someone new to this idea, it helps to frame it as a “divisor detective” game. You’re asking: what numbers divide both a and n? If a and b behave the same with respect to division by n, they’ll share the same set of divisors with n. The gcd is just the largest of that set, so it must match. This framing can make the concept feel a lot less abstract and a lot more relatable.

Practical notes for applying the concept

  • When you encounter a ≡ b (mod n), you can replace a with b for gcd computations with n. It’s a legitimate simplification that preserves the answer you care about.

  • If you’re ever stuck trying to compare gcd(a, n) and gcd(b, n), check whether a − b is a multiple of n. If yes, you’re in the land of equal gcds.

  • Don’t stress about the exact values of a and b; the congruence class is the essential thing. It’s like knowing two routes lead to the same neighborhood; the exact streets you take aren’t as important as where you end up.

A few more examples to cement the idea

  • Let n = 15, a = 38, b = 8. Then a − b = 30, a multiple of 15, so a ≡ b mod 15. gcd(38, 15) is 1, and gcd(8, 15) is also 1. Same gcd, as promised.

  • Take n = 21, a = 100, b = 19. The difference is 81, which is 21 × 3 + 18, not a multiple of 21, so this particular pair doesn’t fit the congruence, just to show how precise we need to be. When it does fit, the gcds line up.

  • A more “edge” case: n = 10, a = 50. Here gcd(50, 10) is 10. If b is congruent to a modulo 10, say b = 40, gcd(40, 10) is also 10. Same story again.

Putting the idea into a compact takeaway

  • If a ≡ b mod n and n > 0, then gcd(a, n) = gcd(b, n).

  • The reasoning is simple and robust: any divisor of b and n also divides a, because a − b is a multiple of n, and vice versa. Hence the two gcds must be equal.

  • The only time you see a gcd jump to a larger value is when n itself divides a (and b), but that’s a different branch of the same tree.

A closing thought

There’s something quietly satisfying about how numbers reveal their harmony through these small, tidy rules. It’s the kind of property that feels almost obvious once you’ve seen it, yet it quietly underpins more elaborate theorems and algorithms. So next time you stumble upon a ≡ b (mod n), give a nod to the gcds—there’s a good chance they’ll be in agreement, just like old friends who’ve stuck to the same path for years. And if you’re curious to see how this tiny nugget connects to bigger ideas in number theory, there are plenty of paths to explore—each one a little adventure in how structure and symmetry show up in the integers.