Suppose that $0\leq a,b,c,d\leq p-1$, where $p$ is a prime. Then how many solution are there to $ad\equiv bc \bmod p$?
We can work out the case $p=2$. Suppose that $p>2$.
My approach is this:
- Case I: One of $a$ or $b$ is $0$. WLOG assume $a=0$. Then $bc \equiv 0 \bmod p$ and hence $b$ or $c=0$. There are $2\times p \times 2 \times p=4p^2 $ ways to form $(a,b,c,d)$.
- Case II: None of $a \text{ or } b$ is $0$. Then $b,c\not = 0$(otherwise, $ad\equiv 0 \bmod p$ which would mean $a$ or $d$ is $0$.
I did not really get any further and just noticed that $ad \equiv ad \equiv da \equiv (p-d)(p-a) \bmod p$ which is fine but I can't say these are the only solutions.
I would appreciate a hint. Thanks.