10.5 Applications to number theory
We now use some of the tools from group theory to look back at questions linked to modular arithmetic.
It is worth noting that much of the following theory predates and motivated the development of abstract group theory, in particular the study of Abelian groups (from 1800). Alongside Symmetry groups and Transformation groups (which we did not explore), Abelian groups were concrete examples of groups that drove this development.
First, recall that \((\mathbb{Z}/n\mathbb{Z},\cdot)\) is not a group as some elements (such as \([0]\)) do not have a multiplicative inverse (recall Proposition 10.13). Let us define the following group.
\((U_n,\cdot)\) is an abelian group.
Suppose \([a],[b]\in U_n\), so \(\gcd(a,n)=1=\gcd(b,n)\). Then \(\gcd(ab,n)=1\) and so \([ab]\in U_n\) and \(U_n\) is closed under multiplication.
Since \[([a][b])[c]=[abc]=[a]([b][c])\] multiplication on \(U_n\) is associative.
\([1]\) is an identity element, since \([1][a]=[a]=[a][1]\) for any \(a\).
If \([a]\in U_n\), so \(\gcd(a,n)=1\), then \(as+nt=1\) for integers \(s,t\), and \(\gcd(s,n)=1\). So \([s]\in U_n\) is an inverse of \([a]\).
So \(U_n\) is a group under multiplication. It is abelian since \([a][b]=[ab]=[b][a]\) for all \(a,b\in\mathbb{Z}\).□
The notation \(U\) stands for “units”. In Algebra 2, you’ll see that a unit is an element which has a multiplicative inverse, so \(U_n\) is the group of units of \(\mathbb{Z}/n\mathbb{Z}\).
Similar links can be made with \((\mathbb{R},+)\) and \((\mathbb{R}\setminus\{0\},\cdot)\) or with \((\mathbb{Z},+)\) and \((\{-1,1\},\cdot)\).Unlike \((\mathbb{Z}/n\mathbb{Z},+)\), \((U_n,\times)\) is not always cyclic (although it sometimes is).
We can now apply Lagrange’s theorem to \(U_n\) to get an important number theory result.
Let \(p\) be a prime and \(a\) an integer not divisible by \(p\). Then \[a^{p-1}\equiv 1\pmod{p}.\]
We’ll apply Corollary 10.20 to the group \(G=U_p\). Since \(p\) is prime, \(U_p=\{[1],[2],\dots,[p-1]\}\) has order \(p-1\), and if \(a\) is not divisible by \(p\) then \([a]\in U_p\). So by Corollary 10.20, \[[a]^{p-1}=[1]\] in \(U_p\), or in other words \[a^{p-1}\equiv 1\pmod{p}.\]
□
This simplifies calculating powers of integers modulo a prime:
Pierre de Fermat, French lawyer and government official (1601 - 1665) worked on several number theory problems alongside his job. He wrote the above theorem however he did not write down a proof for fear it would be too long - he certainly was not aware of group theory tools that would have provided a short proof.
There is a generalization to powers modulo \(m\) where \(m\) is not prime, but the statement is a bit more complicated, since \(U_m\) is not just \(\{[1],[2],\dots,[m-1]\}\). So first, let’s introduce some standard notation for the order of this group.
Let \(m>0\) and \(a\) be integers with \(\gcd(a,m)=1\). Then \[a^{\varphi(m)}\equiv1\pmod{m}.\]
Apply Corollary 10.20 to the group \(G=U_m\). The condition \(\gcd(a,m)=1\) means that \([a]\in U_m\), and \(|U_m|=\varphi(m)\), so the corollary gives \[[a]^{\varphi(m)}=[1]\] in \(U_m\), or in other words \[a^{\varphi(m)}\equiv1\pmod{m}.\]
□
Leonhard Euler, Swiss mathematician (1707 - 1783), wrote down a proof of Fermat’s Little Theorem in 1736 (nearly a 100 year after Fermat wrote down the statement). He then extended Fermat’s theorem to all cases. While he used modular arithmetic notation as we do today, it wasn’t until 1801 that Gauss revisited the proof and gave a shorter and simpler version using group theory ideas.
Many of the groups \(U_n\) are direct products in disguise.
Let \(m,n\) be positive integers with \(\gcd(m,n)=1\). Then \[U_{mn}\cong U_m\times U_n.\]
Define a map \[\varphi:U_{mn}\to U_m\times U_n\] by \(\varphi([a]_{mn})=([a]_m,[a]_n)\) (where we use subscripts such as \([a]_m\) to indicate a congruence class\(\pmod{n}\)). This makes sense, since if \(\gcd(a,mn)=1\), then \(\gcd(a,m)=1\) and \(\gcd(a,n)=1\).
By Theorem 10.14, we know given \(a \in \mathbb{Z}/m\mathbb{Z}\) and \(b \in \mathbb{Z}/n\mathbb{Z}\) there exists \(x\in \mathbb{Z}/mn\mathbb{Z}\) such that \(\varphi(x)=(a,b)\). Furthermore, \(x\) is unique in \(\mathbb{Z}/mn\mathbb{Z}\). Hence \(\varphi\) is bijective [for all \(([a]_m,[b]_n)\in U_m\times U_n\), there exists a unique \([x]\in U_{mn}\) such that \(\varphi([x]_{mn})=([a]_m,[b]_n)\) ]
Since \(\varphi\) is bijective, and \[\varphi([a]_{mn}[a']_{mn})=([aa']_m,[aa']_n) =([a]_m,[a]_n)([a']_m,[a']_n)=\varphi([a]_{mn})\varphi([a']_{mn}),\] \(\varphi\) is an isomorphism.□
We have an immediate corollary
If \(\gcd(m,n)=1\) then \(\varphi(mn)=\varphi(m)\varphi(n)\).