I have been self studying Apostol's Dirichlet Series and Modular Forms and I am stuck on Theorem 2.8 on page 40.
It says it is clear that every rational function of J is a modular function.
I don't know how to prove the second part of definition of modular functions, i.e., that $f(A\tau ) = f(\tau)$ for all $A$ in modular group $\Gamma$.
First, $J(A\tau)=J(\tau)$ for all $A\in\Gamma$ since $J$ is modular. Now, a rational function on $J$ is just a quotient of the form $$F(\tau)=\frac{\sum_na_nJ(\tau)^n}{\sum_mb_mJ(\tau)^m}$$ so $$F(A\tau)=\frac{\sum_na_nJ(A\tau)^n}{\sum_mb_mJ(A\tau)^m} =\frac{\sum_na_nJ(\tau)^n}{\sum_mb_mJ(\tau)^m}=F(\tau)$$