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

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

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

Construction by fractions

As a set, S−1RS^{-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′)⟺∃ t∈S such that t(rs′−r′s)=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+r′s′=rs′+r′sss′,rs⋅r′s′=rr′ss′.\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 0∈S0\in S, then S−1RS^{-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 S−1RS^{-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
    S−1Z≅Z ⁣[1p]={apn:a∈Z, n≥0}⊆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
    S−1R≅k[x,x−1],S^{-1}R \cong k[x,x^{-1}],
    since xx becomes invertible.
  1. Localizing at a prime ideal. If p⊂R\mathfrak p\subset R is prime and S=R∖pS=R\setminus\mathfrak p, then S−1RS^{-1}R is the RpR_{\mathfrak p}, which is a .