I have the following problem: Let $\Gamma(n)$ denote the $2\times 2$ matrices with determinant $n$ and integer coefficients. Given $A,\hat{A} \in \Gamma(n)$ does there exist a $B \in \Gamma(1)= SL(2,\mathbb{Z})$ such that $A= B\hat{A}$?
I initially thought this is the case and have written down $A$ and $\hat{A}$ explicitly. It turned out that $B$ indeed has determinant $1$ but the coefficients are not necessarily integers. Can one impose certain restrictions on $A$ and $\hat{A}$ to get $B\in \Gamma(1)$ or are there just exceptional cases when this is true?
Thanks a lot for any ideas!
This is not an answer, but a comment, which might help to clarify the question. The set $\Gamma(n)$, as you have defined it, is not a group, because the inverse has integer coefficients if and only if the determinant is a unit in $\mathbb{Z}$, i.e., is $\pm 1$. Usually $\Gamma(n)$ is defined as a congruence subgroup. Explicitly it is described as follows: $$ {\displaystyle \Gamma (n)=\left\{{\begin{pmatrix}a&b\\c&d\end{pmatrix}}\in \mathrm {SL} _{2}(\mathbb {Z} ):a,d\equiv 1{\pmod {n}},b,c\equiv 0{\pmod {n}}\right\}} $$