---
title: "Fields of Fractions and the CRT"
module: Ring Theory
moduleNumber: 6
lessonNumber: 3
order: 603
summary: >
  Rings of fractions invert a multiplicatively closed set, enlarging an integral
  domain into its field of fractions the way Z becomes Q. The Chinese Remainder
  Theorem splits a quotient by comaximal ideals into a direct product,
  generalizing Z/mnZ ≅ Z/mZ × Z/nZ and explaining why the Euler function is
  multiplicative.
topics: [Ring Theory]
sources:
  - book: Dummit & Foote
    ref: "Ch. 7 — Introduction to Rings; §7.5 Rings of Fractions, §7.6 The Chinese Remainder Theorem"
  - book: Judson
    ref: "Ch. 18 — Integral Domains; §18.1 Fields of Fractions"
  - book: Judson
    ref: "Ch. 16 — Rings; §16.5 An Application to Software Design"
draft: false
---

Rings of fractions invert the elements that cancellation
already treats like units, producing the field of fractions of a domain. The Chinese
Remainder Theorem reverses a direct product: when a ring is quotiented by ideals that
are pairwise "coprime," the quotient factors into a product of simpler quotients.
Both constructions are modeled on the integers — $\mathbb{Z} \hookrightarrow
\mathbb{Q}$ and $\mathbb{Z}/mn\mathbb{Z} \cong \mathbb{Z}/m\mathbb{Z} \times
\mathbb{Z}/n\mathbb{Z}$ — and both hold for general commutative rings.

## Inverting cancellable elements

In a commutative ring, a nonzero element $a$ that is not a zero divisor already
cancels: $ab = ac$ forces $b = c$. It behaves like a unit without necessarily being
one — $2 \in \mathbb{Z}$ cancels but has no integer inverse. The construction below
manufactures the missing inverses in a larger ring, exactly as the rational numbers
supply inverses for the integers.[^df-frac]

Two restrictions are forced before starting. If $b$ is $0$ or a zero divisor, say
$bd = 0$ with $d \neq 0$, then allowing $b$ as a denominator collapses the structure:
$\tfrac{d}{1} = \tfrac{bd}{b} = \tfrac{0}{b} = 0$, so $R$ could not embed. And the
product rule needs the set of denominators closed under multiplication, since $bd$
must also be a denominator. The theorem requires these two conditions and nothing
more.

> **Definition (Multiplicatively closed denominator set).** A subset $D$ of a
> commutative ring $R$ is admissible as denominators if $0 \notin D$, $D$ contains
> no zero divisors, and $D$ is closed under multiplication: $d_1 d_2 \in D$ for all
> $d_1, d_2 \in D$.

## The ring of fractions

The construction copies the arithmetic of $\mathbb{Q}$. A fraction is an ordered pair
$(r, d)$ with $d \in D$, and two fractions are identified when they cross-multiply
equal.

> **Theorem (Ring of fractions).** Let $D \subseteq R$ be admissible. On $\{(r, d)
> : r \in R,\, d \in D\}$ define $(r, d) \sim (s, e) \iff re = sd$. The equivalence
> classes $\tfrac{r}{d}$ form a commutative ring $D^{-1}R$ with $1$, under
> $$
> \frac{r}{d} + \frac{s}{e} = \frac{re + sd}{de}, \qquad \frac{r}{d}\cdot\frac{s}{e} = \frac{rs}{de},
> $$
> in which $r \mapsto \tfrac{rd}{d}$ embeds $R$ as a subring and every $d \in D$
> becomes a unit. Every element has the form $r d^{-1}$.

A single rational number has many representations, $\tfrac{1}{2} = \tfrac{2}{4} = \tfrac{3}{6}$,
and the relation $\sim$ collapses them to one class. Geometrically the pair $(r, d)$ is a lattice point and its class is
the whole ray of proportional points.

$$
% caption: A fraction is a class of pairs (numerator, denominator) under
% cross-multiplication; each class is the set of integer points on one ray through
% the origin. The three marked points are all the fraction one-half.
\begin{tikzpicture}[font=\footnotesize, >=stealth, scale=0.92]
\definecolor{acc}{HTML}{4A6FA5}
\draw[->, black] (0,0) -- (7,0) node[right, black] {numerator};
\draw[->, black] (0,0) -- (0,4.4) node[above, black] {denominator};
% ray for the class one-half : points (1,2),(2,4)
\draw[acc, thick] (0,0) -- (2.1,4.2);
\fill[acc] (1,2) circle (2.4pt);
\fill[acc] (2,4) circle (2.4pt);
\node[acc, anchor=west, font=\scriptsize] at (1.1,1.75) {(1, 2)};
\node[acc, anchor=west, font=\scriptsize] at (2.1,3.75) {(2, 4)};
% another class two-over-one
\draw[black, dashed] (0,0) -- (6.4,3.2);
\fill[black] (4,2) circle (2.2pt);
\node[black, anchor=north, font=\scriptsize] at (4.1,1.9) {(4, 2)};
\node[black, anchor=west, font=\scriptsize] at (3.55,3.75) {a separate class};
\end{tikzpicture}
$$

The ring $D^{-1}R$ is the smallest one containing $R$ in which the elements of $D$
invert, and "smallest" is a universal property.

> **Theorem (Universal property).** If $\varphi : R \to S$ is an injective
> homomorphism into a commutative ring with $1$ sending every $d \in D$ to a unit,
> then $\varphi$ extends uniquely to an injective homomorphism $\Phi : D^{-1}R \to
> S$ with $\Phi(rd^{-1}) = \varphi(r)\varphi(d)^{-1}$.

Any ring in which $R$ sits with its $D$-elements inverted must already contain a copy
of $D^{-1}R$.[^df-frac] The uniqueness of this extension is why $D^{-1}R$ is called
_the_ ring of fractions rather than merely _a_ ring of fractions.

$$
% caption: Localization enlarges R minimally: it embeds R and turns each chosen
% denominator d into a unit, adjoining its inverse.
\begin{tikzpicture}[font=\footnotesize, >=stealth]
\definecolor{acc}{HTML}{4A6FA5}
\draw[black, fill=black!5] (0,0) circle (1.35);
\node[black] at (0,1.02) {$R$};
\fill[black!70] (-0.3,-0.2) circle (1.6pt); \node[black!70, anchor=east, font=\scriptsize] at (-0.4,-0.2) {$d$};
\draw[acc, thick, fill=acc!8] (5,0) circle (2.15);
\node[text=acc] at (5,1.65) {fractions $\frac{r}{d}$};
\fill[black!70] (4.6,-0.2) circle (1.6pt); \node[black!70, anchor=east, font=\scriptsize] at (4.5,-0.2) {$d$};
\fill[acc] (5.6,0.3) circle (1.6pt); \node[acc, anchor=west, font=\scriptsize] at (5.7,0.35) {$\frac{1}{d}$};
\draw[->, acc, thick] (1.5,0) -- (2.75,0) node[midway, above, font=\scriptsize, black] {embed};
\node[black, font=\scriptsize] at (2.15,-0.5) {invert each $d$};
\end{tikzpicture}
$$

## The field of fractions

The construction is most useful when $R$ is a domain and _every_ nonzero element is
allowed as a denominator.

> **Definition (Field of fractions).** If $R$ is an integral domain and $D = R
> \setminus \{0\}$, then $D^{-1}R$ is a field, the **field of fractions** (or
> quotient field) of $R$.

Since every nonzero element becomes a unit, $D^{-1}R$ is a field. It is the smallest
field containing $R$: any field holding a copy of $R$ holds a copy of its field of
fractions.[^df-frac][^ju-frac]

- **$\mathbb{Z}$** has field of fractions $\mathbb{Q}$.
- A **quadratic integer ring** $\mathcal{O} \subset \mathbb{Q}(\sqrt{D})$ has field
  of fractions the quadratic field $\mathbb{Q}(\sqrt{D})$ itself.
- **$2\mathbb{Z}$**, a domain-like ring without identity, still has field of
  fractions $\mathbb{Q}$ — the identity "appears" in the fractions.
- For any domain $R$, the polynomial ring $R[x]$ has field of fractions the field
  of **rational functions** $\tfrac{p(x)}{q(x)}$, written $F(x)$ when $F$ is a
  field. This is a recurring base field in
  [field theory](/abstract-algebra/field-theory/field-extensions-and-algebraic-elements).

Restricting $D$ to the powers $\{1, d, d^2, \ldots\}$ of a single element gives
$R[\tfrac{1}{d}]$, whose elements look like polynomials in $\tfrac{1}{d}$. This
**localization** at $d$ inverts one element without inverting all of them, and is the
local-to-global tool of commutative algebra.[^df-frac]

> **Worked example.** Invert $1 + i$ inside the field of fractions of the Gaussian
> integers.
>
> The field of fractions of $\mathbb{Z}[i]$ is $\mathbb{Q}(i) = \{p + qi : p, q
> \in \mathbb{Q}\}$. Rationalizing with the conjugate,
> $$
> (1 + i)^{-1} = \frac{1 - i}{(1 + i)(1 - i)} = \frac{1 - i}{2} = \tfrac12 - \tfrac12 i,
> $$
> using $(1 + i)(1 - i) = 1 - i^2 = 2$. The inverse has denominator $2$, so it lies
> in $\mathbb{Q}(i)$ but not in $\mathbb{Z}[i]$; passing to fractions is what
> supplied it.

## Direct products and comaximal ideals

The **direct product** $R_1 \times \cdots \times R_k$ of rings has componentwise
addition and multiplication. A map into a product is a homomorphism exactly when each
coordinate map is. The Chinese Remainder Theorem says when a single ring is _already_
such a product, viewed through its ideals. The bridge is the ideal-theoretic form of
"relatively prime."

> **Definition (Comaximal ideals).** Ideals $A$ and $B$ of $R$ are **comaximal**
> if $A + B = R$, equivalently if there exist $x \in A$ and $y \in B$ with $x + y =
> 1$.

In $\mathbb{Z}$ this is exactly coprimality: $m\mathbb{Z} + n\mathbb{Z} = \mathbb{Z}$
holds iff $\gcd(m, n) = 1$, since $m\mathbb{Z} + n\mathbb{Z} = \gcd(m, n)\mathbb{Z}$
and the Bézout relation $mx + ny = 1$ certifies it.[^df-crt]

$$
% caption: Two comaximal ideals meet only in the product AB but jointly span R:
% some x in A and y in B satisfy x + y = 1, the certificate A + B = R.
\begin{tikzpicture}[font=\footnotesize]
\definecolor{acc}{HTML}{4A6FA5}
\draw[black, fill=black!4] (-3.6,-1.9) rectangle (3.6,2.1);
\node[black, anchor=north east] at (3.5,2.0) {$R$};
\draw[acc, thick, fill=acc!10] (-0.7,0) circle (1.6);
\draw[black, thick, fill=black!8, fill opacity=0.55] (0.7,0) circle (1.6);
\node[text=acc] at (-1.7,0) {$A$};
\node[black] at (1.7,0) {$B$};
\node[black, font=\scriptsize] at (0,0) {$AB$};
\fill[acc] (-1.4,-0.9) circle (1.7pt); \node[acc, anchor=north, font=\scriptsize] at (-1.4,-1.0) {$x$};
\fill[black!70] (1.4,-0.9) circle (1.7pt); \node[black!70, anchor=north, font=\scriptsize] at (1.4,-1.0) {$y$};
\node[black!70, font=\footnotesize] at (0,1.9) {$x + y = 1$};
\end{tikzpicture}
$$

## The Chinese Remainder Theorem

> **Theorem (Chinese Remainder Theorem).** For ideals $A_1, \ldots, A_k$ of $R$,
> the map
> $$
> R \longrightarrow R/A_1 \times \cdots \times R/A_k, \qquad r \mapsto (r + A_1, \ldots, r + A_k)
> $$
> is a homomorphism with kernel $A_1 \cap \cdots \cap A_k$. If the $A_i$ are
> pairwise comaximal, the map is surjective and $A_1 \cap \cdots \cap A_k = A_1
> \cdots A_k$, giving
> $$
> R/(A_1 \cdots A_k) \;\cong\; R/A_1 \times \cdots \times R/A_k.
> $$

For $k = 2$ the argument is short. The map is a homomorphism because each coordinate
is a projection, and its kernel is the set of elements lying in both $A$ and $B$, that
is $A \cap B$. Comaximality supplies $x \in A$, $y \in B$ with $x + y = 1$; then $x
\mapsto (0, 1)$ and $y \mapsto (1, 0)$, so $r_2 x + r_1 y$ hits any target $(r_1 + A,
r_2 + B)$, proving surjectivity. Finally any $c \in A \cap B$ satisfies $c = cx + cy
\in AB$, giving $A \cap B \subseteq AB \subseteq A \cap B$.[^df-crt] The general case
follows by induction once $A_1$ and $A_2 \cdots A_k$ are shown comaximal.

The named special case is the isomorphism $\mathbb{Z}/mn\mathbb{Z} \cong
\mathbb{Z}/m\mathbb{Z} \times \mathbb{Z}/n\mathbb{Z}$ for $\gcd(m, n) = 1$: each
residue mod $mn$ is determined by its pair of residues mod $m$ and mod $n$, and every
pair occurs exactly once.

$$
% caption: CRT for 6 = 2 times 3. Each residue mod 6 sits at a unique cell of the
% grid indexed by its residue mod 2 (row) and mod 3 (column); every cell is filled
% exactly once.
\begin{tikzpicture}[font=\small, scale=0.95]
\definecolor{acc}{HTML}{4A6FA5}
% column headers (mod 3): 0,1,2 ; row headers (mod 2): 0,1
\node[font=\footnotesize, black] at (-1.2,2.0) {mod 2};
\node[font=\footnotesize, black] at (0.5,3.15) {mod 3};
\foreach \c/\lab in {1/0,2/1,3/2}{ \node[font=\bfseries] at (\c,2.7) {\lab}; }
\foreach \r/\lab in {1/1,2/0}{ \node[font=\bfseries] at (-0.2,\r) {\lab}; }
% grid
\draw[black] (0.5,0.5) rectangle (3.5,2.5);
\draw[black] (1.5,0.5)--(1.5,2.5); \draw[black] (2.5,0.5)--(2.5,2.5);
\draw[black] (0.5,1.5)--(3.5,1.5);
% cells: (row r, col c) -> residue mod 6 ; row2=mod2 value 0 (y=2), row1=mod2 value1 (y=1)
% (mod2,mod3): (0,0)=0 (0,1)=4 (0,2)=2 (1,0)=3 (1,1)=1 (1,2)=5
\foreach \x/\y/\v in {1/2/0, 2/2/4, 3/2/2, 1/1/3, 2/1/1, 3/1/5}{
  \node at (\x,\y) {\v};
}
\node[text=acc, anchor=west, font=\footnotesize] at (4.1,1.5) {residue mod $6$};
\end{tikzpicture}
$$

> **Worked example.** Find the idempotents of $\mathbb{Z}/6\mathbb{Z}$ that
> witness the splitting $\mathbb{Z}/6\mathbb{Z} \cong \mathbb{Z}/2\mathbb{Z} \times
> \mathbb{Z}/3\mathbb{Z}$.
>
> The factor identities $(1, 0)$ and $(0, 1)$ pull back to elements $e_1, e_2$
> satisfying $e_1 \equiv 1 \pmod 2$ with $e_1 \equiv 0 \pmod 3$, and $e_2 \equiv 0
> \pmod 2$ with $e_2 \equiv 1 \pmod 3$. Reading the grid, $e_1 = 3$ and $e_2 = 4$.
> Both are idempotent, orthogonal, and sum to the identity:
> $$
> 3^2 = 9 = 3, \qquad 4^2 = 16 = 4, \qquad 3 \cdot 4 = 12 = 0, \qquad 3 + 4 = 7 = 1 \pmod 6.
> $$
> The split $r = 3r + 4r$ then routes each $r$ to its two residues, with $e_1, e_2$
> acting as the coordinate projectors of the product.

Reading off the units on both sides shows they correspond, since a unit in a product
is a unit in each factor:
$$
(\mathbb{Z}/mn\mathbb{Z})^\times \;\cong\; (\mathbb{Z}/m\mathbb{Z})^\times \times (\mathbb{Z}/n\mathbb{Z})^\times.
$$
Comparing orders recovers the multiplicativity of the Euler function, $\varphi(mn) =
\varphi(m)\varphi(n)$ for coprime $m, n$, and iterating over the prime-power
factorization $n = p_1^{a_1} \cdots p_k^{a_k}$ gives both $\mathbb{Z}/n\mathbb{Z}
\cong \prod_i \mathbb{Z}/p_i^{a_i}\mathbb{Z}$ and the product formula for
$\varphi(n)$.[^df-crt] This is the ring-theoretic source of the counting facts used in
[cosets and Euler's theorem](/abstract-algebra/subgroups-and-quotients/cosets-lagrange-and-normal-subgroups)
and in the classification of
[finite abelian groups](/abstract-algebra/products-and-group-structure/direct-products-and-finite-abelian-groups).

## Reconstructing from residues

The CRT is constructive: given the residues, the original element is recovered by a
fixed formula. For pairwise coprime moduli $n_1, \ldots, n_k$ with product $n$, let
$m_i = n / n_i$ be the product of the other moduli, coprime to $n_i$; its inverse
$t_i \equiv m_i^{-1} \pmod{n_i}$ exists and is found by the extended Euclidean
algorithm.

```algorithm
caption: $\textsc{CrtReconstruct}(a_1, \ldots, a_k;\ n_1, \ldots, n_k)$ — solve $x \equiv a_i \pmod{n_i}$
$n \gets n_1 n_2 \cdots n_k$
$x \gets 0$
for each $i$ from $1$ to $k$ do
  $m_i \gets n / n_i$ // product of the other moduli
  $t_i \gets m_i^{-1} \bmod n_i$ // inverse via extended Euclid
  $x \gets x + a_i\, m_i\, t_i$
return $x \bmod n$
```

Each term $a_i m_i t_i$ is $\equiv a_i \pmod{n_i}$ and $\equiv 0$ modulo every other
$n_j$, so the sum satisfies all $k$ congruences at once, uniquely modulo $n$.[^ju-crt]

> **Worked example.** Solve $x \equiv 2 \pmod 3$, $x \equiv 3 \pmod 5$, $x \equiv 2
> \pmod 7$.
>
> Here $n = 3 \cdot 5 \cdot 7 = 105$. For each modulus, $m_i = n/n_i$ and $t_i
> \equiv m_i^{-1} \pmod{n_i}$:
> $$
> \begin{array}{c|c|c|c}
> n_i & m_i = n/n_i & m_i \bmod n_i & t_i \\ \hline
> 3 & 35 & 2 & 2 \\
> 5 & 21 & 1 & 1 \\
> 7 & 15 & 1 & 1
> \end{array}
> $$
> Summing the terms $a_i m_i t_i$,
> $$
> x = 2(35)(2) + 3(21)(1) + 2(15)(1) = 140 + 63 + 30 = 233 \equiv 23 \pmod{105}.
> $$
> Checking, $23 = 7 \cdot 3 + 2$, $23 = 4 \cdot 5 + 3$, and $23 = 3 \cdot 7 + 2$, so
> $23$ has residues $2, 3, 2$ modulo $3, 5, 7$. The residues determine $x$ uniquely
> modulo $105$.

This is the basis of a residue-number-system representation. A calculation on integers
too large for a machine word can be split across several coprime moduli, each fitting
in a word; additions and multiplications run independently on each residue, and the
CRT reassembles the exact result at the end. Because the residues never interact, the
component calculations parallelize with no carries between them.[^ju-crt]

| Object | Fractions view | CRT view |
| --- | --- | --- |
| Direction | enlarge a domain | split a quotient |
| Model case | $\mathbb{Z} \hookrightarrow \mathbb{Q}$ | $\mathbb{Z}/6 \cong \mathbb{Z}/2 \times \mathbb{Z}/3$ |
| Hypothesis on $R$ | domain (or non-zero-divisor set) | pairwise comaximal ideals |
| Output | field of fractions $D^{-1}R$ | product $\prod R/A_i$ |

[^df-frac]: **Dummit & Foote**, _Abstract Algebra_, §7.5 — Rings of Fractions: the two restrictions on denominators, the construction $D^{-1}R$ with its embedding and universal property, the field of fractions of an integral domain, rational function fields, and localization $R[1/d]$.
[^df-crt]: **Dummit & Foote**, _Abstract Algebra_, §7.6 — The Chinese Remainder Theorem: comaximal ideals, the CRT isomorphism, $\mathbb{Z}/mn\mathbb{Z} \cong \mathbb{Z}/m\mathbb{Z} \times \mathbb{Z}/n\mathbb{Z}$, the units isomorphism, and the multiplicativity of the Euler $\varphi$-function.
[^ju-frac]: **Judson**, _Abstract Algebra: Theory and Applications_, §18.1 — Fields of Fractions: the construction of the field of fractions of an integral domain as equivalence classes of pairs, and its characterization as the smallest field containing the domain.
[^ju-crt]: **Judson**, _Abstract Algebra: Theory and Applications_, §16.5 — An Application to Software Design: the constructive Chinese Remainder Theorem and its use in breaking large-integer arithmetic into independent computations modulo coprime moduli.
