Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

That is, why is $\varphi (A\cdot B)=\varphi (A)\cdot \varphi (B)$, if A and B are coprime? It's not just a technical trouble—I can't see why this should be, intuitively: I bellyfeel that its multiplicativity should be an approximation at most. And why the minimum value for $\varphi (n)$ should be $ \frac{4n}{15} $ completely passes me by.

share|improve this question
What is $\Phi$? –  Chris Eagle Sep 7 '12 at 17:41
Then the result is clearly false: $\varphi(4)=2\neq 1=\varphi(2)\cdot \varphi(2)$. –  Chris Eagle Sep 7 '12 at 17:42
@Chris: It’s multiplicative in the usual number-theoretic sense: if $m$ and $n$ are relatively prime, $\varphi(mn)=\varphi(m)\varphi(n)$. –  Brian M. Scott Sep 7 '12 at 17:44
Hint: Think chinese remainder theorem. If $a,b$ are relatively prime, then $\gcd(n,ab)=1$ if and only if $\gcd(n,a)=\gcd(n,b)=1$ –  Thomas Andrews Sep 7 '12 at 17:44
"I bellyfeel ..." I love this. I think I'm going to start using it. –  Matt Sep 7 '12 at 17:47

7 Answers 7

up vote 14 down vote accepted

In general, if $R$ and $S$ are rings, then $R\times S$ is a ring. The units of $R\times S$ are the elements $(r,s)$ with $r$ a unit of $R$ and $s$ a unit of $S$. If $R$ and $S$ are finite rings, the number of units in $R\times S$ is therefore the number of units in $R$ times the number of units in $S$.

Now if $\gcd(A,B)=1$, then $$\mathbb Z/\left<AB\right> \cong \mathbb Z/\left<A\right> \times \mathbb Z/\left<B\right>$$

This is essentially the Chinese remainder theorem.

But the number of units in the ring $\mathbb Z/\left<n\right>$ is $\phi(n)$. So the number of units in $\mathbb Z/\left<AB\right>$ is $\phi(AB)$ and the number of units in $\mathbb Z/\left<A\right> \times \mathbb Z/\left<B\right>$ is $\phi(A)\phi(B)$

share|improve this answer
I'm not sure why I accepted this answer, I have no background in rings. Can you point me to a source (on the internet, ideally) using which I could understand this answer? [sorry for reposting, tried to un-outedit the @ Thomas Andrews] –  Alyosha Feb 2 '13 at 20:26
Can you prove this using only the Chinese Remainder Theorem? I don't think there's a need to resort to rings. Many of the people finding this answer on google will be lowly computer scientists with no knowledge of rings but need the totient function for use in asymmetric encryption. –  Callum Rogers Feb 12 '13 at 18:11
Yeah, I wouldn't have picked this as the best answer, either, because it is fairly abstract. I just wanted to add the argument because it clarifies things for a lot of people, but, as you say, it probably obscures more than it clarifies for beginners. –  Thomas Andrews Feb 12 '13 at 19:16

In general, you're right that $\Phi(AB)\neq\Phi(A)\Phi(B)$--for example, $\Phi(8)=4$, but $\Phi(2)=1$ and $\Phi(4)=2$. At best, we can usually only say that $\Phi(AB)\geq\Phi(A)\Phi(B)$. We will have equality when (and only when) $A,B$ are coprime, though.

Let $R_1,R_2$ be rings, and note that $R_1\times R_2$ is also a ring with componentwise addition and multiplication. A given $(x_1,x_2)\in R_1\times R_2$ has a multiplicative inverse if and only if the $x_k$ have multiplicative inverses in $R_k$.

Note that integers $A,B$ are coprime if and only if there exist integers $X,Y$ such that $AX+BY=1$ if and only if $A$ has a multiplicative inverse modulo $B$ and $B$ has one modulo $A$. Thus, there are precisely $\Phi(A)$ elements of $\Bbb Z/A\Bbb Z$ having multiplicative inverse.

By the above discussion, $\Bbb Z/AB\Bbb Z$ will have $\Phi(AB)$ elements with multiplicative inverses, and $(\Bbb Z/A\Bbb Z)\times(\Bbb Z/B\Bbb Z)$ will have $\Phi(A)\Phi(B)$ such elements.

The only thing left to prove is that there is a bijection (in fact, an isomorphism) between $\Bbb Z/AB\Bbb Z$ and $(\Bbb Z/A\Bbb Z)\times(\Bbb Z/B\Bbb Z)$. That $A,B$ are coprime is crucial to the proof, so be sure you use it! I'd start with the natural homomorphism $\Bbb Z\to(\Bbb Z/A\Bbb Z)\times(\Bbb Z/B\Bbb Z)$ given by $X\mapsto(X\,mod\, A,X\, mod\, B)$, which readily has kernel $AB\Bbb Z$, and then use the coprimality of $A,B$ to show surjectivity, so the desired conclusion follows by First Isomorphism Theorem.

Edit: Your addendum is incorrect. The $\frac{4n}{15}$ lower bound is obtained when we're looking at the first $100$ values of $\Phi(n)$--attained by $30,60,90$, but it is misleading. There are numbers beyond it that fall below that bound, such as $210$. There is in fact no lower bounding straight line of positive slope through the origin that applies to all the integers.

share|improve this answer

This just addresses the erroneous notion that $\frac{\varphi(n)}n$ has a positive lower bound, but it’s too long for a comment.

If $m_n=p_1\dots p_n$ is the product of the first $n$ primes, then $\varphi(m_n)=\prod\limits_{k=1}^np_k\left(1-\frac1{p_k}\right)$, and $$\frac{\varphi(m_n)}{m_n}=\prod_{k=1}^n\left(1-\frac1{p_k}\right)\;.$$

Consider the reciprocal,

$$\begin{align*} \frac{m_n}{\varphi(m_n)}&=\prod_{k=1}^n\left(\frac1{1-p_k^{-1}}\right)\\ &=\prod_{k=1}^n\sum_{i\ge 0}\frac1{p_k^i}\\ &\ge\prod_{k=1}^n\left(1+\frac1{p_k}\right)\;. \end{align*}$$

For positive $a_k$ the infinite product $\prod_{k\ge 1}(1+a_k)$ converges iff the series $\sum_{k\ge 1}a_k$ converges, and it’s well known that $\sum_{k\ge 1}\frac1{p_k}$ diverges, so $\lim_{n\to\infty}\frac{m_n}{\varphi(m_n)}\to\infty$, and therefore $\lim_{n\to\infty}\frac{\varphi(m_n)}{m_n}=0$.

share|improve this answer

If $n=p_1^{a_1}p_2^{a^2} \dots p_r^{a_r}$ with the $p_i$ distinct primes (eg in increasing order to get a canonical form) and the $a_i$ positive integers, then we have:$$\phi(n)=n\left(1-\frac1{p_1}\right)\left(1-\frac1{p_2}\right)\dots\left(1-\frac1{p_r}\right)$$ (worth working out for yourself) - then if $m$ and $n$ are co-prime they bring in different factors for their respective prime divisors and the multiplicativity is easy to see. If you bear in mind that the sum of the reciprocals of primes is unbounded, you will be able to see that you can make the prime bit of the product as small as you like (eg take logs), so that $\frac{\phi(n)}n$ can be made as small as possible. You will even be able to choose values of $n$ which make this fraction particularly small. I mention this expression for $\phi(n)$ because it is the one which has most aided my intuition.

share|improve this answer
Thank you- at long last it's clicked! –  Alyosha Apr 2 '13 at 19:14

THM Assume that $(a,b)=1$. Then $$(a,x)=1 \text{ and } (b,y)=1\iff (ax+by,ab)=1$$

P We prove the contrapositive of each direction.

$(\Rightarrow)$ Suppose thus that there is a prime $p$ such that $p\mid (ax+by,ab)$. Then $p\mid ab$. Without loss of generality, assume $p \mid a$. Since $p\mid ax+by$, we have $p\mid by$, and since $(a,b)=1$, $p\mid y$. Thus $p\mid (a,y)\implies (a,y)>1$. We have thus proven, under the hypothesis that $(a,b)=1$; that $$(ax+by,ab)>1\implies (a,y)>1 \text{ or } (b,x)>1$$ since the other option would have been assuming that $p\mid a$.

$(\Leftarrow)$ Now suppose $(x,b)>1$. Then $(ax+by,ab)>1$ since $(x,b)\mid ax+by$. Analogously, $(a,y)>1$ implies $(ax+by,ab)>1$. $\blacktriangle$

COR Suppose that $(a,b)=1$, and that $x$ ranges through the $\phi(b)$ numbers coprime to $b$ and $y$ ranges throughout the $\phi(a)$ numbers coprime to $a$. Then $ax+by$ ranges throughout the $\phi(a)\cdot\phi(b)$ numbers coprime to $ab$, which in turn is $\phi(a\cdot b)$.

share|improve this answer

$n = \prod_{k=1}^{z}p_{k}^{e_{k}}$
$\varphi(n) = n \prod_{k=1}^{z}(1-\frac{1}{p_{k}})$
Let $a=\prod_{k=1}^{w} p_{k}^{e_{k}}$
Let $b=\prod_{k=w+1}^{z} p_{k}^{e_{k}}$
$\varphi(a) = a\prod_{k=1}^{w}(1-\frac{1}{p_{k}})$
$\varphi(b) = b\prod_{k=w+1}^{z}(1-\frac{1}{p_{k}})$
$\varphi(a)\varphi(b) = ab\prod_{k=1}^{w}(1-\frac{1}{p_{k}}) \cdot \prod_{k=w+1}^{z}(1-\frac{1}{p_{k}})$
$\varphi(a)\varphi(b) = ab\prod_{k=1}^{z}(1-\frac{1}{p_{k}})$
$\varphi(a)\varphi(b) = n\prod_{k=1}^{z}(1-\frac{1}{p_{k}})$
$\varphi(a)\varphi(b) =\varphi(n)$
$\varphi(a)\varphi(b) =\varphi(ab)$

share|improve this answer
@CheltonEvans If both accounts that edited this question (Chelton Evans and Chelton) belong to you, you might try to merge them as described here. –  Martin Sleziak Nov 28 '13 at 9:25

If you already know the formula $$\varphi(n)=n\prod_{p\mid n}\left(1-\frac1p\right)$$ then the rest is easy.

(The above formula can be shown using principle of inclusion and exclusion.)

However, many texts prove first that $\varphi$ is multiplicative and then use this fact to derive the above formula.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.