# Representatives for the action on an unknown set of matrices by an unknown modular subgroup

Let $\Gamma$ be the modular group and $\mathcal M_n$ the set of all primitive matrices with determinant $n\geq1$. Recall that a primitive matrix has relatively prime entries.

The modular group $\Gamma$ acts on the set $\mathcal M _n$ from the left. The representatives of the orbits of this action can be chosen as

$$S(n)=\bigg \lbrace \begin{pmatrix}r &s\\0&t\end{pmatrix}:r>0,rt=n,(r,s,t)=1,0\leq s<t\bigg\rbrace.$$

One encounters this, for example, when studying the modular equation $\Phi_n(X,X)$. Cf. Zagier, p. 68.

Now consider a generalization of $S(n)$, namely

$$\mathcal{S}\left(n,d\right)=\bigg\lbrace \begin{pmatrix}r &s\\0&t\end{pmatrix}: r>0,rt=n,(r,t,s)=1,d \mid s, 0 \leq s < dt\bigg\rbrace.$$

These sets arise from the study of modular functions for certain subgroups of $\Gamma$ and their transformation equations.

My question is this: is there some set of matrices $\mathcal M_{n,d}$ and a subgroup $\Gamma_{n,d}\subset\Gamma$ such that $S(n,d)$ is a set of representatives for the orbits of the left action $\Gamma_{n,d}\backslash\mathcal M_n$?

This is a bit of a trivial example: take $$\mathcal{M}_{n,d} = \left\{ \begin{pmatrix} r & s \\ 0 & t \end{pmatrix} ~:~ rt = n, d \mid s,~ (r,t,n)=1 \right\}$$ and the subgroup $$\Gamma_{n,d} = \left\{ \begin{pmatrix} a & b \\ 0 & c \end{pmatrix}~:~ ac = 1,~d\mid b \right\} ~\subset~ \Gamma.$$ Another idea is to write $\mathcal{S}(n,d)$ as the quotient $$\mathcal{S}(n,d) = g\Gamma g^{-1}~\backslash~ g\mathcal{M}_n g^{-1}$$ for $$g =\begin{pmatrix} d & 0 \\ 0 & 1 \end{pmatrix},$$ but $g\Gamma g^{-1}$ is not a subgroup of $\Gamma$.