Learn

Learning preferences

Make learning more comfortable. Changes apply immediately.

Enlarges page content, including diagrams and their labels. You can also use your browser’s zoom.

Choose the colours that are easiest for you to distinguish. Applies to lesson diagrams and lab plots. Labels, shapes, hatching and line patterns also distinguish meanings. Source photographs and raw image brightness stay unchanged; mask-only views are available for image overlays.

ExampleComparisonSample link

Saved in this browser on this device. Preferences are separate from progress backups.

Lesson 17 of 18

Calculate with residue classes without invalid cancellation

Prove modular operations and characterize multiplicative inverses.

Loading your saved responses…

Try

Modulo 5, integers −2,3 and 8 represent the same residue because their differences are multiples of 5. Congruence a≡b mod m means m divides a−b, with a positive modulus m. A least nonnegative representative lies from 0 through m−1.

Predict

Predict which ordinary algebra operations remain safe. Adding or multiplying congruent integers preserves congruence. Dividing requires care: a nonzero integer can represent a noninvertible residue, so cancellation is not automatic.

Experiment

Make a multiplication row for 3 modulo 7. The products 0,3,6,2,5,1,4 visit every residue, and 3·5≡1 identifies inverse 5. Compare multiplication by 2 modulo 6, whose outputs only visit 0,2,4 and therefore cannot reach 1.

Understand

Worked inverse theorem: a has a multiplicative inverse modulo m≥2 exactly when gcd(a,m)=1. Bézout gives au+mv=1 in the coprime case, so u is an inverse. Conversely an inverse gives au−km=1, forcing any common divisor of a,m to divide 1.

Consequently ax≡ay implies x≡y when a is invertible, by multiplying both sides by its inverse. Without coprimality, 2·1≡2·4 mod6 while 1 and 4 differ modulo 6. The failure is loss of information under multiplication, much like a noninjective function.

Invalid remainder: calling −2 the least nonnegative residue of −17 modulo 5. It is congruent, but the requested canonical representative is 3.

Apply

Specify the modulus in every congruence and check an inverse by multiplication. Use residues to simplify large expressions step by step, but never cancel a factor without the gcd condition or an explicitly constructed inverse.

Continue

Depth: repeated squaring computes large modular powers efficiently. Fermat/Euler theorems, multiplicative orders and cryptographic applications require further hypotheses and are reserved for the full number-theory course; modular arithmetic alone is not a security guarantee.

Apply · explain · revise

Practice and reasoning

Drafts save locally as you type. Reveal worked solutions when useful; the site remembers that exposure. Automatic matches check the requested answer, while written arguments require review against the rubric.

Find the least nonnegative residue of −17 modulo 5.

Integers, fractions and finite decimals are accepted. Expressions such as sqrt(2) are not parsed by this checker.

Find the least nonnegative inverse of 7 modulo 12.

Integers, fractions and finite decimals are accepted. Expressions such as sqrt(2) are not parsed by this checker.

From ax≡ay mod m, cancellation of a is guaranteed when:

Your response

Which residue has no inverse modulo 10?

Your response

Prove a has an inverse modulo m≥2 exactly when gcd(a,m)=1.

Structure your argument and preserve revisions

These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.

Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.

Disprove unrestricted cancellation modulo 6 with a nonzero factor and explain the failure.

Structure your argument and preserve revisions

These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.

Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.

Reflect and continue

Before marking this lesson complete, explain one key idea without the worked solution and identify a condition that matters. Marking complete records participation, not independent mastery.