Skip to Content
Math4302Modern Algebra (Lecture 26)

Math4302 Modern Algebra (Lecture 26)

Rings

Fermat’s and Euler’s Theorems

Recall from last lecture, we consider Zp\mathbb{Z}_p and Zp∗\mathbb{Z}_p^* denote the group of units in Zp\mathbb{Z}_p with multiplication.

Zp∗={1,2,⋯ ,p−1},∣Zp∗∣=p−1\mathbb{Z}_p^* = \{1,2,\cdots,p-1\}, \quad |\mathbb{Z}_p^*| = p-1

Let [a]∈Zp∗[a]\in \mathbb{Z}_p^*, then [a]p−1=[1][a]^{p-1}=[1], this implies that ap−1mod  p=1a^{p-1}\mod p=1.

Now if m∈Zm\in \mathbb{Z} and a=a= remainder of mm by pp, [a]∈Zp[a]\in \mathbb{Z}_p, implies m≡amod  pm\equiv a\mod p.

Then mp−1≡ap−1mod  pm^{p-1}\equiv a^{p-1}\mod p.

So

Fermat’s little theorem

If pp is not a divisor of mm, then mp−1≡1mod  pm^{p-1}\equiv 1\mod p.

Corollary of Fermat’s little theorem

If m∈Zm\in \mathbb{Z}, then mp≡mmod  pm^p\equiv m\mod p.

Proof

If p∣mp|m, then mp−1≡0≡mmod  pm^{p-1}\equiv 0\equiv m\mod p.

If p∤mp\not|m, then by Fermat’s little theorem, mp−1≡1≡mmod  pm^{p-1}\equiv 1\equiv m\mod p, so mp≡mmod  pm^p\equiv m\mod p.

Example

Find the remainder of 4010040^{100} by 1919.

40100≡2100mod  1940^{100}\equiv 2^{100}\mod 19

2100≡210mod  192^{100}\equiv 2^{10}\mod 19 (Fermat’s little theorem 218≡1mod  19,290≡1mod  192^18\equiv 1\mod 19, 2^{90}\equiv 1\mod 19)

210≡(−6)2mod  19≡36mod  19≡17mod  192^10\equiv (-6)^2\mod 19\equiv 36\mod 19\equiv 17\mod 19


For every integer nn, 15∣(n33−n)15|(n^{33}-n).

15=3⋅515=3\cdot 5, therefore enough to show that 3∣(n33−n)3|(n^{33}-n) and 5∣(n33−n)5|(n^{33}-n).

Apply the corollary of Fermat’s little theorem to p=3p=3: n3≡nmod  3n^3\equiv n\mod 3, (n3)11≡n11≡(n3)3n2=n3n2≡n3mod  3≡nmod  3(n^3)^11\equiv n^{11}\equiv (n^3)^3 n^2=n^3 n^2\equiv n^3\mod 3\equiv n\mod 3.

Therefore 3∣(n33−n)3|(n^{33}-n).

Apply the corollary of Fermat’s little theorem to p=5p=5: n5≡nmod  5n^5\equiv n\mod 5, n30n3≡(n5)6n3≡n6n3≡n5mod  5≡nmod  5n^30 n^3\equiv (n^5)^6 n^3\equiv n^6 n^3\equiv n^5\mod 5\equiv n\mod 5.

Therefore 5∣(n33−n)5|(n^{33}-n).

Euler’s totient function

Consider Z6\mathbb{Z}_6, by definition for the group of units, Z6∗={1,5}\mathbb{Z}_6^*=\{1,5\}.

ϕ(n)=∣Zn∗∣=∣{1≤x≤n:gcd(x,n)=1}∣\phi(n)=|\mathbb{Z}_n^*|=|\{1\leq x\leq n:gcd(x,n)=1\}|

Example

ϕ(8)=∣{1,3,5,7}∣=4\phi(8)=|\{1,3,5,7\}|=4

If [a]∈Zn∗[a]\in \mathbb{Z}_n^*, then [a]ϕ(n)=[1][a]^{\phi(n)}=[1]. So aϕ(n)≡1mod  na^{\phi(n)}\equiv 1\mod n.

Euler’s Theorem

If m∈Zm\in \mathbb{Z}, and gcd(m,n)=1gcd(m,n)=1, then mϕ(n)≡1mod  nm^{\phi(n)}\equiv 1\mod n.

Proof

If aa is the remainder of mm by nn, then m≡amod  nm\equiv a\mod n, and gcd⁡(a,n)=1\operatorname{gcd}(a,n)=1, so mϕ(n)≡aϕ(n)≡1mod  nm^{\phi(n)}\equiv a^{\phi(n)}\equiv 1\mod n.

Applications on solving modular equations

Solving equations of the form ax≡bmod  nax\equiv b\mod n.

Not always have solution, 2x≡1mod  42x\equiv 1\mod 4 has no solution since 11 is odd.

Solution for 2x≡1mod  32x\equiv 1\mod 3

  • x≡0  ⟹  2x≡0mod  3x\equiv 0\implies 2x\equiv 0\mod 3
  • x≡1  ⟹  2x≡2mod  3x\equiv 1\implies 2x\equiv 2\mod 3
  • x≡2  ⟹  2x≡1mod  3x\equiv 2\implies 2x\equiv 1\mod 3

So solution for 2x≡1mod  32x\equiv 1\mod 3 is {3k+2∣k∈Z}\{3k+2|k\in \mathbb{Z}\}.

Theorem for existence of solution of modular equations

ax≡bmod  nax\equiv b\mod n has a solution if and only if gcd⁡(a,n)∣b\operatorname{gcd}(a,n)|b and in that case the equation has dd solutions in Zn\mathbb{Z}_n.

Proof on next lecture.

Last updated on