a \equiv b \pmod m \iff m | a-b congruence modulo m is equivalence relation \mathbb{Z} /m \mathbb{Z} = \{[a]_m | a \in \mathbb{Z}\}
For m \in \mathbb{N}^+: we have following theorems
a \equiv b \pmod m \iff \text{a,b have same remainder when divided by m} TODO: proof
Every integer is congruent to exactly one element in \{{0, 1, ..., m-1}\}=\text{complete residue system modulo m}
definition: \{a_1, ... a_m\} is CSRM iff every integer is congruent to exactly one element in the set under modulo m. (not necessarily from 0)
there are infinite number of CSRM
examples:
\mathbb{Z} /m \mathbb{Z} = \{[0]_m, [1]_m, ..., [m-1]_m\}
Why do we use: addition, subtraction, multiplication obey modulo math (not division)
a \equiv b \pmod m \land c \equiv d \pmod m \implies
TODO: proof
Using Set Theory:
Examples
Reduce constant: x+10 \equiv x+3 \pmod 7 \implies 10 \equiv 3 \pmod 7
Add both side: x\equiv y \pmod 7 \implies x+3 \equiv y+3 \pmod 7
Make a ring: x\equiv y-3 \implies x \equiv y+4 \pmod 7
Multiply both side: 10 \equiv 3 \pmod 7 \implies 20 \equiv 6 \pmod 7 because 10 \equiv 3 \pmod 7 \implies 10*2 \equiv 3*2 (\text{mod} 7/gcd(10*2, 3*2))
Substitution...
Subtraction
a \equiv b \pmod m \implies a^n \equiv b^n \pmod m for n \in \mathbb{Z}^+
Counter Example:
division something into fraction
any division in general, except
ac \equiv bc \pmod m \implies a \equiv b \pmod {\frac{m}{gcd(c, m)}}
TODO: proof
For multiplication, its like we have: a \equiv b \pmod m \implies ac \equiv bc \pmod {mc} we know this fundamentally
since c | mc, we can restrict above to simpler form
ac \equiv bc \pmod m TODO: need to check validity
For division, its like we have: a \equiv b \pmod m \implies a/c \equiv b/c \pmod {m/c}
but m/c can be even smaller so that we can have bigger ring
the furthest we can do is to make c and m coprime, since therefore any division TODO: need more thinkings here
\text{a and m are relatively prime} \iff ab\equiv 1 \pmod m)
Inverse are unique under mod m
(\exists m \in \mathbb{Z})(ax \equiv b \pmod m) \iff gcd(a, m) | b
ax \equiv 1 \pmod m
guess and check
guess x for all x up to m in which gcd(m, x) = 1
or perhaps the negative of the first half of result above
To find a solution to equivalence (or 50x+71y=1 thing)
first find if has an inverse gcd(a,b)=1
then gcd(big, small) to =1
then write 1=big-small*(multiple)
then expand the smaller value
then you find inverse of x
use what you given to find equivalence by x*x^-1=1
Table of Content