# Can we always write $gcd(x,y)$ as $ax+by$ in UFD?

Let $R$ be a commutative ring with unity. Now assume that $R$ is Unique Factorization Domain, but not necessarily Principal Ideal Domain.

Question: Let $x,y\in R$ be such that their GCD exists in $R$, and let $d=\gcd(x,y)$. Then does there always exists $a,b\in R$ such that $d=ax+by$?

The answer is yes if the ring is PID, but here I am not considering $R$ as a PID, but considering $x,y$ for which GCD exists.

Here $R$ is a UFD, so every element has a factorization. For $x,y\in R$, we say that $d$ is GCD of $x,y$ (provided it exists), if

(1) $d$ divides both $x,y$.

(2)If $c$ divides $x,y$ then $c$ divides $d$.

I think, common divisors of two elements in a UFD always exists (for example, at least $1$). But, GCD does not exists means we can find two divisors, which are maximal but different.

• See here – Daniel Fischer Jul 2 '15 at 11:59
• Thanks. it is useful link, and some new terminology I am looking there. – Groups Jul 2 '15 at 12:01
• @Daniel No need to link offsite when there are proofs onsite. – Gone Jul 2 '15 at 13:27
• @Bill It was the first link my search turned up, so I took that. – Daniel Fischer Jul 2 '15 at 13:31
• @Fischer: in the link, the hypothesis is that "GCD exists for all pairs", or similar. Here I am considering only two elements which have a GCD. $R$ need not be a Bezout domain here. – Groups Jul 3 '15 at 3:32

The answer is NO. We consider the standard example $\mathbb{Z}[x]$, which is a UFD but not a PID. In fact, $(2,x)$ is not a principal ideal. Consider the elements $2$ and $x$ in this ring. The only divisors of $2$ are $1$ and $2$, and among them only $1$ divides $x$. This means $\gcd(2,x)=1$. Then can we write $1$ as $2a+bx$? Clearly, NO. Simply compare the constant coefficients on both sides.