Let RR be a and SRS\subseteq R a . A localization of RR at SS is a commutative ring S1RS^{-1}R with a homomorphism

ι:RS1R\iota:R\longrightarrow S^{-1}R

such that every ι(s)\iota(s), for sSs\in S, is a unit and the following universal property holds: if φ:RA\varphi:R\to A sends every element of SS to a unit of a commutative ring AA, there is a unique homomorphism φ~:S1RA\widetilde\varphi:S^{-1}R\to A satisfying φ~ι=φ\widetilde\varphi\circ\iota=\varphi.

Construction by fractions

As a set, S1RS^{-1}R can be constructed from pairs (r,s)R×S(r,s)\in R\times S modulo the equivalence relation

(r,s)(r,s)tS such that t(rsrs)=0 in R.(r,s)\sim (r',s') \quad \Longleftrightarrow \quad \exists\,t\in S\text{ such that } t(rs'-r's)=0 \text{ in }R.

Write the class of (r,s)(r,s) as rs\frac{r}{s}. Addition and multiplication are defined by

rs+rs=rs+rsss,rsrs=rrss.\frac{r}{s}+\frac{r'}{s'}=\frac{rs'+r's}{ss'},\qquad \frac{r}{s}\cdot\frac{r'}{s'}=\frac{rr'}{ss'}.

The canonical map is ι(r)=r1\iota(r)=\frac{r}{1}.

If 0S0\in S, then S1RS^{-1}R is the zero ring.

Universal map

The homomorphism supplied by the universal property is explicitly

φ~ ⁣(rs)=φ(r)φ(s)1.\widetilde\varphi\!\left(\frac{r}{s}\right)=\varphi(r)\,\varphi(s)^{-1}.

This same “invert SS” construction for modules is treated in .

A basic structural fact is that primes of S1RS^{-1}R correspond to primes of RR disjoint from SS; see .

Examples
  1. Inverting a prime number. Take R=ZR=\mathbb Z and S={1,p,p2,}S=\{1,p,p^2,\dots\}. Then
    S1ZZ ⁣[1p]={apn:aZ, n0}Q.S^{-1}\mathbb Z \cong \mathbb Z\!\left[\frac{1}{p}\right] =\left\{\frac{a}{p^n}:a\in\mathbb Z,\ n\ge 0\right\}\subseteq\mathbb Q.
  1. Laurent polynomials. If R=k[x]R=k[x] and S={1,x,x2,}S=\{1,x,x^2,\dots\}, then
    S1Rk[x,x1],S^{-1}R \cong k[x,x^{-1}],
    since xx becomes invertible.
  1. Localizing at a prime ideal. If pR\mathfrak p\subset R is prime and S=RpS=R\setminus\mathfrak p, then S1RS^{-1}R is the RpR_{\mathfrak p}, which is a .