Proving $\phi(m)|\phi(n)$ whenever $m|n$ Show that $\varphi(m)|\varphi(n) $ whenever $m|n$.
I  am stuck after writing the formula. I know that if $m$ divides $n$, that means one of the prime factors of $n$ would include $m$ or a multiple of $m$.
$$
\varphi(n)=n\prod_{i=1}^{k}\Bigl(1-\frac{1}{p_{i}}\Bigr) 
$$
 A: You can use your formula and the fact that $\;m\mid n\iff \;$ all primes that divide $\;m\;$ also divide $\;n\;$ (when "all the primes" means each and every prime with its respective multiplicity), and then
$$m\mid n\implies n=km\;,\;\;k\in\Bbb N\implies \varphi(n)=n\prod_{p\mid n}\left(1-\frac1p\right)=\varphi(km)=km\prod_{p\mid km}\left(1-\frac1p\right)$$
and since for every prime $\;p\;$ that divides $\;m\;$ we also have it divides $\;n\;$ , we get that the product in the right divides the product in the left.
A: We shall employ of a general formula, for which a proof is provided below, to prove this.
For $m, n\in\mathbb N,$ define $P=\prod_{p\mid(m,n)}p,$ where $(m,n)$ is the greatest common divisor of $m$ and $n.$  

Then we have $$\frac{\phi(mn)}{\phi(m)\phi(n)}=\frac{P}{\phi(P)}.$$  

Let us describe first how to arrive at our conclusion with this formula:
Write $n=mk;$ and write $k$ as a product of primes $k=\prod p_i.$ For any $i,$ if $p_i$ is prime to $m,$ then our formula says that $\phi(mp_i)=\phi(m)\phi(p_i)$ is divisible by $\phi(m).$ If $p_i$ divides $m,$ then $\phi(mp_i)=\phi(m)\phi(p_i)\frac{p_i}{\phi(p_i)}=\phi(m)p_i$ is still divisible by $\phi(m),$ thus we conclude that $\phi(m)\mid\phi(mp_1)\mid\cdots\mid\phi(n).$ Q.E.D.
The following proof for the formula is unorthodox; the easiest poof I know is to reduce to the case where $m, n$ are powers of a prime by the multiplicativity of $\phi,$ and then to conclude by counting elements. But I would like to deduce this formula simply from the Chinese remainder theorem and basic group theory, so the proof becomes a little more complicated.
First we need a decomposition:
For any pair $m, n$ as above, we can write $m=m_1m_p, n=n_1n_p,$ where the integers $m_1, m_p$ are characterised by three properties:
I. $(m_1,m_p)=(m_1,P)=1$
II.$P\mid m_p$
III.If $k\mid m$ and $(k,P)=1,$ then $k\mid m_1,$
and similarly for $n_1, n_p.$
Now define three groups:  $X=(\mathbb Z/mn\mathbb Z)^*, Y=(\mathbb Z/m\mathbb Z)^*\times(\mathbb Z/n\mathbb Z)^*, Z=(\mathbb Z/P\mathbb Z)^*.$
For every $k+P\mathbb Z\in Z$ with $0\lt k\lt P,$ by Chinese remainder theorem, there exists a unique $g_1(k)\in(\mathbb Z/m\mathbb Z)^*$ such that $\begin{cases}g_1(k)\equiv k\pmod{m_p}\\g_1(k)\equiv1\pmod{m_1}\end{cases};$ similarly $\exists$ a unique $g_2(k)\in(\mathbb Z/n\mathbb Z)^*$ such that $\begin{cases}g_2(k)\equiv k\pmod{n_p}\\g_2(k)\equiv1\pmod{n_1}\end{cases}.$ Define $g(k+P\mathbb Z)=(g_1(k),g_2(k))\in Y.$
If $g(k_1)=g(k_2),$ then $k_1\equiv g_1(k_1)=g_1(k_2)\equiv k_2\pmod{m_p}$ shows that $k_1=k_2$ in $\mathbb Z/P\mathbb Z,$ so $g$ is injective, and we can view $Z$ as a subgroup of $Y$ by means of $g.$
Further define $h':Y\rightarrow(\mathbb Z/(m,n)\mathbb Z)^*=:A$ as $h'(a\pmod m,b\pmod n)=ab^{-1}$ where the inverse is taken in $A.$ From our three conditions we can deduce that $(m,n)=(m_p,n_p),$ thus $g_1(k)/g_2(k)\equiv1\pmod{(m,n)}, \forall k\in Z.$ Hence $h'$ induces a homomorphism $h:Y/g(Z)\rightarrow A.$ For each $a+(m,n)\mathbb Z\in A,$ by Chinese remainder theorem again, there exists a unique $k\in(\mathbb Z/m\mathbb Z)^*$ such that $\begin{cases}k\equiv a\pmod {m_p}\\k\equiv 1\pmod {m_1}\end{cases}$ so that $a+(m,n)\mathbb Z=h'(k,1).$ Hence $h$ is surjective.
Moreover, define $f:X\rightarrow Y/Z$ as $f(a+mn\mathbb Z)=(a+m\mathbb Z,a+n\mathbb Z).$ it is clear that $\text{Im}(f)\subseteq\text{Ker}(h).$ Conversely, if $y=(a+m\mathbb Z,b+n\mathbb Z)Z$ satisfies $h(y)=1,$ then $a\equiv b\pmod{(m,n)}.$ As $(m,n)=(m_p,n_p),$ there exist $r, s\in\mathbb Z$ such that $a-b=rm_p+sn_p.$ Let $e=a-rm_p=b+sn_p.$ Since $\begin{cases}e\equiv a\pmod{m_p}\\e\equiv b\pmod{n_p}\end{cases},$ we find that $e$ is prime to both $m_p$ and $n_p,$ hence $(e,m_pn_p)=1.$ Moreover, as $(m_1,n_1)=1,$ there is $c\in\mathbb Z,$ prime to $m_1n_1$ such that $\begin{cases}c\equiv a\pmod{m_1}\\c\equiv b\pmod{n_1}\end{cases}.$ Finally, by way of Chinese remainder theorem once again, for $(m_1n_1,m_pn_p)=1,$ there exists $d\in\mathbb{Z}$ with $\begin{cases}d\equiv c\pmod{m_1n_1}\\d\equiv e\pmod{m_pn_p}\end{cases}.$ One then verifies that $f(d+mn\mathbb{Z})=y.$ Thus $\text{Im}(f)=\text{Ker}(h).$
We summarise what wa have proved by the exact sequence $$0\rightarrow\text{Ker}(f)\rightarrow X\rightarrow Y/g(Z)\rightarrow A\rightarrow0.$$
Now $\text{Ker}(f)=\{x=a+mn\mathbb{Z}\in X\mid f(x)\in g(Z)\}$ and $f(x)=g(k)$ for some $k$ if and only if $\begin{cases}a\equiv k\pmod{m_p}&a\equiv k\pmod{n_p}\\a\equiv 1\pmod{m_1}&a\equiv1\pmod{n_1}\end{cases}.$ This is equivalent with $\begin{cases}a\equiv k\pmod{\text{lcm}(m_p,n_p)}\\a\equiv1\pmod{m_1n_1}\end{cases}.$ Hence, for a given $k,$ there are exactly $m_pn_p/\text{lcm}(m_p,n_p)=(m_p,n_p)$ such $a$ with $f(x)=g(k).$ Consequently, $\mid\text{Ker}(f)\mid=\phi(P)(m_p,n_p)=\phi(P)(m,n).$
A final observation: for $1\leq k_0\leq P-1,$ there are $\frac{(m,n)}{P}$ many $a\in(\mathbb Z/(m,n)\mathbb Z)$ with $a\equiv k_0\pmod{(m,n)}.$ Further, if $k_0$ is prime to $P,$ then, for each of these $a$ is of the form $k_0+rP$, every such $a$ is prime to $P,$ hence prime to $(m,n)=(m_p,n_p).$ And each integer prime to $(m,n)$ is congruent to one of such $a.$  This shows that $\frac{(m,n)}{P}=\frac{\phi((m,n))}{\phi(P)}.$ Thus $\mid\text{Ker}(f)\mid=(m,n)\phi(P)=\phi((m,n))P.$
Therefore one concludes that
$$\frac{\phi(m)\phi(n)}{\phi(P)}=\mid Y/g(Z)\mid=\mid A\mid\times\mid X/\text{Ker}(f)\mid=\phi((m,n))\times\mid X\mid/\mid\text{Ker}(f)\mid=\mid X\mid/P=\phi(mn)/P.$$
Hope this helps.
