Three things a prime can do upstairs
Fix a number field K of degree n = [K:Q] and a rational prime p. Inside O_K the ideal (p) is no longer prime in general; by unique factorization of ideals it factors as (p) = p_1^(e_1) ··· p_g^(e_g) with distinct prime ideals p_i. Two integers attach to each p_i: the ramification index e_i (its exponent) and the inertia degree f_i = [O_K/p_i : F_p], the degree of the residue field extension over F_p.
Computing the splitting via Dedekind's factorization theorem
When O_K = Z[θ] with θ having minimal polynomial m(x), there is a beautifully mechanical recipe: for a prime p not dividing the index, factor m(x) modulo p into irreducibles over F_p. The factorization of (p) mirrors it exactly — each irreducible factor of degree f appearing to power e gives a prime p_i with inertia degree f and ramification index e.
K = Q(i), O_K = Z[i], m(x) = x^2 + 1. Factor (p):
p = 5: x^2+1 ≡ (x+2)(x+3) (mod 5) [2*3=6≡1, distinct]
==> (5) = (5, i+2)(5, i+3) = p1 p2, e=f=1, g=2 -> SPLIT
(indeed 5 = (2+i)(2-i))
p = 3: x^2+1 irreducible (mod 3) [no root: 0,1,1]
==> (3) stays prime, e=1, f=2, g=1 -> INERT
p = 2: x^2+1 ≡ (x+1)^2 (mod 2)
==> (2) = (2, i+1)^2 = p^2, e=2, f=1, g=1 -> RAMIFIED
(indeed 2 = -i(1+i)^2, and 1+i generates p)
Check e*f*g = n = 2 in every case. And note 2 | disc(Z[i]) = -4:
the ONLY ramified prime is 2 -- the one dividing the discriminant.The discriminant pins down ramification
Why was 2 the only ramified prime above? Because of the [[discriminant-of-a-number-field|discriminant]] d_K, an integer invariant of K built from an integral basis (it generalizes the polynomial discriminant). The clean theorem: a prime p ramifies in K if and only if p divides d_K. Since only finitely many primes divide d_K, ramification is a finite, controllable phenomenon — almost all primes are unramified.