Given a domain $R$ which is a UFD and $x,y \in R$ so that $\gcd(x,y)=1$, define $I = \left<x,y\right>$. I need to show that the sequence :
$$ 0 \rightarrow R \xrightarrow f R \oplus R \xrightarrow g I \rightarrow 0 $$
where $$f(a) = (-ya, xa)$$ and $$g(a,b) = ax+by$$
is exact.
I realise that basically means I need to show the surjectivity of $g$ and injectivity of $f$. But I am not sure why the UFD and relatively prime condition of $x$ and $y$ are thrown in. I am missing something elementary quite clearly, but I am unable to figure it out nevertheless. Any hints would be welcome.
From $\gcd(x,y)=1$, we see that at least one of $x,y$ is non-zero. Hence the kernel of $f$ is trivial, as desired.
That $g$ is surjective is more or less the definition of $\langle x,y\rangle$.
We have $g\circ f=0$ because $g(f(a))=g(-ya,xa)=-yax+xay=0$ for all $a$.
Remains to show that $g(y,b)=0$ implies $(a,b)=f(c)$ for some $c$. So assume $ax+by=0$, i.e., $ax=-by$. As $x$ is coprime to $y$, we must have $y\mid a$ and similarly $x\mid b$. So $a=dy$, $b=cx$ with $c,d\in R$. But then $dyx+cxy=0$ and so $d=-c$ and indeed $(a,b)=(-cy,cx)=f(c)$.