TITLE: Action of SL(2,Z) on upper triangular primitive integer matrices of determinant N, from the right. Is it transitive?
QUESTION [13 upvotes]: I am porting this question across from StackExchange, since it has received no answers and perhaps is sufficiently deep to fit here. 
I am considering the set of upper triangular matrices
$$D_N=\left\{\begin{pmatrix}a&b\\0&d\end{pmatrix}:a,b,d\in\mathbb{Z}, ad=N, \gcd(a,b,d)=1, 0\leq b<d\right\}.$$
Standard facts tell us that this is a set of representatives for $M_N$ under the action of $\operatorname{SL}_2(\mathbb{Z})$ from the left.  ($M_N$ being the set of primitive integer matrices of determinant $N$.)
There is also an action of $\operatorname{SL}_2(\mathbb{Z})$ on $D_N$ from the right.  
Namely, given $g\in D_N$ and $\gamma\in\operatorname{SL}_2(\mathbb{Z})$, the matrix $g\gamma$ is still a primitive integer matrix of determinant $N$, and hence takes the form $\gamma' h$ for some $\gamma'\in\operatorname{SL}_2(\mathbb{Z})$ and unique $h\in D_N$.  So let $\gamma$ act on $D_N$ by sending each $g$ to the corresponding $h$.
The question is: is this action transitive?  I thought this was a standard fact, and one seems to need it to prove that the $N$th modular polynomial $\Phi_N$ is irreducible (among other things).
However, I can't seem to find a reference for it, and after struggling for a time to prove it, I am increasingly pessimistic - it seems to rely on some properties of the "3-variable Euclidean algorithm" that I'm not certain I believe in.
(It would be enough to know, for instance, that one can write
$$a\lambda m + bmn + dn\mu=1,$$
for some integers $\lambda, \mu,m,n$, but this doesn't seem particularly likely to hold in general - the Euclidean algorithm gets us close to this but not quite there.)

REPLY [7 votes]: Let me add another proof that highlights a connection with the Hecke congruence subgroup $\Gamma_0(N)$.
Let me abbreviate $\Gamma:=\operatorname{SL}_2(\mathbb{Z})$. We would like to know if the right action of $\Gamma$ on $\Gamma\backslash M_N$ is transitive. The size of the orbit of a coset $\Gamma g$ (where $g\in M_N$) equals the index of its stabilizer $(\Gamma:\Gamma\cap g^{-1}\Gamma g)$. Let us specify $g:=\left(\begin{smallmatrix} N&0 \\ 0&1 \end{smallmatrix}\right)\in M_N$. Then a quick calculation reveals that the stabilizer $\Gamma\cap g^{-1}\Gamma g$ is precisely $\Gamma_0(N)$, whence the orbit has size $(\Gamma:\Gamma_0(N))$. However, this index is known to be equal to the cardinality of $D_N$, so the action is transitive.
Added. The lastly mentioned fact has several proofs. One natural proof is to take a set of representatives of $\Gamma_0(N)\backslash\Gamma$ which has the same cardinality as $D_N$. Here is an explicit construction. For any decomposition $N=ad$, take a set of integers $c$ coprime with $a$ which represent all residue classes $b$ mod $d$ satisfying $\gcd(a,b,d)=1$; this is possible by an application of the Chinese remainder theorem. Extend the resulting pairs $(c,a)\in\mathbb{Z}^2$ to matrices $\left(\begin{smallmatrix} \ast &\ast \\ c&a \end{smallmatrix}\right)\in\Gamma$, then these matrices will represent $\Gamma_0(N)\backslash\Gamma$.