Let $R$ be a PID and $g\in R$. I want to show:
$R/Rg$ is a field iff $g\in R$ is irreducible.
I.e. I want to show that all $a\notin Rg$ are invertible modulo $g$ iff $g$ is irreducible.
So if I take $a\notin Rg$, how do I use irreducibility of $g$ to find an inverse of $a$, modulo $g$?
This should follow straight from the definition but I am utterly confused.