What would you like to understand?

Popular destinationsCalculatorsCoursesPracticeFormulas

Unlock Premium Help

Explore every tutor and study workspace for seven days, with no daily AI cap during the trial.

Choose a billing period
Ask a parent to pay

Nothing is charged during the first seven days. Unless you cancel, the plan you selected begins when the trial ends and renews on its stated schedule. Manage cancellation from your plan page. Stripe handles the payment details.

Modular congruence formula: what it means and how to use it

State that two integers have the same remainder modulo $n$. This number theory relationship belongs to discrete math. Read the symbols against the problem, confirm the required conditions, and estimate the scale before calculating.

\[a\equiv b\pmod n\iff n\mid(a-b)\]

Read the objects and logical claim in Modular congruence

Identify the set, index, graph, counting object, or proposition first. Then separate what is assumed from what is being counted or proved. Rebuild missing background in the discrete math subject guide, then use discrete math practice to retrieve the relationship without being told its name.

State the finite, integer, or logical conditions

Division is the operation that does not carry over. Addition, subtraction, and multiplication all respect congruence, but you can only divide by a number that has an inverse mod n, which requires its gcd with n to be 1.

Test Modular congruence on a small case

List or draw a small instance before relying on the general notation:

\[$17\equiv5\pmod{12}$ because $12\mid(17-5)$.\]

Extend the small case to the general structure

  1. Name the unknown, and the unit the answer has to come out in.
  2. Match the symbols to your values. $n$ is the modulus.
  3. Check the conditions before substituting. $n$ is a positive integer in the standard convention.
  4. Substitute, keep exact values to the last line, then test the sign, size, and unit against a rough estimate - The check that catches most discrete math slips.

Check boundaries, overlap, and base cases

After using Modular congruence, repeat the calculation with units attached and test the result against a boundary case or a quick numerical estimate.

A counting or logic mistake to catch

What goes wrong: Students treat the congruence like an ordinary equation and cancel a common factor from both sides.

Why it fails: Cancelling is only safe when the factor shares no divisor with the modulus. It is true that 2 times 3 is congruent to 2 times 0 mod 6, but cancelling the 2 would claim 3 is congruent to 0 mod 6, which is false.

Repair: Check that the factor you want to remove is coprime with n before cancelling. With modulus 7 you may cancel any nonzero factor freely, since 7 is prime.

Questions about Modular congruence

Is a ≡ b (mod n) the same as saying a mod n equals b mod n?

Yes, they say the same thing. The first phrasing is about the difference being divisible by n, and the second is about the two remainders matching, and either one implies the other.

What is −7 mod 12?

It is 5, because −7 and 5 differ by 12. Remainders are usually reported in the range 0 through n − 1, so you add copies of the modulus until you land inside it.

Can I add and multiply congruences?

Yes, and freely. If a ≡ b and c ≡ d with the same modulus, then a + c ≡ b + d and ac ≡ bd, which is what makes it possible to reduce huge numbers before calculating.

Why is 17 ≡ 5 (mod 12)?

Because 17 − 5 = 12, which 12 divides exactly once. On a clock, 17:00 and 5:00 point at the same place, which is exactly the situation the notation describes.

Make it yours

Change one input, predict whether the output should rise, fall, or stay fixed, and only then recalculate.