Congratulations, we have proved the reflexive property for congruences! The next property of congruences we will verify is another simple idea called the symmetric property. The symmetric property for congruences goes like this: if a is congruent to b mod n for integers a, b, and n with n > 0, then b must also be congruent to a mod n. To prove the symmetric property for congruences, we first suppose that a, b, and n are integers with n > 0 such that a is congruent to b mod n. In other words, we know that n divides (a-b), or that

(ab)=nk(a - b) = nk

for some integer k. Multiply both sides by -1:

(ab)=(nk)-(a - b) = -(nk)

Distribute the negative on the left-hand side of the equation and move the negative sign on the right-hand side to obtain:

a+b=ba=(nk)=n(k)-a + b = b - a = -(nk) = n(-k)

Since k is an integer, its negative (-k) is also an integer. We have shown that n divides (b-a), and by the definition of congruence, we have proven that b is congruent to a mod n. Python is quite useful in helping us see the symmetric property in action, and the upcoming checkpoints will ask you to demonstrate this property using code.



Print whether or not the following statement:

112(mod3)11 \equiv 2\;(mod\;3)

is true.


Now print out whether or not:

211(mod3)2 \equiv 11\;(mod\;3)

is true.

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?