Suppose $p$ and $q$ are distinct odd primes. Prove that $\gcd(p+q, p-q) = 2$.
I had figured out that $d$ divides $2p$ and $d$ divides $2q$, but I did not recognize to use coprimeness and divisibility (CAD) to get that $d = 2$.
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It only takes a minute to sign up.
Sign up to join this communitySuppose $p$ and $q$ are distinct odd primes. Prove that $\gcd(p+q, p-q) = 2$.
I had figured out that $d$ divides $2p$ and $d$ divides $2q$, but I did not recognize to use coprimeness and divisibility (CAD) to get that $d = 2$.
Let $d=\text{gcd}(p+q,p-q)$. Then $d$ divides both $p+q$ and $p-q$, so it divides their sum, which is $2p$. But it also divides their difference, which is $2q$. As $\text{gcd}(p,q)=1$, we must have $d=2$.
Hint $\, $ The linear map $\rm\ (x,y)\mapsto (x+y,x-y)\ $ has determinant $ = \color{#c00}2.\ $ Therefore, from the proof below, we deduce that $\rm\ \gcd(x+y,x-y)\mid \color{#c00}2\, \gcd(x,y)\,\ (\,= \color{#c00}2\ \ if\ \ \gcd(x,y) = 1).$
Inverting a general linear map by Cramer's Rule (multiplying by the adjugate) yields
$$\rm\begin{pmatrix} a & \rm b \\\\ \rm c & \rm d \end{pmatrix}\ \begin{pmatrix} x \\\\ \rm y \end{pmatrix}\ =\ \begin{pmatrix} X \\\\ \rm Y\end{pmatrix}\ \ \ \Rightarrow\ \ \ \begin{array} \rm\Delta\ x\ \ \ =\ \ \ \rm d\ X - b\ Y \\\\ \rm\Delta\ y\ =\ \rm -c\ X + a\ Y \end{array}\ ,\quad\ \Delta\ =\ ad-bc $$
Therefore $\rm\ n\ |\ X,Y\ \Rightarrow\ n\ |\ \Delta\:x,\:\Delta\:y\ \Rightarrow\ n\ |\ gcd(\Delta\:x,\Delta\:y)\ =\ \Delta\ gcd(x,y)\:.$
So, in particular, if $\rm\:gcd(x,y) = 1\:$ and $\rm\:\Delta\:$ is prime, we conclude that $\rm\:gcd(X,Y) = 1\:$ or $\rm\:\Delta\:.$
Your problem is simply the special case $\rm\ a = c = d = 1,\ b = -1\ \Rightarrow\ \Delta = ad-bc = 2\:.$
This has a very nice arithmetical interpretation in terms of Gaussian integer arithmetic, where the linear map is simply multiplication by $\rm\, 1 + {\it i}.\ $ See this answer for details.
$$(p+q,p-q)=d\Longrightarrow d\mid p+q\;\;\text{and}\;\;d\mid p-q$$Adding we have $$d\mid p+q+p-q\Longrightarrow d\mid 2p$$As $(d,p)=1$ then $d=2$