Counting 2x2 integer matrices with a given determinant

Jonathan Chapman, Akshat Mudgal

公開日: 2025/9/24

Abstract

Given positive integers $h, N$ satisfying $1 \leqslant h \leqslant 2N^2$, we define $T(h,N)$ to be the number of $2\times 2$ integer matrices with determinant equal to $h$ whose entries lie in $[-N,N]$. Our first result states that for any $\varepsilon >0$, one has \[ T(h,N) = \frac{16}{\zeta(2)} N^2 \bigg( \sum_{d |h} \frac{1}{d} \bigg) + O_{\varepsilon}(N^{\varepsilon} (N+ h)).\] This quantitatively improves upon recent work of Afifurrahman and Ganguly--Guria. We further show that when $N^{1 + \delta} \leqslant h \leqslant 2N^2$ for any fixed $\delta>0$, the error term above is of roughly the right order. Our second result delivers an asymptotic formula for $T(h,N)$ with square-root cancellation whenever $h = N^2 + O(N)$. This error term is much stronger than its corresponding analogue in the smoothened version of this problem. More generally, for any $\varepsilon >0$ and any $N,h \in \mathbb{N}$ with $1\leq h \leq 2N^2$, we prove that \[ T(h,N) = \bigg( \frac{8}{\zeta(2)} - 4 \bigg)N^2 \bigg( \sum_{d |h} \frac{1}{d} \bigg) + O_{\varepsilon}(N^{\varepsilon}(N+ |h-N^2|)). \]

Counting 2x2 integer matrices with a given determinant | SummarXiv | SummarXiv