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,,p1},Zp=p1\mathbb{Z}_p^* = \{1,2,\cdots,p-1\}, \quad |\mathbb{Z}_p^*| = p-1

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

Now if mZm\in \mathbb{Z} and a=a= remainder of mm by pp, [a]Zp[a]\in \mathbb{Z}_p, implies mamodpm\equiv a\mod p.

Then mp1ap1modpm^{p-1}\equiv a^{p-1}\mod p.

So

Fermat’s little theorem

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

Corollary of Fermat’s little theorem

If mZm\in \mathbb{Z}, then mpmmodpm^p\equiv m\mod p.

Proof

If pmp|m, then mp10mmodpm^{p-1}\equiv 0\equiv m\mod p.

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

Example

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

401002100mod1940^{100}\equiv 2^{100}\mod 19

2100210mod192^{100}\equiv 2^{10}\mod 19 (Fermat’s little theorem 2181mod19,2901mod192^18\equiv 1\mod 19, 2^{90}\equiv 1\mod 19)

210(6)2mod1936mod1917mod192^10\equiv (-6)^2\mod 19\equiv 36\mod 19\equiv 17\mod 19


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

15=3515=3\cdot 5, therefore enough to show that 3(n33n)3|(n^{33}-n) and 5(n33n)5|(n^{33}-n).

Apply the corollary of Fermat’s little theorem to p=3p=3: n3nmod3n^3\equiv n\mod 3, (n3)11n11(n3)3n2=n3n2n3mod3nmod3(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(n33n)3|(n^{33}-n).

Apply the corollary of Fermat’s little theorem to p=5p=5: n5nmod5n^5\equiv n\mod 5, n30n3(n5)6n3n6n3n5mod5nmod5n^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(n33n)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={1xn: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)1modna^{\phi(n)}\equiv 1\mod n.

Euler’s Theorem

If mZm\in \mathbb{Z}, and gcd(m,n)=1gcd(m,n)=1, then mϕ(n)1modnm^{\phi(n)}\equiv 1\mod n.

Proof

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

Applications on solving modular equations

Solving equations of the form axbmodnax\equiv b\mod n.

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

Solution for 2x1mod32x\equiv 1\mod 3

  • x0    2x0mod3x\equiv 0\implies 2x\equiv 0\mod 3
  • x1    2x2mod3x\equiv 1\implies 2x\equiv 2\mod 3
  • x2    2x1mod3x\equiv 2\implies 2x\equiv 1\mod 3

So solution for 2x1mod32x\equiv 1\mod 3 is {3k+2kZ}\{3k+2|k\in \mathbb{Z}\}.

Theorem for existence of solution of modular equations

axbmodnax\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