## In a PID, two ideals are comaximal precisely when 1 is a gcd of their generators

Prove that in a principal ideal domain, two ideals $(a)$ and $(b)$ are comaximal (that is, $(a) + (b) = R$ if and only if 1 is a greatest common divisor of $a$ and $b$. In this case, we say that $a$ and $b$ are relatively prime.

Suppose $(a) + (b) = R$. Since $R$ has a 1, we have $(a) + (b) = (a,b) = (1)$. Then by Proposition 6 in D&F (page 280), 1 is a greatest common divisor of $a$ and $b$.

Conversely, suppose 1 is a greatest common divisor of $a$ and $b$. Then we have $ax + by = 1$ for some $x,y \in R$, so that $1 \in (a) + (b)$, and hence $(a) + (b) = R$.