Now we will transition into discussing some simple properties that congruences have. We begin by defining the idea that x relates to y if a relationship between inputs x and output y exists. (Functions, as you may recall from basic algebra, are a special kind of relation in which our input x has at most one output y.) We can define the relation for congruences like so: for integers a, b, and n with n > 0, a relates to b if a is congruent to b mod n.

We can now use this relation to define three congruence properties, the first of which is the reflexive property. The reflexive property states that a relates to a, or that a is congruent to a mod n for integers a and n with n > 0. To see this, we use the definition of congruence to write out that n divides a - a, or 0. This is always true since 0 is divisible by every integer excluding 0, which n cannot be. Therefore, congruence is a reflexive relation. We can use Python to verify the reflexive property for congruences quite easily.



Print whether or not this congruence (satisfying the conditions for the reflexive property) is, indeed, true:

55(mod3)5 \equiv 5\;(mod\;3)

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?