Examples of rings of fractions I wanted to come up with a few examples of rings of fractions $S^{-1}R$. Can you tell me if these are correct:
1.Let $R = \mathbb Z$, $S = (2 \mathbb Z \setminus \{0\}) \cup \{1\}$. Then every $[x] = \frac{r}{s} \in S^{-1}R$ consists of the elements: $[x] = \{ 2x, \frac12 x\}$. 
The ring homomorphism $f: R \to S^{-1}R$ is injective since if $f(r) = [\frac{r}{1}] = [\frac{r^\prime}{1}] = f(r^\prime)$ we have $2k r = 2k r^\prime$ for $2k \in \mathbb Z$ and since $\mathbb Z$ is an integral domain, $r=r^{\prime}$.
2.Now let $R=\mathbb Z / 12 \mathbb Z$ and $S = \{1,2,4,6,8,10\} = (2 R \setminus \{0\}) \cup \{1\}$. Then $f: R \to S^{-1}R$ is not injective since $f(6) = f(3)$.
Are there more interesting examples where $f: R \to S^{-1}R$ is not injective? 
 A: It's difficult to find a place to begin, because there are so many examples.
For $R=\mathbb{Z}$,


*

*there is of course the choice $S=R\setminus\{0\}$, producing $\mathbb{Q}$.

*You could also just choose a prime ideal, say $P=2\mathbb{Z}$, and use $S=R\setminus P$. This yields the subring of $\mathbb{Q}$ consisting of all fractions of odd denominator.

*You could fix a nonzero element, say $a\in R$ and use $S=\{a^i\mid i\in\mathbb{Z}^+\}$. This produces the subring of $\mathbb{Q}$ whose denominators are a power of $a$.

*To break from $\mathbb{Z}$ for a second, I'd like to apply the last point to $R=F[x]$ and choose $a=x$. The ring of fractions based on the powers of $x$ then yield $F[x,x^{-1}]$, the Laurent polynomials.
In your second example you put $0$ in your multiplicative set... are you aware that will make $S^{-1}R=\{0\}$?
If the map is not injective, and you exclude $0$ from $S$, then there must be a nonzero zero divisor in $S$. If $a\neq b$ in $R$, but $(a,1)=(b,1)$ in $S^{-1}R$, then that says there exists $s\in S$ such that $as=bs$. This means $(a-b)s=0$.
Using that idea, let $as=0$ for some nonzero $a\in R$, nonzero $s\in S$. Let $b$ be anything nonzero in $R$. Note that $0=as=(a+b-b)s=(a+b)s-bs$. Then $(a+b,1)=(b,1)$.
A simple way to produce a nontrivial ring of fractions such that the canonical map is not an injection would be to find a nonzero zero divisor $x$ in a ring, such that $x$ is not nilpotent. Then localize at the nonnegative powers of $x$.
A: For the first of your examples,  I don't think that $S^{-1}R$ consists of just those two elements. For example you have $\frac{13}{4}$ in the localisation that is not of the form $2x$ or $\frac{x}{2}$.  On second thoughts I don't get what you mean by $[x]$ is just those two elements. Do you mean to talk about the equivalence class of a fraction? In that case there are infinitely many elements in an equivalence class. For example
$$\frac{13}{4} = \frac{26}{8} = \frac{39}{12} = \ldots $$
As can be seen $\frac{13}{4}$ is not even of the form you claimed that an element is in an equivalence class. Other important examples of localisation:


*

*Let $P$ be a prime ideal in a ring $R$. Then $S = R - P$ is a multiplicative set, and $S^{-1}R$ is a local ring. We call this "localisation at the prime ideal $P$". For example if $P$ is all the multiples of $5$ in $\Bbb{Z}$, then 


$$R_P =\{q \in \Bbb{Q} | q = \frac{a}{b} \hspace{1mm} \text{with} \hspace{1mm} a,b\in \Bbb{Z}\}$$


*Let $f$ be a non-zero non-nilpotent element. Then consider $S = \{1,f,f^2,\ldots \}$. When localising by this multiplicative subset, we sometimes write $R_f$. This example crops up a lot in algebraic geometry I believe.

*More advanced example: Let $R$ be a $\Bbb{Z}$ - graded ring. Let $f$ be a non-zero homogeneous element of degree one. Notice that $R_f$ is naturally a graded ring. Then $R_f \cong (R_f)_0[x,x^{-1}]$ where $x$ is an indeterminate and $(R_f)_0$ we denote by the degree zero component of $R_f$. More generally, let $P$ be a homogeneous prime ideal in $R$ and $U$ the multiplicative subset of all homogeneous elements not in $P$. Then it is surprising that for a more general $U$ we than before we still have
$$U^{-1}R \cong (U^{-1}R)_0[x,x^{-1}]$$
where $(U^{-1}R)_0$ is the degree zero component of $U^{-1}R$.


*Interesting example. Let $R$ be a PID and $K$ its field of fractions. Let $A$ be a subring of $K$ containing $R$. Then one can show that $A$ is actually isomorphic to $S^{-1}R$ where $S$ is the multiplicative set of all elements in $R$ that are units in $A$. You can use this to prove that $A$ must always be a PID!


By the way in your last example you have included zero in the multiplicative subset $S$. We claim that $S^{-1}R$ is the zero ring. Indeed, any 
$$\frac{a}{b} = \frac{0}{1}$$
because there exists $0 \in S$ such that $(a\cdot 1- b\cdot 0)\cdot a = 0$.
A: I don't follow what you mean here: if by $\,[x]\,$ you mean the equivalence class of $\,x\,$ in the localization then I can't see how $\,2x\,,\,\frac{1}{2}x\,$ are equivalent in $\,(1)$...?
If you're talking of localization of $\,R\,$ wrt $\,S\,$, then an element of $\,S^{-1}R\,$ is of the form $\,\displaystyle{\frac{r}{s}\,\,,\,r\in R\,,\,s\in S}$, and of course $\,S\,$ cannot contain zero and has to be multiplicatively closed...
So in $\,(1)\,$ , the elements we have there are of the form $$\,\displaystyle{\frac{m}{r}\,,\,m\in\mathbb{Z}\,,\,r\in 2\mathbb{Z}\cup \{1\}}$$  and $$\frac{m}{r}=\frac{n}{s}\Longleftrightarrow ms=nr\,\,\text{in}\,\,R$$ 
In your second example $\,S\,$ is not valid because it contains zero
