How can it be possible to localize a ring at a set with zero divisors?

Let $R$ be a commutative ring with identity, and $S$ a multiplicative subset of $R$ not containing $0$. Which step in my reasoning is wrong?

  1. Every element of $S$ is a unit in $S^{-1}R$.
  2. Every element of $S$ that's a zero divisor in $R$ is a zero divisor in $S^{-1}R$.
  3. But zero divisors can't be units. Therefore it's not possible to localize $R$ at $S$.

Solution 1:

Consider the localization of $R=\Bbb{Z}_6$ with respect to the multiplicative set $S=\{1,3\}$. In $S^{-1}R$ we have $2/1=0/1$ because $3\cdot(2\cdot1-0\cdot1)=0$. It follows soon that $S^{-1}R\simeq \Bbb{Z}_2$. You see that $3/1=1$ is invertible in that ring.

The error is that even if an element $a\in R$ is a zero divisor in $R$, it may happen that $a/1$ is not a zero divisor. This is because it may happen that for all $b\in R$ such that $ab=0$ we get $b/1=0$ in $S^{-1}R$.

Solution 2:

Step 2. is false:
Consider $R=\mathbb R[X,Y]/(X\cdot Y)=\mathbb R[x,y]$ and $S=\{1,x,x^2,x^3,\cdots\}$.
We have $S^{-1}R\cong \mathbb R[x,\frac 1x]$. The element $x\in R$, which was a zero-divisor in $R$ (since $xy=0,\; y\neq 0$), is no longer a zero-divisor in $S^{-1}R$ (since that last ring is a domain).