System of equations - modular arithmetic

119 Views Asked by At

I am asked to solve the following..... Let $n\in \mathbb{N}$ and suppose that $a,b,c,d,k,l\in\mathbb{Z}$. Consider the system $ax + by \equiv k$ mod $n$ and $cx+dy \equiv l$ mod $n$. Let $D=ad-bc$. Show that if $hcf(D,n)=1$ then the system has a solution.

There were previous parts to the question, in which I showed $ax\equiv b$ mod $n$ has a solution iff $hcf(a,n)|b$. But I have no idea how to proceed with this, I tried using the Euclidean algorithm to write $1=Ds+nr$ for $r,s\in\mathbb{Z}$ but it didn't seem to help much. If any of you wonderful people could help me out, I will very much appreciate it. Thank you.