2.6 Integers
Definition 2.6.1. Let \(n\) be a positive integer. Integers \(a\) and \(b\) are said to congruent modulo \(n\) if \(a - b\)
is divisible by \(n\). Written \(\, a\equiv b\) mod\(_n\).
- (i)
- \(17 = 3\) mod\(_7\,\,\) because 7 divides \(17 - 3\)
- (ii)
- \(4 = 22\) mod\(_9\,\,\) since 9 divides \(4-22\).
Proof.
- •
- Reflexivity: Let \(a\) be an integer, then \(a=a\) mod\(_n\) since \(n\) divides \(a - a = 0\).
- •
- Symmetry: Let \(a\) and \(b\) be integers such that \(a=b\) mod\(_n\) . Then \(n\) divides \(a - b\). But this implies \(n\) divides \(b-a\). Thus \(b = a\) mod\(_n\).
- •
- Transitivity: Let \(a = b\) mod\(_n\, \cdot \, b = c\) mod\(_n\). We need to show that \(a = c\) mod\(_n\). Now, \(a = b\) mod\(_n\) implies \(n\) divides \(a - b\, ,\,\, b = c\)
mod\(_n\, \implies n\) divides \(b-c\) i.e \(\, a - b = kn\) for some \(k\in \mathbb {Z}\) and \(b - c = hn\) for some \(h\in \mathbb {Z}\).
\(\therefore \, a - c = kn + hn = (k+h)\, n).\) Thus \(a-c\) is divisible by \(n\, \implies \, a = c\) mod\(_n\).
Theorem 2.6.4 (The Division Algorithm). If \(a\) and \(b\) are integers \( , \, b>0\), then there exist integers \(q\) and
\(r\) such that \(\, a = bq + r\, , \hspace {0.2cm} 0 \leq r < b\).
- 1.
- Let \(\, a = 11\, , \, b = 2\, , \) find \(q\) and \(r\) such that \( 11 = 2q + r\, , \, q = 5\, ,\, r = 1\).
- 2.
- Let \(\, a = -6\, , \, b = 4\hspace {0.5cm} q = -2\, , \, r = 2\,\) since \(-6 = 4(-2) + 2\)
Proof. We first show that \(q\) and \(r\) do indeed exist and that they are unique. Consider the set \(S=\big \{a - bt\, :\, t\in \mathbb {Z}\big \}\).
Let \(S'\) denote the set of non-negative elfs of \(S\). Clearly \(S' \neq \emptyset \), since if \(a\geq 0\), then \(t = 0\) yields \(a\in S'\). If \(a<0\), then \(t=a\), we get \(a - ba\in S\).
But \(a - ba = a(1 - b)\geq 0\) because \(a < 0\) and \(1 - b\leq 0\). i.e \(a - ba\in S' \, \implies \neq \emptyset \).
Let \(r\) denote the least integer in \(S'\). If \(0\in S'\), then \(r = 0\), otherwise apply the well ordering principle least
integer principle. Let \(q\) denote the allowed value of \(t\) so that \(a - bq = r\, \implies a = bq + r\).
We show that this is a unique representation. Suppose \(a = bq_1 + r_1\) and \(a = bq_2 + r_2\hspace {0.3cm} 0\leq r_1\, ,\, r_2 < b\). We need to show that \(q_1 = q_2\, , \, r_1 = r_2\). Thus we
have \(\, bq_1 + r_1 = bq_2 + r_2 \, \implies b(q_1 - q_2) = r_2 - r_1\). Thus \(b\) divides the difference \(r_2 - r_1\). But \(0\leq r_1 < b\) and \(0\leq r_2 < b\). \(\, - b < r_2 - r_1 < b\). The only multiple of \(b\) between \(-b\) and \(b\) is \(0\) thus \(r_2 - r_1 = 0\, \implies r_2 = r_1\).
This implies \(b(q_1 - q_2) = 0\) but \(b\neq 0\, \implies q_1 - q_2 = 0\) so that \(q_1 = q_2\).
This proves the uniqueness.
□
Theorem 2.6.6. Let \(a\) be an integer, then \(a\) is congruent to precisely one integer modulo \(n\) in
\(1\, , \, 2\, , \, \cdots \cdots , n-1.\hspace {0.7cm}\boxed {\mathbb {Z} \longrightarrow \mathbb {Z}_n}\)
Proof. If \(a\in \mathbb {Z}\), then by the division algorithm there exist \(q\, , \, r \) such that \( a = nq + r\, \, 0\leq r < n\). From this, \(a - r = nq\) so that \(n\) divides
\(a - r\) and \(a = r\) mod\(_n\). Thus \(a\) is congruent to atleast one of the integers \(0\, , \, 1\, ,\, 2\, \cdots \cdots \, n-1\). We then show that such an \(r\) is
unique.
Suppose there is another \(r'\) such that \(a = r'\) mod\(_n\,\), \(\,\, 0\leq r' <n\). Therefore \(a - r' = nt\, , \, t\in \mathbb {Z} \, \implies a = nt + r'\, , \, 0 \leq r' <n\). Thus by the unique representation (from
the division algorithm) \(r = r'\). This completes the proof.
□
Note. For any positive integer \(n\), there are \(n\) congruence classes modulo \(n\). With \(n\) fixed \(k\) integer,
let \([k]\) denote the congruence class to which \(k\) belongs mod \(n\). In some texts this is denoted as \([k]_n\).
Example 2.6.7. Let \(n = 5\). Then \(\, [2] = [7] = [-33] = \big \{\cdots \cdots \, ,\, -8\, , \, -3\, , \, 2\, , \, 7\, , \, 12\, , \cdots \cdots \big \}\)
Theorem 2.6.8. If \(a\) and \(b\) are integers, not both zero, then there is a unique positive integer \(d\) such that
- (a).
- \(d/a\,\) and \(\, d/b\,\) and
- (b).
- If \(c\) is an integer such that \(c/a\) and \(c/b\), then \(c/d\).
Proof. Let \(S = \left \{ax+by : x,y\in \mathbb {Z}\right \}\cap \mathbb {Z}^{+}\). Since \(a\) and \(b\) are not both zero, \(S\) is non-empty — it contains \(a^{2}+b^{2}\) — so by well-ordering it has a least element \(d = ax_0+by_0\).
\(d\) divides \(a\): dividing, \(a = qd + r\) with \(0\leq r<d\), and \[r = a - qd = a\left (1-qx_0\right ) + b\left (-qy_0\right )\] is of the same form. If \(r>0\) it would lie in \(S\) and be smaller than \(d\), so \(r=0\). The same argument gives \(d\mid b\), so \(d\) is a common divisor.
Any common divisor \(c\) of \(a\) and \(b\) divides \(ax_0+by_0 = d\), so \(c\leq d\). Hence \(d\) is the greatest common divisor, and it is unique because two positive integers dividing each other are equal. □
Note.
- (a)
- implies that \(d\) is a common divisor of \(a\) and \(b\).
- (b)
- implies that \(d\) is the greatest common divisor of \(a\) and \(b\).
We denote the greatest common divisor g.c.d of two integers \(\, a\, ,\, b\) as \((a\, , \, b) = d\).
Proof. Uses the Euclidean algorithm.
□
The Euclidean algorithm
Given integers \(a\) and \(b\), the Euclidean algorithm is used to calculate the g.c.d \((a,b)\).
Solution.
| 1001 | = | 375(2) + 287 |
| 357 | = | 287(1) + 70 |
| 287 | = | 70(4) + 7 |
| 70 | = | 7(10) + 0 |
Solution.
| 1369 | = | \(-90\)(15) + 19 |
| \(-90\) | = | 19\(\cdot \) (4) + 14 |
| 19 | = | 14\(\cdot \)(1) + 5 |
| 14 | = | 5\(\cdot \) (2) + 4 |
| 5 | = | 4\(\cdot \)(1) + 1 |
| 4 | = | 1\(\cdot \) (4) |
Note. Suppose \(a\, , \, b\) are integers and that \((a\, , \, b) = 1\). Then we say \(a\) and \(b\) are relatively prime.
A close relationship exists between the divisibility of the integer and some elementary properties
of groups.
Questions on this section
Stuck on something here? Ask below and it stays attached to this topic.