Proof that $\gcd(ax+by,cx+dy)=\gcd(x,y)$ if $ad-bc= \pm 1$

Here is a proof. Call $z=(x,y)$ and $p=(m,n)$. The expressions of $m$ and $n$ as integer linear combinations of $x$ and $y$ show that $z$ divides $m$ and $n$ hence $z$ divides $p$ by definition of the gcd. On the other hand, $\pm x=dm-bn$ and $\pm y=cm-an$ hence the same argument used "backwards" shows that $p$ divides $\pm x$ and $\pm y$, which implies that $p$ divides $z$, end of proof.


Hint: Any common factor of $x$ and $y$ clearly divides both $m$ and $n$, because if $f\mid x$ and $f\mid y$, then also $f\mid ax+by$ et cetera.

The task at hand is to prove the reverse fact: any common factor of $m$ and $n$ also divides $x$ and $y$. One way of seeing this follows from the matrix equation $$ \left(\begin{array}{c}m\\n\end{array}\right)= \left(\begin{array}{cc}a&b\\c&d\end{array}\right)\left(\begin{array}{c}x\\y\end{array}\right). $$

Does anything about the given condition on $ad-bc$ help you with the inverse of the above $2\times2$ matrix?


Hint $ $ (excerpted from my answer to a similar question a few months ago) $ $ Generally, inverting a linear map by Cramer's Rule, i.e. $\rm\color{#0a0}{scaling}$ by the $\rm\color{#c00}{adjugate}$ yields

$$\begin{align} \rm\color{#c00}{\begin{bmatrix}\rm d &\!\!\! \rm -b \\ \!\!\!\!\rm -c & \rm a \end{bmatrix}} \color{#0a0}\times&\, \left\{\, \begin{bmatrix}\rm a & \rm b \\ \rm c & \rm d \end{bmatrix} \begin{bmatrix} \rm x \\ \rm y \end{bmatrix} = \begin{bmatrix}\rm X \\ \rm Y\end{bmatrix}\, \right\}\\[.2em] \Longrightarrow &\,\qquad\qquad\ \ \begin{array}\ \rm\Delta\ x\ =\, \ \ \rm \color{#c00}d\ X \color{#c00}{- b}\ Y \\ \rm\Delta\ y\ = \rm \color{#c00}{-c}\ X + \color{#c00}a\ Y \end{array}^{\phantom{|}} ,\ \ \ \ \rm \Delta\ :=\ \color{#c00}{ad-bc} \end{align}\qquad$$

Hence $\rm\ n\ |\ X,Y\ \Rightarrow\ n\ |\ \Delta\:x,\Delta\:y\ \Rightarrow\ n\ |\ gcd(\Delta\:x,\Delta\:y)= \Delta\ gcd(x,y)\,$ by here & here.