For $D$ a GCD domain , let $a,b,x \in D \setminus \{0\}$ , then is it true that $\gcd (ax,bx)=x \cdot \gcd (a,b)$? [duplicate]

Let $D$ be a GCD domain, and let $a,b,x \in D \setminus \{0\}$. Then is it true that $\gcd (ax,bx)=x \cdot \gcd (a,b)$ ?

Let $c=\gcd (a,b)$ and $d=\gcd(ax,bx)$, then as $cx|ax$ and $cx|bx$ so $cx|d$. We would be done if we could show $d|cx$, but I am unable to show that. Please help me to solve this problem.


Hint $\ $ By below $\,(a,b)\,$ and $\,(ax,bx)/x\,$ divide each other. See here for a few more proofs.

$\ c\mid(a,b)\!\iff\! c\mid a,b \!\iff\! cx\mid ax,bx \!\iff\! cx\mid (ax,bx) \!\iff\! c\mid (ax,bx)/x,\ $ for any $\,c.\,$


Since $x \mid ax $ and $x \mid bx$ it follows that $x \mid d $. The codivisor $dx^{-1}$ of $x$ in $d$, divides $(ax)x^{-1}=a$ and $(bx)x^{-1}=b$, thus $dx^{-1}$ divides $\gcd(a,b)=c$. Thus $d=(dx^{-1})x$ divides $cx$.