Exercise · ZW-MODULAR-CONGRUENCE-003 · ★☆☆ Basic

What is \(-7\bmod5\)?

Choose one option.

Show answer
  • B. 3

Explanation

The remainder must lie between 0 and 4: \(-7=(-2)\cdot5+3\), so the result is 3, not \(-2\).

Study Discrete mathematics in ZWMath →

Review the concept: Modular congruence

Two integers \(a\) and \(b\) are congruent modulo a positive integer \(m\) if \(m\) divides their difference; equivalently, they leave the same remainder when divided by \(m\).

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

More practice problems: modular congruence

← ZW-MODULAR-CONGRUENCE-002 ZW-MODULAR-CONGRUENCE-004 →