Mathematics · Book 5 · Bachelor Year 3

University Mathematics — Year 3

University Mathematics — Year 3 · Bachelor Year 3

2Rings and Arithmetic

Ordinary integers factor uniquely into primes; so do polynomials over a field. Are these two facts one theorem? This chapter answers yes, and finds the exact hypotheses that make an “arithmetic” possible in a commutative ring: the chain

Euclidean    principal    factorial (UFD),\text{Euclidean} \;\Longrightarrow\; \text{principal} \;\Longrightarrow\; \text{factorial (UFD)},

with all implications proved and all converses refuted. The theory is then tested where it earns its keep: the Gaussian integers Z[i]\Z[\iu] (which will crack Fermat’s two-squares theorem in the weekend problem), polynomial rings in several variables (Gauss’s lemma, Eisenstein’s criterion), and Noetherian rings, culminating in Hilbert’s basis theorem. Throughout, ring means commutative ring with unit 101 \neq 0; the Year 2 volume’s ideals of Z\Z and K[X]K[X] are our two guiding examples.

2.1 Ideals, quotients, and the isomorphism theorem

Definition 2.1

An ideal II of a ring AA is an additive subgroup such that AIIAI \subseteq I. The quotient ring A/IA/I is the quotient group (A,+)/I(A, +)/I with the multiplication (a+I)(b+I)=ab+I(a + I)(b + I) = ab + I: well defined, since changing aa to a+xa + x, bb to b+yb + y (x,yIx, y \in I) changes abab by ay+xb+xyIay + xb + xy \in I. The projection π ⁣:AA/I\pi \colon A \to A/I is a surjective ring morphism with kernel II, and kernels of ring morphisms are exactly the ideals.

Theorem 2.2 (First isomorphism theorem)

If f ⁣:ABf \colon A \to B is a ring morphism, then fˉ ⁣:A/kerfimf\bar f\colon A/\ker f \to \operatorname{im} f, a+kerff(a)a + \ker f \mapsto f(a), is a ring isomorphism. More generally ff factors through A/IA/I for any ideal IkerfI \subseteq \ker f. The ideals of A/IA/I are the J/IJ/I for JIJ \supseteq I an ideal of AA (correspondence theorem).

Proof. As for groups (Theorems 1.3 and 1.5), noting that all maps in sight also respect products: fˉ\bar f is well defined, bijective onto the image, and multiplicative; the correspondence JJ/IJ \mapsto J/I, Jˉπ1(Jˉ)\bar J \mapsto \pi^{-1}(\bar J) preserves ideals in both directions because π\pi is a surjective ring morphism.

Definition 2.3

Let IAI \subsetneq A be a proper ideal. II is prime if abIaIab \in I \Rightarrow a \in I or bIb \in I; II is maximal if no ideal lies strictly between II and AA.

Proposition 2.4

II is prime     \iff A/IA/I is an integral domain; II is maximal     \iff A/IA/I is a field. In particular maximal ideals are prime.

Proof. Write aˉ\bar a for classes in A/IA/I. “II prime” translates verbatim to “aˉbˉ=0aˉ=0\bar a\bar b = 0 \Rightarrow \bar a = 0 or bˉ=0\bar b = 0”, and A/I0A/I \neq 0 to IAI \neq A: that is the definition of a domain. For maximality, use the correspondence theorem: no ideal strictly between II and AA     \iff A/IA/I has no ideal other than 00 and itself     \iff A/IA/I is a field — for the last step: in a field the only ideals are 00 and everything (an ideal containing x0x \ne 0 contains x1x=1x^{-1}x = 1); conversely if every nonzero xx generates the unit ideal, then xy=1xy = 1 for some yy. Fields are domains, so maximal ideals are prime.

Example 2.5

In Z\Z: the prime ideals are (0)(0) and the (p)(p), pp prime; the maximal ones are the (p)(p) (Z/pZ=Fp\Z/p\Z = \mathbb F_p is a field, Z/(0)=Z\Z/(0) = \Z is not). In K[X,Y]K[X, Y]: (X)(X,Y)(X) \subsetneq (X, Y) are both prime (K[X,Y]/(X)K[Y]K[X,Y]/(X) \cong K[Y], a domain; K[X,Y]/(X,Y)KK[X,Y]/(X,Y) \cong K, a field), so (X)(X) is prime but not maximal.

To guarantee that maximal ideals exist in full generality, we need a set-theoretic principle. A partially ordered set is inductive if every totally ordered subset (chain) has an upper bound.

Theorem 2.6 (Zorn’s lemma)

Every nonempty inductive partially ordered set has a maximal element.

Proof. Admitted at this level.

Remark 2.7

This is not a theorem of ordinary mathematics but an axiom: it is equivalent, over the basic Zermelo–Fraenkel axioms of set theory, to the axiom of choice (“every product of nonempty sets is nonempty”), which we accept throughout this book. We flag each use. Analysis will invoke it again (Hahn–Banach, Chapter 8).

Theorem 2.8 (Krull)

Every proper ideal IAI \subsetneq A is contained in a maximal ideal.

Proof. Order by inclusion the set E\mathcal E of proper ideals containing II; it is nonempty (IEI \in \mathcal E). A chain (Jλ)(J_\lambda) in E\mathcal E has upper bound J=JλJ = \bigcup J_\lambda: an ideal (any a,bJa, b \in J lie in a common JλJ_\lambda by totality), proper (1Jλ1 \notin J_\lambda for all λ\lambda), containing II. Zorn’s lemma yields a maximal element of E\mathcal E, which is a maximal ideal containing II (an ideal strictly above it and proper would lie in E\mathcal E).

Theorem 2.9 (Chinese remainder theorem)

Let I1,,InI_1, \dots, I_n be pairwise comaximal ideals of AA (Ik+Il=AI_k + I_l = A for klk \neq l). Then

A/k=1nIk        k=1nA/Ik,a(a+I1,,a+In),A\Big/\bigcap_{k=1}^n I_k \;\xrightarrow{\;\sim\;}\; \prod_{k=1}^n A/I_k, \qquad a \longmapsto (a + I_1, \dots, a + I_n),

and moreover kIk=I1I2In\bigcap_k I_k = I_1 I_2 \cdots I_n (the ideal generated by products).

Proof. The map f(a)=(a+Ik)kf(a) = (a + I_k)_k is a ring morphism with kernel Ik\bigcap I_k; by Theorem 2.2 it suffices to prove surjectivity. Fix kk; for each lkl \neq k write 1=ul+vl1 = u_l + v_l with ulIku_l \in I_k, vlIlv_l \in I_l (comaximality). Then

ek=lkvl=lk(1ul)1(modIk),ekIl (lk),e_k = \prod_{l \neq k} v_l = \prod_{l\neq k}(1 - u_l) \equiv 1 \pmod{I_k}, \qquad e_k \in I_l \ (l \neq k),

so f(ek)=(0,,1,,0)f(e_k) = (0, \dots, 1, \dots, 0); given a target (ak+Ik)k(a_k + I_k)_k, the element kakek\sum_k a_k e_k maps to it.

Products vs intersection: I1InIkI_1\cdots I_n \subseteq \bigcap I_k always. Conversely, by induction it suffices to treat n=2n = 2 (one checks I1I_1 and I2InI_2\cdots I_n are comaximal: multiplying 1=ul+vl1 = u_l + v_l over l2l \geq 2 gives 1I1+I2In1 \in I_1 + I_2\cdots I_n). For n=2n = 2: write 1=u+v1 = u + v, uI1u \in I_1, vI2v \in I_2; for xI1I2x \in I_1 \cap I_2, x=xu+xvI2I1+I1I2=I1I2x = xu + xv \in I_2I_1 + I_1I_2 = I_1I_2.

Example 2.10

In Z\Z with Ik=(mk)I_k = (m_k), mkm_k pairwise coprime: Z/(m1mn)ZZ/mkZ\Z/(m_1\cdots m_n)\Z \cong \prod \Z/m_k\Z — the Year 2 volume’s Chinese remainder theorem. Restricting to units: (Z/mnZ)×(Z/mZ)××(Z/nZ)×(\Z/mn\Z)^\times \cong (\Z/m\Z)^\times \times (\Z/n\Z)^\times for gcd(m,n)=1\gcd(m,n)=1, whence the multiplicativity of Euler’s φ\varphi (Exercise 2.8).

2.2 Divisibility: Euclidean, principal, factorial

Definition 2.11

Let AA be an integral domain, a,bAa, b \in A. We say aa divides bb (aba \mid b) if b(a)=aAb \in (a) = aA. Elements a,ba, b are associates if a=uba = ub with uA×u \in A^\times (equivalently (a)=(b)(a) = (b)). A nonzero nonunit pp is:

  • irreducible if p=abp = ab forces aA×a \in A^\times or bA×b \in A^\times;
  • prime if pabp \mid ab forces pap \mid a or pbp \mid b (i.e. the ideal (p)(p) is prime).

Proposition 2.12

In any domain, prime \Rightarrow irreducible. The converse is false in general: in Z[i5]={a+ib5:a,bZ}\Z[\iu\sqrt 5] = \{a + \iu b\sqrt5 : a, b \in \Z\}, the element 22 is irreducible but not prime.

Proof. Let pp be prime and p=abp = ab. Then pabp \mid ab, say pap \mid a: a=pca = pc, so p=pcbp = pcb, and cancelling pp (domain!) gives cb=1cb = 1: bA×b \in A^\times.

In Z[i5]\Z[\iu\sqrt5], use the norm N(x+iy5)=x2+5y2N(x + \iu y\sqrt 5) = x^2 + 5y^2, which is multiplicative (it is z2\abs z^2). If 2=ab2 = ab with a,ba, b nonunits, then 4=N(a)N(b)4 = N(a)N(b) with N(a),N(b)1N(a), N(b) \neq 1 (norm-11 elements are ±1\pm1, the units), so N(a)=2N(a) = 2: impossible, x2+5y2=2x^2 + 5y^2 = 2 has no integer solution. So 22 is irreducible. But 26=(1+i5)(1i5)2 \mid 6 = (1 + \iu\sqrt5)(1 - \iu\sqrt5) while 22 divides neither factor (12±i52Z[i5]\frac12 \pm \frac{\iu\sqrt5}2 \notin \Z[\iu\sqrt5]): not prime.

Definition 2.13

An integral domain AA is:

  • Euclidean if there is a map ν ⁣:A{0}N\nu \colon A \setminus \{0\} \to \N (a Euclidean function) such that for all a,ba, b with b0b \ne 0 there exist q,rq, r with a=bq+ra = bq + r and (r=0r = 0 or ν(r)<ν(b)\nu(r) < \nu(b));
  • principal (a PID) if every ideal is of the form (a)(a);
  • factorial (a UFD) if every nonzero nonunit is a product of irreducibles, uniquely up to order and associates.

Theorem 2.14

Euclidean \Rightarrow principal.

Proof. Let I(0)I \neq (0) be an ideal and bI{0}b \in I \setminus\{0\} with ν(b)\nu(b) minimal. For aIa \in I, divide: a=bq+ra = bq + r; then r=abqIr = a - bq \in I, and ν(r)<ν(b)\nu(r) < \nu(b) would contradict minimality, so r=0r = 0 and a(b)a \in (b): I=(b)I = (b).

Example 2.15

Z\Z (with ν=\nu = \abs\cdot) and K[X]K[X] (with ν=deg\nu = \deg) are Euclidean — the Year 2 volume proved both divisions. So is Z[i]\Z[\iu], with ν=N\nu = N the square norm (Exercise 2.4); the geometry of the proof is in the figure below. A PID that is not Euclidean exists but is delicate to certify (the standard example is Z[1+i192]\Z\bigl[\frac{1+\iu\sqrt{19}}2\bigr]); a UFD that is not a PID is easy: K[X,Y]K[X, Y] (Exercise 2.6), or Z[X]\Z[X].

Division in the Gaussian integers: the exact quotient a/b ∈ ℂ lies within distance ≤ √2/2 < 1 of some lattice point q ∈ ℤ[ ]; then r = a - bq has N(r) = N(b)\,|a/b - q|2 < N(b). One Euclidean division, hence a whole arithmetic.
Division in the Gaussian integers: the exact quotient a/bCa/b \in \C lies within distance 22<1\leq \frac{\sqrt2}{2} < 1 of some lattice point qZ[i]q \in \Z[\iu]; then r=abqr = a - bq has N(r)=N(b)a/bq2<N(b)N(r) = N(b)\,\abs{a/b - q}^2 < N(b). One Euclidean division, hence a whole arithmetic.

Lemma 2.16 (Ascending chains of principal ideals)

In a PID, every increasing sequence of ideals I1I2I_1 \subseteq I_2 \subseteq \cdots is eventually constant.

Proof. I=nInI = \bigcup_n I_n is an ideal (the union is increasing), so I=(a)I = (a); the element aa lies in some INI_N, and then I=(a)INInII = (a) \subseteq I_N \subseteq I_n \subseteq I for nNn \geq N.

Lemma 2.17 (Bézout; Euclid’s lemma)

Let AA be a PID and a,bAa, b \in A. Then (a)+(b)=(d)(a) + (b) = (d) for some dd, a greatest common divisor: dad \mid a, dbd \mid b, and every common divisor of a,ba, b divides dd; moreover d=au+bvd = au + bv for some u,vu, v (Bézout). Consequently every irreducible element of a PID is prime.

Proof. (a)+(b)(a) + (b) is an ideal, hence (d)(d); a,b(d)a, b \in (d) gives da,bd \mid a, b; and d=au+bv(a)+(b)d = au + bv \in (a) + (b). A common divisor cc of a,ba, b divides au+bv=dau + bv = d.

Euclid: let pp be irreducible, pabp \mid ab, pap \nmid a. A gcd dd of pp and aa divides pp, so dd is a unit or an associate of pp (irreducibility); associate is excluded by pap \nmid a. So 1=pu+av1 = pu + av, whence b=pub+abvb = pub + abv, and pp divides both terms: pbp \mid b.

Theorem 2.18

Principal \Rightarrow factorial.

Proof. Existence. Suppose some nonzero nonunit aa has no factorization into irreducibles. Then aa is not irreducible: a=a1b1a = a_1b_1 with both factors nonunits; at least one of them, say a1a_1, again has no factorization (a product of two factorizable elements is factorizable). Iterating, we get a=a0,a1,a2,a = a_0, a_1, a_2, \dots, each a proper divisor of the last with no factorization, so (a0)(a1)(a2)(a_0) \subsetneq (a_1) \subsetneq (a_2) \subsetneq \cdots — the inclusions are strict because an=an+1ca_n = a_{n+1}c with cc a nonunit means (an)=(an+1)(a_n) = (a_{n+1}) would force cA×c \in A^\times (cancel in a domain). This contradicts Lemma 2.16.

Uniqueness. Let p1pr=q1qsp_1 \cdots p_r = q_1 \cdots q_s with all factors irreducible, rsr \leq s, by induction on rr. The prime (Lemma 2.17) p1p_1 divides the right-hand side, so divides some qjq_j; renumber j=1j = 1. As q1q_1 is irreducible and p1p_1 is not a unit, q1=up1q_1 = u p_1 with uA×u \in A^\times: p1,q1p_1, q_1 are associates. Cancel p1p_1: p2pr=(uq2)q3qsp_2 \cdots p_r = (u q_2) q_3\cdots q_s and conclude by induction (r=1r = 1 forces s=1s = 1: a unit times irreducibles cannot be 11).

Remark 2.19

In a UFD, gcds exist (take minimal exponents in the factorizations) and Euclid’s lemma holds — irreducible == prime (Exercise 2.2) — but Bézout may fail: in Z[X]\Z[X], gcd(2,X)=1\gcd(2, X) = 1 yet 12U+XV1 \neq 2U + XV (evaluate at X=0X = 0: 1=2U(0)1 = 2U(0), impossible). Bézout identities are the exclusive property of PIDs.

Example 2.20 (A ring without unique factorization)

None of the implications Euclidean \Rightarrow PID \Rightarrow UFD is an equivalence, and the failure of the last is worth seeing once in complete detail. In

A=Z[i5]={a+ib5:a,bZ},N(a+ib5)=a2+5b2,A = \Z[\iu\sqrt5] = \{a + \iu b\sqrt5 : a, b \in \Z\}, \qquad N(a + \iu b\sqrt5) = a^2 + 5b^2,

the norm is multiplicative and N(z)=1N(z) = 1 iff zA×={±1}z \in A^\times = \{\pm1\}. Consider

6=23=(1+i5)(1i5).6 = 2 \cdot 3 = (1 + \iu\sqrt5)(1 - \iu\sqrt5).

All four factors are irreducible: their norms are 4,9,6,64, 9, 6, 6, and a proper factorization z=z1z2z = z_1z_2 would force N(z1){2,3}N(z_1) \in \{2, 3\} — but a2+5b2a^2 + 5b^2 never equals 22 or 33 (b=0b = 0 leaves the non-squares 2,32, 3; b1\abs b \geq 1 gives 5\geq 5). Yet 22 is associate to neither 1±i51 \pm \iu\sqrt5 (norms 464 \neq 6): two genuinely different factorizations of 66 into irreducibles. Equivalently, irreducible \neq prime here: 22 divides the product (1+i5)(1i5)=6(1 + \iu\sqrt5)(1 - \iu\sqrt5) = 6 but neither factor (norms again). The ideal-theoretic repair of this failure — factorizing ideals rather than elements — is the birth of algebraic number theory; at our level, the example calibrates how special the Euclidean rings Z\Z, K[X]K[X], Z[i]\Z[\iu] of this chapter really are.

Method 2.21

To identify a quotient ring A/IA/I, hunt for a surjective morphism f ⁣:ABf \colon A \to B with kernel II and invoke Theorem 2.2; when A=C[X]A = C[X] is a polynomial ring, ff is usually an evaluation. Thus Z[X]/(X2+1)Z[i]\Z[X]/(X^2+1) \cong \Z[\iu] (evaluate at i\iu), K[X,Y]/(YX2)K[X]K[X,Y]/(Y - X^2) \cong K[X] (evaluate YY at X2X^2), R[X]/(X2+1)C\R[X]/(X^2+1) \cong \C. To show II prime or maximal, show the quotient is a domain or a field (Proposition 2.4).

2.3 Polynomials over a UFD: Gauss and Eisenstein

Throughout this section AA is a UFD with fraction field KK (constructed as the field of formal quotients a/ba/b, b0b \neq 0, exactly like Q\Q from Z\Z; the Year 2 volume did this construction for Q\Q, and it transfers verbatim). Our goal: factoriality passes from AA to A[X]A[X], and irreducibility over AA is essentially irreducibility over the bigger field KK.

Definition 2.22

The content c(P)c(P) of a nonzero PA[X]P \in A[X] is a gcd of its coefficients (defined up to a unit); PP is primitive if c(P)A×c(P) \in A^\times. Every PA[X]P \in A[X] writes P=c(P)P1P = c(P)\,P_1 with P1P_1 primitive, and every PK[X]{0}P \in K[X]\setminus\{0\} writes P=λP1P = \lambda P_1 with λK×\lambda \in K^\times and P1A[X]P_1 \in A[X] primitive (clear denominators, then factor out the content).

Lemma 2.23 (Gauss)

The product of two primitive polynomials of A[X]A[X] is primitive; consequently c(PQ)=c(P)c(Q)c(PQ) = c(P)c(Q) up to units.

Proof. Let P,QP, Q be primitive and suppose some irreducible (= prime, UFD) pp divides all coefficients of PQPQ. Reduce modulo pp: in (A/(p))[X](A/(p))[X], PˉQˉ=0\bar P \bar Q = 0. But A/(p)A/(p) is a domain ((p)(p) prime), so (A/(p))[X](A/(p))[X] is a domain (leading coefficients multiply), forcing Pˉ=0\bar P = 0 or Qˉ=0\bar Q = 0: pp divides all coefficients of PP or all of QQ, contradicting primitivity. For the consequence, write P=c(P)P1P = c(P)P_1, Q=c(Q)Q1Q = c(Q)Q_1: PQ=c(P)c(Q)P1Q1PQ = c(P)c(Q) P_1Q_1 with P1Q1P_1Q_1 primitive.

Theorem 2.24

Let AA be a UFD with fraction field KK.

  1. A primitive PA[X]P \in A[X] of degree 1\geq 1 is irreducible in A[X]A[X] iff it is irreducible in K[X]K[X].
  2. A[X]A[X] is a UFD; its irreducibles are the irreducibles of AA and the primitive polynomials irreducible over KK. In particular Z[X]\Z[X], and by induction K[X1,,Xn]K[X_1, \dots, X_n] and Z[X1,,Xn]\Z[X_1, \dots, X_n], are UFDs.

Proof. (1) (\Leftarrow) If P=QRP = QR in A[X]A[X] with Q,RQ, R nonunits, then neither factor is constant (a constant factor of a primitive polynomial is a unit), so the factorization is proper in K[X]K[X]. (\Rightarrow) Suppose P=QRP = QR with Q,RK[X]Q, R \in K[X] of degrees 1\geq 1. Write Q=λQ1Q = \lambda Q_1, R=μR1R = \mu R_1 with Q1,R1A[X]Q_1, R_1 \in A[X] primitive: P=λμQ1R1P = \lambda\mu\, Q_1R_1, and Q1R1Q_1R_1 is primitive by Gauss. Taking contents, λμA×\lambda\mu \in A^\times (both sides have unit content; formally, λμ=c(P)A×\lambda\mu = c(P) \in A^\times up to units, and in particular λμA\lambda \mu \in A): P=(λμQ1)R1P = (\lambda\mu Q_1) R_1 is a proper factorization in A[X]A[X].

(2) Existence: given P0P \neq 0 nonunit, factor P=c(P)P1P = c(P)P_1, factor c(P)c(P) into irreducibles of AA, and factor P1P_1 in the UFD K[X]K[X] as Qi\prod Q_i with QiK[X]Q_i \in K[X] irreducible; writing Qi=λiRiQ_i = \lambda_i R_i with RiA[X]R_i \in A[X] primitive (hence irreducible over KK, hence in A[X]A[X] by (1)), the product λi\prod \lambda_i is a unit of AA as before, and P1=uRiP_1 = u\prod R_i. Uniqueness: compare a factorization’s constant part and polynomial part; the constants multiply to c(P)c(P) (Gauss), unique by factoriality of AA; the polynomial parts give two factorizations in K[X]K[X] of the same polynomial, so they match up to constants of K×K^\times (factoriality of K[X]K[X], Theorem 2.18), and matching primitive polynomials associated in K[X]K[X] are associated in A[X]A[X]: if R=λRR = \lambda R' with R,RR, R' primitive and λK×\lambda \in K^\times, then taking contents forces λA×\lambda \in A^\times.

Theorem 2.25 (Irreducibility criteria)

Let AA be a UFD, KK its fraction field, and P=anXn++a0A[X]P = a_nX^n + \dots + a_0 \in A[X] primitive of degree n1n \geq 1.

  1. (Reduction) If pAp \in A is prime, panp \nmid a_n, and the reduction Pˉ\bar P is irreducible in (A/(p))[X](A/(p))[X], then PP is irreducible in K[X]K[X] (hence in A[X]A[X]).
  2. (Eisenstein) If some prime pp satisfies panp \nmid a_n, paip \mid a_i for 0i<n0 \leq i < n, and p2a0p^2 \nmid a_0, then PP is irreducible in K[X]K[X] (hence in A[X]A[X]).

Proof. By Theorem 2.24(1), a proper factorization over KK yields P=QRP = QR with Q,RA[X]Q, R \in A[X], degQ,degR1\deg Q, \deg R \geq 1 (constants are excluded: they would be units or spoil primitivity).

(1) Reduce mod pp: Pˉ=QˉRˉ\bar P = \bar Q\bar R in (A/(p))[X](A/(p))[X]. Since panp \nmid a_n and deg\deg can only drop under reduction, degQˉ=degQ1\deg \bar Q = \deg Q \geq 1 and degRˉ=degR1\deg\bar R = \deg R \geq 1 (their leading coefficients multiply to aˉn0\bar a_n \neq 0, so neither drops): Pˉ\bar P factors properly — contradiction.

(2) Reduce mod pp: QˉRˉ=Pˉ=aˉnXn\bar Q \bar R = \bar P = \bar a_n X^n (all lower coefficients die). In the domain (A/(p))[X](A/(p))[X], the factorizations of cXncX^n (c0c \ne 0) are into constants and pure powers cXkc'X^k: indeed if QˉRˉ=aˉnXn\bar Q\bar R = \bar a_nX^n, and say Qˉ\bar Q had a nonzero coefficient in degree <degQˉ< \deg\bar Q, take lowest nonzero terms: val(QˉRˉ)=valQˉ+valRˉ\operatorname{val}(\bar Q\bar R) = \operatorname{val}\bar Q + \operatorname{val}\bar R (domain), which must equal n=degQˉ+degRˉn = \deg\bar Q + \deg\bar R, forcing val=deg\operatorname{val} = \deg for both: both are monomials. As above, degrees do not drop, so QQ and RR have their constant terms Q(0),R(0)Q(0), R(0) divisible by pp — both, since both reductions are monomials of degree 1\geq 1. Then p2Q(0)R(0)=a0p^2 \mid Q(0)R(0) = a_0: contradiction.

Example 2.26

XnpX^n - p is irreducible over Q\Q for every prime pp and n1n \geq 1 (Eisenstein at pp): there are irreducible polynomials of every degree over Q\Q — in stark contrast with C\C (degree 11, d’Alembert–Gauss, proved in Chapter 16) and R\R (degrees 1,21, 2). The trick of shifting enlarges Eisenstein’s reach: the pp-th cyclotomic polynomial Φp=Xp1++X+1=Xp1X1\Phi_p = X^{p-1} + \dots + X + 1 = \frac{X^p - 1}{X - 1} has

Φp(X+1)=(X+1)p1X=Xp1+(p1)Xp2++(pp1),\Phi_p(X + 1) = \frac{(X+1)^p - 1}{X} = X^{p-1} + \binom{p}{1}X^{p-2} + \dots + \binom{p}{p-1},

Eisenstein at pp (p(pk)p \mid \binom pk for 0<k<p0 < k < p, and (pp1)=p≢0modp2\binom{p}{p-1} = p \not\equiv 0 \bmod p^2): Φp(X+1)\Phi_p(X+1), hence Φp\Phi_p, is irreducible over Q\Q. This is the algebraic heart of the 1717-gon story told in Chapter 4.

Method 2.27

To prove PZ[X]P \in \Z[X] irreducible over Q\Q: (i) make PP primitive; (ii) try Eisenstein, on P(X)P(X) and on shifts P(X±1)P(X \pm 1); (iii) try reduction modulo small primes not dividing the leading coefficient — irreducibility mod one pp suffices, and over Fp\mathbb F_p irreducibility is a finite check (no roots excludes degree-11 factors; then test the finitely many factors of each degree degP/2\leq \deg P/2); (iv) if all else fails, undetermined coefficients. Beware: reducibility mod every pp does not imply reducibility over Q\Q (Exercise 2.11).

2.4 Noetherian rings

Definition 2.28

A ring AA is Noetherian if every ideal of AA is finitely generated.

Proposition 2.29

AA is Noetherian iff every increasing sequence of ideals is eventually constant (ascending chain condition), iff every nonempty family of ideals has a maximal element (for inclusion).

Proof. (FG \Rightarrow ACC): for a chain I1I2I_1 \subseteq I_2 \subseteq \cdots, the union II is an ideal, generated by x1,,xrx_1, \dots, x_r; all xix_i lie in some INI_N, so I=IN=InI = I_N = I_n for nNn \geq N. (ACC \Rightarrow maximal elements): if a nonempty family F\mathcal F had no maximal element, pick I1FI_1 \in \mathcal F, then inductively In+1InI_{n+1} \supsetneq I_n in F\mathcal F (possible since InI_n is not maximal): an infinite strictly increasing chain. (This uses the axiom of dependent choices, a weak form of choice we do not fuss over.) (Maximal elements \Rightarrow FG): given an ideal II, the family of finitely generated ideals contained in II is nonempty ((0)(0)); a maximal element J=(x1,,xr)J = (x_1, \dots, x_r) must equal II: otherwise, adding xIJx \in I \setminus J to the generators produces a strictly bigger member of the family.

Theorem 2.30 (Hilbert’s basis theorem)

If AA is Noetherian, so is A[X]A[X]. Hence so are A[X1,,Xn]A[X_1, \dots, X_n], and every quotient of them.

Proof. Let II be an ideal of A[X]A[X], and suppose II is not finitely generated. Build a sequence: f1I{0}f_1 \in I \setminus \{0\} of minimal degree, and inductively fk+1I(f1,,fk)f_{k+1} \in I \setminus (f_1, \dots, f_k) of minimal degree (the set is nonempty by assumption). Degrees dk=degfkd_k = \deg f_k are nondecreasing (by minimality of each choice: fk+1f_{k+1} was available at step k+1k+1... precisely, fk+1(f1,,fk)(f1,,fk1)f_{k+1} \notin (f_1,\dots,f_k) \supseteq (f_1, \dots, f_{k-1}), so fk+1f_{k+1} competed at step kk and lost or tied: dk+1dkd_{k+1} \geq d_k). Let akAa_k \in A be the leading coefficient of fkf_k. The chain of ideals (a1)(a1,a2)(a_1) \subseteq (a_1, a_2) \subseteq \cdots stabilizes: an+1(a1,,an)a_{n+1} \in (a_1, \dots, a_n) for some nn, say an+1=knukaka_{n+1} = \sum_{k\leq n} u_k a_k. Consider

g=fn+1k=1nukXdn+1dkfk.g = f_{n+1} - \sum_{k=1}^{n} u_k X^{\,d_{n+1} - d_k} f_k .

Then gI(f1,,fn)g \in I \setminus (f_1, \dots, f_n) (the sum lies in the ideal, fn+1f_{n+1} does not), yet the coefficient of degree dn+1d_{n+1} cancels: degg<dn+1\deg g < d_{n+1}, contradicting the minimality of dn+1=degfn+1d_{n+1} = \deg f_{n+1}.

Iterating, A[X1,,Xn]=(A[X1,,Xn1])[Xn]A[X_1, \dots, X_n] = (A[X_1, \dots, X_{n-1}])[X_n] is Noetherian; a quotient A/IA/I is Noetherian because its ideals J/IJ/I lift to ideals of AA (correspondence), where finitely many generators project onto generators.

Remark 2.31

Noetherianity is the finiteness axiom of algebraic geometry: any system of polynomial equations in nn variables, however infinite, is equivalent to finitely many of them — its solution set is cut out by finitely many polynomials. PIDs are Noetherian (trivially); Z[X1,X2,]\Z[X_1, X_2, \dots] in infinitely many variables is not ((X1)(X1,X2)(X_1) \subsetneq (X_1, X_2) \subsetneq \cdots). Non-Noetherian rings also occur naturally in analysis: continuous functions on [0,1]\intcc01 form one (Exercise 2.10).

2.5 Exercises

Exercise 2.1

Identify the quotients: (a) Z[X]/(X2+1)Z[i]\Z[X]/(X^2 + 1) \cong \Z[\iu]; (b) R[X]/(X2+1)C\R[X]/(X^2+1) \cong \C; (c) F2[X]/(X2+X+1)\mathbb F_2[X]/(X^2 + X + 1) is a field with 44 elements — write its multiplication table.

Solution

Solution of Exercise 2.1.

(a) Evaluation f ⁣:Z[X]Z[i]f \colon \Z[X] \to \Z[\iu], PP(i)P \mapsto P(\iu), is a surjective ring morphism (a+bXa+bia + bX \mapsto a + b\iu). Kernel: divide PP by the monic X2+1X^2 + 1 in Z[X]\Z[X]: P=(X2+1)Q+(bX+a)P = (X^2 + 1)Q + (bX + a) with a,bZa, b \in \Z; then P(i)=a+bi=0P(\iu) = a + b\iu = 0 iff a=b=0a = b = 0. So kerf=(X2+1)\ker f = (X^2+1) and Theorem 2.2 concludes.

(b) The same computation with R\R-coefficients: R[X]/(X2+1)C\R[X]/(X^2+1) \cong \C — this is the cleanest construction of C\C.

(c) X2+X+1X^2 + X + 1 has no root in F2\mathbb F_2 (0,110, 1 \mapsto 1), so, having degree 22, it is irreducible: the quotient F4=F2[X]/(X2+X+1)\mathbb F_4 = \mathbb F_2[X]/(X^2+X+1) is a field (Proposition 2.4; (P)(P) maximal in K[X]K[X] when PP is irreducible, since K[X]K[X] is a PID: an ideal (D)(P)(D) \supseteq (P) means DPD \mid P). Its four elements are 0,1,ω,ω+10, 1, \omega, \omega + 1 where ω=Xˉ\omega = \bar X, with ω2=ω+1\omega^2 = \omega + 1. Multiplication table (nonzero elements):

ωω=ω+1,ω(ω+1)=ω2+ω=1,(ω+1)2=ω2+1=ω.\omega \cdot \omega = \omega + 1, \qquad \omega(\omega + 1) = \omega^2 + \omega = 1, \qquad (\omega+1)^2 = \omega^2 + 1 = \omega .

The nonzero elements form a cyclic group of order 33 generated by ω\omega.

Exercise 2.2

(a) Show that in a UFD, every irreducible element is prime. (b) Show that a finite integral domain is a field. (c) Deduce that in a finite ring, every prime ideal is maximal.

Solution

Solution of Exercise 2.2.

(a) Let pp be irreducible in a UFD and pabp \mid ab, say ab=pcab = pc, with a,b0a, b \neq 0 (else trivial). If aa or bb is a unit, pp divides the other. Otherwise factor aa, bb and cc into irreducibles: the two factorizations of abab,

(factors of a)(factors of b)=p(factors of c),(\text{factors of } a)(\text{factors of } b) = p \cdot (\text{factors of } c),

must agree up to order and associates: pp is an associate of some irreducible factor of aa or of bb, hence divides it.

(b) Let AA be a finite domain and x0x \neq 0. The map yxyy \mapsto xy is injective (xy=xyx(yy)=0y=yxy = xy' \Rightarrow x(y - y') = 0 \Rightarrow y = y'), hence surjective (AA finite): 1=xy1 = xy for some yy.

(c) If p\mathfrak p is prime in a finite ring AA, then A/pA/\mathfrak p is a finite domain, hence a field by (b), so p\mathfrak p is maximal (Proposition 2.4).

Exercise 2.3

In Z[i5]\Z[\iu\sqrt5]: check that 33, 1+i51 + \iu\sqrt5 and 1i51 - \iu\sqrt5 are irreducible, that 9=33=(2+i5)(2i5)9 = 3\cdot 3 = (2 + \iu\sqrt5)(2 - \iu\sqrt5), and conclude again (after Proposition 2.12) that Z[i5]\Z[\iu\sqrt5] is not a UFD. Where exactly does uniqueness fail?

Solution

Solution of Exercise 2.3.

Norms: N(3)=9N(3) = 9, N(1±i5)=6N(1 \pm \iu\sqrt5) = 6, N(2±i5)=9N(2 \pm \iu\sqrt5) = 9. The equations x2+5y2=2x^2 + 5y^2 = 2 and x2+5y2=3x^2 + 5y^2 = 3 have no integer solutions, so no element has norm 22 or 33. A proper factorization of 33 would need two factors of norm 33: impossible — 33 is irreducible. A proper factorization of 1±i51 \pm \iu\sqrt5 (norm 66) would need factors of norms 2,32, 3: impossible. Same for 2±i52 \pm \iu\sqrt5 (norm 99: factors would have norm 33). Now

9=33=(2+i5)(2i5),9 = 3 \cdot 3 = (2 + \iu\sqrt5)(2 - \iu\sqrt5),

two factorizations into irreducibles. They are genuinely different: the units are ±1\pm 1 (norm 11), and 2±i5±32 \pm \iu\sqrt5 \neq \pm 3. So uniqueness fails — while existence of factorizations holds in Z[i5]\Z[\iu\sqrt5] (Exercise 2.10(c)): non-factoriality here is purely a uniqueness failure. (Consistently, Proposition 2.12: these irreducibles are not prime.)

Exercise 2.4 ★★

(a) Show that Z[i]\Z[\iu] is Euclidean for the norm N(x+iy)=x2+y2N(x + \iu y) = x^2 + y^2: given a,b0a, b \neq 0, choose qZ[i]q \in \Z[\iu] nearest to a/bCa/b \in \C. (b) Determine Z[i]×\Z[\iu]^\times. (c) Same questions for Z[i2]\Z[\iu\sqrt2] and N(x+iy2)=x2+2y2N(x + \iu y\sqrt2) = x^2 + 2y^2. Why does the same argument fail for Z[i5]\Z[\iu\sqrt5]?

Solution

Solution of Exercise 2.4.

(a) Let a,bZ[i]a, b \in \Z[\iu], b0b \neq 0, and a/b=x+iyCa/b = x + \iu y \in \C. Choose integers m,nm, n with xm12\abs{x - m} \leq \frac12, yn12\abs{y - n} \leq \frac12, and set q=m+inq = m + \iu n, r=abqr = a - bq. Then

N(r)=N(b)abq2N(b)(14+14)=N(b)2<N(b).N(r) = N(b)\,\abs*{\tfrac ab - q}^2 \leq N(b)\Bigl(\tfrac14 + \tfrac14\Bigr) = \tfrac{N(b)}2 < N(b).

So NN is a Euclidean function (N(r)<N(b)N(r) < N(b) or r=0r = 0).

(b) If uv=1uv = 1 then N(u)N(v)=1N(u)N(v) = 1 with N(u)NN(u) \in \N: N(u)=1N(u) = 1, i.e. x2+y2=1x^2 + y^2 = 1: u{±1,±i}u \in \{\pm 1, \pm\iu\}; conversely these are units.

(c) For Z[i2]\Z[\iu\sqrt2]: the same rounding gives a/bq214+24=34<1\abs{a/b - q}^2 \leq \frac14 + \frac{2}4 = \frac34 < 1: Euclidean; units: x2+2y2=1x^2 + 2y^2 = 1 gives ±1\pm 1. For Z[i5]\Z[\iu\sqrt5] the bound becomes 14+54=32>1\frac14 + \frac54 = \frac32 > 1: the rounding argument fails — and must fail, since Z[i5]\Z[\iu\sqrt5] is not even a UFD (Exercise 2.3), while Euclidean would imply UFD (Theorems 2.14 and 2.18).

Exercise 2.5 ★★

Let AA be a ring. (a) Show that if xx is nilpotent (xn=0x^n = 0 for some nn) then 1+xA×1 + x \in A^\times. (b) Show that if AA is a domain, A[X]×=A×A[X]^\times = A^\times; give a counterexample over Z/4Z\Z/4\Z. (c) Show that a domain has no idempotents (e2=ee^2 = e) other than 0,10, 1, and none nilpotent other than 00.

Solution

Solution of Exercise 2.5.

(a) If xn=0x^n = 0:

(1+x)(1x+x2+(1)n1xn1)=1+(1)n1xn=1.(1 + x)\bigl(1 - x + x^2 - \dots + (-1)^{n-1}x^{n-1}\bigr) = 1 + (-1)^{n-1}x^n = 1 .

(b) In a domain, deg(PQ)=degP+degQ\deg(PQ) = \deg P + \deg Q; PQ=1PQ = 1 forces degP=degQ=0\deg P = \deg Q = 0 and P,QA×P, Q \in A^\times: A[X]×=A×A[X]^\times = A^\times. Over Z/4Z\Z/4\Z: (1+2X)2=1+4X+4X2=1(1 + 2X)^2 = 1 + 4X + 4X^2 = 1, so 1+2X1 + 2X is a unit of degree 11 (here 22 is nilpotent; compare (a)).

(c) e2=ee^2 = e gives e(e1)=0e(e - 1) = 0, so e{0,1}e \in \{0, 1\} in a domain. If xn=0x^n = 0 with n1n \geq 1 minimal and x0x \ne 0, then n2n \geq 2 and xxn1=0x \cdot x^{n-1} = 0 with both factors nonzero: contradiction.

Exercise 2.6 ★★

In A=K[X,Y]A = K[X, Y]: (a) show that the ideal (X,Y)(X, Y) is maximal but not principal — so K[X,Y]K[X,Y] is a UFD (Theorem 2.24) that is not a PID; (b) identify K[X,Y]/(YX2)K[X, Y]/(Y - X^2) and K[X,Y]/(XY1)K[X,Y]/(XY - 1) as subrings of rational functions; (c) is (YX2)(Y - X^2) prime? maximal?

Solution

Solution of Exercise 2.6.

(a) K[X,Y]/(X,Y)KK[X,Y]/(X,Y) \cong K (evaluate at (0,0)(0,0)): a field, so (X,Y)(X,Y) is maximal. If (X,Y)=(P)(X, Y) = (P): PXP \mid X forces (degrees in YY) PK[X]P \in K[X], and PYP \mid Y then forces PKP \in K; P=0P = 0 is absurd and PK×P \in K^\times would give (P)=K[X,Y](P) = K[X,Y], contradicting properness (K[X,Y]/(X,Y)K0K[X,Y]/(X,Y) \cong K \neq 0). So (X,Y)(X,Y) is not principal.

(b) Evaluation P(X,Y)P(X,X2)P(X, Y) \mapsto P(X, X^2) maps K[X,Y]K[X,Y] onto K[X]K[X]; its kernel is (YX2)(Y - X^2): dividing by the monic-in-YY polynomial YX2Y - X^2, P=(YX2)Q+R(X)P = (Y - X^2)Q + R(X), and P(X,X2)=R(X)P(X, X^2) = R(X). So K[X,Y]/(YX2)K[X]K[X,Y]/(Y - X^2) \cong K[X] — the coordinate ring of a parabola, isomorphic to a line’s.

Evaluation P(X,Y)P(X,X1)P(X, Y) \mapsto P(X, X^{-1}) maps K[X,Y]K[X, Y] onto the ring K[X,X1]K[X, X^{-1}] of Laurent polynomials. Its kernel contains (XY1)(XY - 1); conversely, modulo XY1XY - 1 every class has a representative R=n0anXn+m1bmYmR = \sum_{n \geq 0} a_nX^n + \sum_{m \geq 1} b_m Y^m (replace each product XYXY by 11 repeatedly), and R(X,X1)=anXn+bmXm=0R(X, X^{-1}) = \sum a_n X^n + \sum b_m X^{-m} = 0 forces all an=bm=0a_n = b_m = 0. Hence K[X,Y]/(XY1)K[X,X1]K[X, Y]/(XY - 1) \cong K[X, X^{-1}] — the coordinate ring of a hyperbola: the line with one point removed.

(c) (YX2)(Y - X^2) is prime (the quotient K[X]K[X] is a domain) but not maximal (K[X]K[X] is not a field; concretely (YX2)(YX2,X)K[X,Y](Y - X^2) \subsetneq (Y - X^2,\, X) \subsetneq K[X,Y]).

Exercise 2.7 ★★

Irreducible or not over Q\Q: X512X3+36X12X^5 - 12X^3 + 36X - 12; X4+X+1X^4 + X + 1 (reduce mod 22); X4+4X^4 + 4; Φ8=X4+1\Phi_8 = X^4 + 1 (shift by 11); X3X1X^3 - X - 1.

Solution

Solution of Exercise 2.7.

X512X3+36X12X^5 - 12X^3 + 36X - 12: Eisenstein at p=3p = 3 (312,36,123 \mid 12, 36, 12; 9129 \nmid 12; 313 \nmid 1): irreducible. (At p=2p = 2 Eisenstein fails: 4124 \mid 12.)

X4+X+1X^4 + X + 1: reduce mod 22. No root in F2\mathbb F_2; the only irreducible quadratic over F2\mathbb F_2 is X2+X+1X^2 + X + 1, and (X2+X+1)2=X4+X2+1X4+X+1(X^2+X+1)^2 = X^4 + X^2 + 1 \neq X^4 + X + 1. So X4+X+1X^4 + X + 1 is irreducible over F2\mathbb F_2, hence over Q\Q (Theorem 2.25(1); it is monic).

X4+4X^4 + 4: reducible — the Sophie Germain identity, X4+4=(X22X+2)(X2+2X+2)X^4 + 4 = (X^2 - 2X + 2)(X^2 + 2X + 2).

X4+1X^4 + 1: shift, (X+1)4+1=X4+4X3+6X2+4X+2(X+1)^4 + 1 = X^4 + 4X^3 + 6X^2 + 4X + 2: Eisenstein at 22. A factorization of X4+1X^4+1 would shift to one of (X+1)4+1(X+1)^4 + 1: irreducible.

X3X1X^3 - X - 1: a cubic is reducible over Q\Q iff it has a rational root; a rational root of a monic integer polynomial is an integer dividing the constant term (rational root theorem: if (p/q)(p/q) in lowest terms is a root, q1q \mid 1, p1p \mid -1), and ±1\pm 1 are not roots (1-1 and 1-1): irreducible.

Exercise 2.8 ★★

(a) From Theorem 2.9, prove that Euler’s function is multiplicative on coprime arguments and that φ(pk)=pk1(p1)\varphi(p^k) = p^{k-1}(p-1); recover φ(n)=npn(11p)\varphi(n) = n\prod_{p \mid n}(1 - \frac1p). (b) Solve: x2(mod7)x \equiv 2 \pmod 7, x5(mod11)x \equiv 5 \pmod{11}, x1(mod13)x \equiv 1 \pmod{13}, exhibiting the idempotents eke_k of the proof of Theorem 2.9.

Solution

Solution of Exercise 2.8.

(a) For gcd(m,n)=1\gcd(m, n) = 1, Theorem 2.9 gives a ring isomorphism Z/mnZZ/mZ×Z/nZ\Z/mn\Z \cong \Z/m\Z \times \Z/n\Z. An element of a product ring is a unit iff both coordinates are, so (Z/mnZ)×(Z/mZ)××(Z/nZ)×(\Z/mn\Z)^\times \cong (\Z/m\Z)^\times \times (\Z/n\Z)^\times and φ(mn)=φ(m)φ(n)\varphi(mn) = \varphi(m)\varphi(n). For a prime power, the non-units of Z/pkZ\Z/p^k\Z are the classes of multiples of pp: φ(pk)=pkpk1\varphi(p^k) = p^k - p^{k-1}. Hence

φ(n)=i(piαipiαi1)=npn(11p).\varphi(n) = \prod_i \bigl(p_i^{\alpha_i} - p_i^{\alpha_i-1}\bigr) = n \prod_{p \mid n}\Bigl(1 - \frac1p\Bigr).

(b) M=71113=1001M = 7 \cdot 11 \cdot 13 = 1001. Idempotents: e1(1,0,0)e_1 \equiv (1, 0, 0): 143=11133(mod7)143 = 11\cdot13 \equiv 3 \pmod 7 and 3513 \cdot 5 \equiv 1: e1=1435=715e_1 = 143 \cdot 5 = 715. e2e_2: 913(mod11)91 \equiv 3 \pmod{11}, 3413 \cdot 4 \equiv 1: e2=914=364e_2 = 91\cdot4 = 364. e3e_3: 771(mod13)77 \equiv -1 \pmod{13}: e3=7712=924e_3 = 77 \cdot 12 = 924. Then

x2e1+5e2+1e3=1430+1820+924=4174170(mod1001),x \equiv 2\,e_1 + 5\,e_2 + 1\,e_3 = 1430 + 1820 + 924 = 4174 \equiv 170 \pmod{1001},

and indeed 170=247+2=1511+5=1313+1170 = 24\cdot7 + 2 = 15\cdot11 + 5 = 13\cdot13 + 1.

Exercise 2.9 ★★★

(The nilradical) Let Nil(A)\operatorname{Nil}(A) be the set of nilpotent elements. (a) Show that Nil(A)\operatorname{Nil}(A) is an ideal contained in every prime ideal. (b) Conversely, let aa be non-nilpotent; using Zorn’s lemma on the ideals avoiding S={an:nN}S = \{a^n : n \in \N\}, produce a prime ideal not containing aa. Conclude:

Nil(A)=p primep.\operatorname{Nil}(A) = \bigcap_{\mathfrak p \text{ prime}} \mathfrak p .
Solution

Solution of Exercise 2.9.

(a) If xn=0x^n = 0 and ym=0y^m = 0, the binomial expansion of (x+y)n+m(x+y)^{n+m} has every term xiyjx^iy^j with i+j=n+mi + j = n + m, so ini \geq n or jmj \geq m: each term vanishes, and x+yx + y is nilpotent; (ax)n=anxn=0(ax)^n = a^nx^n = 0: Nil(A)\operatorname{Nil}(A) is an ideal. If p\mathfrak p is prime and xn=0px^n = 0 \in \mathfrak p, induction on nn gives xpx \in \mathfrak p (xxn1px \cdot x^{n-1} \in \mathfrak p).

(b) Let aNil(A)a \notin \operatorname{Nil}(A) and S={an:n1}S = \{a^n : n \geq 1\}, so 0S0 \notin S. The set E\mathcal E of ideals disjoint from SS contains (0)(0) and is inductive (the union of a chain of ideals disjoint from SS is an ideal disjoint from SS): Zorn provides pE\mathfrak p \in \mathcal E maximal. p\mathfrak p is proper (apa \notin \mathfrak p, since aSa \in S). Primality: let x,ypx, y \notin \mathfrak p. By maximality, p+(x)\mathfrak p + (x) and p+(y)\mathfrak p + (y) meet SS: amp+(x)a^m \in \mathfrak p + (x), anp+(y)a^n \in \mathfrak p + (y). Multiplying, am+np+(xy)a^{m+n} \in \mathfrak p + (xy). If xypxy \in \mathfrak p, then am+npSa^{m+n} \in \mathfrak p \cap S: absurd. So xypxy \notin \mathfrak p — contrapositive of primality. Hence every non-nilpotent element avoids some prime ideal; with (a), Nil(A)=pp\operatorname{Nil}(A) = \bigcap_{\mathfrak p} \mathfrak p.

Exercise 2.10 ★★★

(a) Let AA be Noetherian and f ⁣:AAf \colon A \to A a surjective ring morphism. Show that ff is injective. (Consider kerfkerf2\ker f \subseteq \ker f^2 \subseteq \cdots.) (b) Show that the ring C([0,1],R)\mathcal C(\intcc01, \R) of continuous functions is not Noetherian. (Consider In={f:f=0 on [0,1/n]}I_n = \{f : f = 0 \text{ on } \intcc0{1/n}\}.) (c) Show that in a Noetherian domain, every nonzero nonunit is a (finite) product of irreducibles — so non-factoriality of Z[i5]\Z[\iu\sqrt 5] is a failure of uniqueness only.

Solution

Solution of Exercise 2.10.

(a) The chain kerfkerf2\ker f \subseteq \ker f^2 \subseteq \cdots stabilizes (Proposition 2.29): kerfn=kerfn+1\ker f^n = \ker f^{n+1} for some nn. Let xkerfx \in \ker f. As ff, hence fnf^n, is surjective, x=fn(y)x = f^n(y) for some yy; then fn+1(y)=f(x)=0f^{n+1}(y) = f(x) = 0, so ykerfn+1=kerfny \in \ker f^{n+1} = \ker f^n, i.e. x=fn(y)=0x = f^n(y) = 0.

(b) In={fC([0,1],R):f[0,1/n]=0}I_n = \{f \in \mathcal C(\intcc01, \R) : f\restriction_{ \intcc0{1/n}} = 0\} is an ideal, and InIn+1I_n \subseteq I_{n+1}. The inclusion is strict: xmax(0,x1n+1)x \mapsto \max\bigl(0, x - \frac1{n+1}\bigr) vanishes on [0,1n+1]\intcc0{\frac1{n+1}} but not on [0,1n]\intcc0{\frac1n}. An infinite strictly increasing chain contradicts Proposition 2.29.

(c) Suppose the set of nonzero nonunits admitting no factorization into irreducibles is nonempty. The corresponding family of ideals {(a)}\{(a)\} has a maximal element (a)(a) (Proposition 2.29). The element aa is not irreducible (an irreducible is its own factorization), so a=bca = bc with b,cb, c nonunits; (a)(b)(a) \subseteq (b) is strict (as (a)=(b)(a) = (b) would give b=adb = ad, a=adca = adc, so dc=1dc = 1: cc a unit), likewise (a)(c)(a) \subsetneq (c). By maximality, bb and cc both factor into irreducibles; concatenating factors aa: contradiction. Applied to Z[i5]\Z[\iu\sqrt5]Noetherian as a quotient of Z[X]\Z[X] (Theorem 2.30, Z[i5]Z[X]/(X2+5)\Z[\iu\sqrt5] \cong \Z[X]/(X^2+5)) — this shows factorizations exist there; Exercise 2.3 showed uniqueness is what fails.

Exercise 2.11 ★★★

Let P=X4+1P = X^4 + 1. (a) Show that PP is irreducible over Q\Q (Exercise 2.7). (b) Show that PP is reducible modulo every prime pp: treat p=2p = 2; then, for odd pp, show that 8p218 \mid p^2 - 1 and admit for now (proved in Chapter 4) that the multiplicative group of the field with p2p^2 elements is cyclic, to conclude that PP splits into two quadratic factors mod pp; make them explicit when one of 1-1, 22, 2-2 is a square mod pp, and show one of them always is.

Solution

Solution of Exercise 2.11.

(a) Exercise 2.7: shift and Eisenstein at 22.

(b) Mod 22: X4+1=(X+1)4X^4 + 1 = (X + 1)^4. Now let pp be odd. The squares form a subgroup of index 22 in (Z/pZ)×(\Z/p\Z)^\times: the morphism xx2x \mapsto x^2 has kernel {±1}\{\pm 1\} (two elements: X21X^2 - 1 has at most 22 roots in a field, and 111 \neq -1 for odd pp), so its image has p12\frac{p-1}2 elements. Consequently, the product of two non-squares is a square (in the order-22 quotient group, xy=xˉyˉ\overline{xy} = \bar x\bar y). Hence at least one of 1-1, 22, 2-2 is a square mod pp (if 1-1 and 22 are not, 2=(1)2-2 = (-1)\cdot 2 is). In each case X4+1X^4 + 1 factors mod pp:

  • 1=c2-1 = c^2: X4+1=X4c2=(X2c)(X2+c)X^4 + 1 = X^4 - c^2 = (X^2 - c)(X^2 + c);
  • 2=c22 = c^2: (X2+cX+1)(X2cX+1)=X4+(2c2)X2+1=X4+1(X^2 + cX + 1)(X^2 - cX + 1) = X^4 + (2 - c^2)X^2 + 1 = X^4 + 1;
  • 2=c2-2 = c^2: (X2+cX1)(X2cX1)=X4(c2+2)X2+1=X4+1(X^2 + cX - 1)(X^2 - cX - 1) = X^4 - (c^2 + 2)X^2 + 1 = X^4 + 1.

So X4+1X^4+1 is reducible modulo every prime, yet irreducible over Q\Q: the reduction criterion (Theorem 2.25(1)) detects irreducibility but its failure proves nothing.

(For the structural reason: p21=(p1)(p+1)p^2 - 1 = (p-1)(p+1) is a product of two consecutive even numbers, so 8p218 \mid p^2 - 1; the cyclic group Fp2×\mathbb F_{p^2}^\times (cyclicity proved in Chapter 4) then contains an element ζ\zeta of order 88, a root of X4+1X^4 + 1; its minimal polynomial over Fp\mathbb F_p divides X4+1X^4+1 and has degree 2\leq 2X4+1X^4+1 can never be irreducible mod pp.)

Exercise 2.12 ★★

(Idempotents split rings) An element ee of a commutative ring AA is idempotent if e2=ee^2 = e. (a) Show that if ee is idempotent, so is 1e1 - e, and that the map x(ex,(1e)x)x \mapsto (ex, (1-e)x) is a ring isomorphism AAe×A(1e)A \cong Ae \times A(1-e), where AeAe is a ring with unit ee. (b) Find all idempotents of a domain, and of Z/12Z\Z/12\Z; exhibit the isomorphism Z/12ZZ/4Z×Z/3Z\Z/12\Z \cong \Z/4\Z \times \Z/3\Z by naming its two nontrivial idempotents. (c) Show that the CRT decomposition of Z/nZ\Z/n\Z (Example 2.10) corresponds exactly to the idempotents ei1modpiaie_i \equiv 1 \bmod p_i^{a_i}, ei0e_i \equiv 0 modulo the other prime powers: rings decompose along their idempotents as spaces decompose along projections.

Solution

Solution of Exercise 2.12.

(a) (1e)2=12e+e2=1e(1-e)^2 = 1 - 2e + e^2 = 1 - e. The map φ(x)=(ex,(1e)x)\varphi(x) = (ex, (1-e)x) is additive and multiplicative into the product of the two ideals: exey=e2xy=e(xy)exey = e^2xy = e(xy), and AeAe is a commutative ring with unit ee (eex=exe\cdot ex = ex). Injective: ex=0ex = 0 and (1e)x=0(1-e)x = 0 sum to x=0x = 0. Surjective: (ea,(1e)b)(ea, (1-e)b) is the image of ea+(1e)bea + (1-e)b (compute both components using e(1e)=0e(1-e) = 0). Units map to (1,0)(1, 0)-style pairs correctly: φ(1)=(e,1e)\varphi(1) = (e, 1-e), the unit of the product.

(b) In a domain, e(e1)=0e(e - 1) = 0 forces e{0,1}e \in \{0, 1\}: only trivial idempotents. In Z/12Z\Z/12\Z, solving e2ee^2 \equiv e: e{0,1,4,9}e \in \{0, 1, 4, 9\}. The nontrivial pair {4,9}\{4, 9\}: 4+9=1314 + 9 = 13 \equiv 1, 49=3604\cdot9 = 36 \equiv 0, and Z/12Z4={0,4,8}Z/3Z\Z/12\Z\cdot4 = \{0, 4, 8\} \cong \Z/3\Z (unit 44), Z/12Z9={0,3,6,9}Z/4Z\Z/12\Z\cdot9 = \{0, 3, 6, 9\} \cong \Z/4\Z (unit 99): the CRT splitting Z/12ZZ/4Z×Z/3Z\Z/12\Z \cong \Z/4\Z\times\Z/3\Z, with 9(1,0)9 \leftrightarrow (1, 0) and 4(0,1)4 \leftrightarrow (0, 1).

(c) Under the CRT isomorphism Z/nZiZ/piaiZ\Z/n\Z \cong \prod_i \Z/p_i^{a_i}\Z, the element eie_i with the stated congruences corresponds to the tuple with 11 in slot ii and 00 elsewhere: the elementary idempotents of the product. Conversely a complete family of orthogonal idempotents (eiej=0e_ie_j = 0 for iji \neq j, ei=1\sum e_i = 1) reassembles the product decomposition by (a), inductively. Idempotents are to rings what orthogonal projections are to Hilbert spaces (Chapter 13): the coordinates of an internal direct decomposition.

2.6 Problem: Fermat’s two-squares theorem

Problem 2.1

Weekend problem — sums of two squares, via Z[i]\Z[\iu]

Which integers are sums of two squares? Fermat’s answer (1640) is one of arithmetic’s gems; the Gaussian integers turn its proof into ring theory. Throughout, N(x+iy)=x2+y2N(x + \iu y) = x^2 + y^2 denotes the norm, Z[i]\Z[\iu] is Euclidean (Exercise 2.4), hence a PID and a UFD, and Gaussian prime means prime (= irreducible) element of Z[i]\Z[\iu].

Part I — Norms and Gaussian primes.

  1. Verify N(zw)=N(z)N(w)N(zw) = N(z)N(w), deduce again Z[i]×={±1,±i}\Z[\iu]^\times = \{\pm1, \pm\iu\}, and prove the Brahmagupta identity: a product of two sums of two squares is a sum of two squares.
  2. Show that if N(z)N(z) is a prime number, then zz is a Gaussian prime.
  3. Show that every Gaussian prime π\pi divides exactly one prime number pp (consider N(π)=ππˉN(\pi) = \pi\bar\pi), and that then N(π){p,p2}N(\pi) \in \{p, p^2\}.
  4. Deduce the dichotomy: for each prime pp, either pp stays prime in Z[i]\Z[\iu] (and no Gaussian prime of norm pp exists), or p=ππˉp = \pi\bar\pi with π\pi a Gaussian prime of norm pp — and then p=a2+b2p = a^2 + b^2.

Part II — Wilson’s theorem and 1-1 modulo pp.

  1. Prove Wilson’s theorem: for pp prime, (p1)!1(modp)(p-1)! \equiv -1 \pmod p. (Pair each residue with its inverse; which ones are self-paired?)
  2. Let pp be an odd prime and m=p12m = \frac{p-1}2. Show that (m!)2(1)m+1(modp)(m!)^2 \equiv (-1)^{m+1} \pmod p (in (p1)!(p-1)!, replace each factor k>mk > m by (pk)-(p - k)).
  3. Conclude: 1-1 is a square modulo pp iff p=2p = 2 or p1(mod4)p \equiv 1 \pmod 4. (For the “only if”: if x21x^2 \equiv -1, what is the order of xx in (Z/pZ)×(\Z/p\Z)^\times, and what does Lagrange say?)

Part III — The splitting law.

  1. Let p1(mod4)p \equiv 1 \pmod 4, and xx with px2+1=(x+i)(xi)p \mid x^2 + 1 = (x + \iu)(x - \iu). Show that pp is not a Gaussian prime, and conclude with Part I: p=a2+b2p = a^2 + b^2.
  2. Let p3(mod4)p \equiv 3 \pmod 4. Show directly that pp is not a sum of two squares (squares mod 44), and deduce that pp stays a Gaussian prime.
  3. Settle p=2p = 2: exhibit the factorization 2=i(1+i)22 = -\iu(1+\iu)^2 and check that 1+i1 + \iu is a Gaussian prime. (22 is the unique ramified prime: divisible by the square of a Gaussian prime up to a unit.)
  4. Assemble the classification of Gaussian primes, up to units: 1+i1 + \iu; the integers p3(mod4)p \equiv 3 \pmod 4; the conjugate pairs π,πˉ\pi, \bar\pi of norm p1(mod4)p \equiv 1 \pmod 4. Verify it on 5=(2+i)(2i)5 = (2+\iu)(2-\iu) and on 33.

Part IV — The two-squares theorem.

  1. Prove the direct half: if in the factorization n=piαin = \prod p_i^{\alpha_i} every prime 3(mod4)\equiv 3 \pmod 4 appears with an even exponent, then nn is a sum of two squares. (Brahmagupta + Parts II–III.)
  2. Prove the converse: if n=a2+b2=N(a+ib)n = a^2 + b^2 = N(a + \iu b) and q3(mod4)q \equiv 3 \pmod 4 divides nn, show that qq, a Gaussian prime, divides a+iba + \iu b or aiba - \iu b, that it in fact divides both aa and bb, and conclude by induction on nn that the exponent of qq in nn is even.
  3. State the final theorem. Which of 20252025, 20262026, 20272027 are sums of two squares? (2025=81252025 = 81 \cdot 25; 2026=210132026 = 2 \cdot 1013, 10131013 prime; 20272027 prime.)
  4. (Epilogue) Show that a prime p1(mod4)p \equiv 1 \pmod 4 is a sum of two squares in an essentially unique way: if p=a2+b2=c2+d2p = a^2 + b^2 = c^2 + d^2 (positive integers), then {a,b}={c,d}\{a, b\} = \{c, d\}. (Uniqueness of factorization in Z[i]\Z[\iu].)

Part V — Counting representations: Jacobi’s formula and Leibniz’s series. Write r2(n)=#{(a,b)Z2:a2+b2=n}r_2(n) = \#\{(a, b) \in \Z^2 : a^2 + b^2 = n\} (ordered pairs, signs and zeros included), and let χ\chi be the nontrivial character mod 44: χ(d)=+1\chi(d) = +1 if d1d \equiv 1, 1-1 if d3(mod4)d \equiv 3 \pmod4, 00 if dd even.

  1. (Warm-up, by contrast) Which integers are differences of two squares? Show: n=a2b2n = a^2 - b^2 with a,bZa, b \in \Z iff n≢2(mod4)n \not\equiv 2 \pmod 4 — no ring theory needed, and no structure comparable to what follows.
  2. Show that r2(n)r_2(n) is the number of zZ[i]z \in \Z[\iu] with N(z)=nN(z) = n. Writing n=2ajpjbjkqkckn = 2^{a}\prod_jp_j^{b_j} \prod_kq_k^{c_k} with pj1p_j \equiv 1, qk3(mod4)q_k \equiv 3 \pmod4, use the classification of question 11 and unique factorization to show: such zz exist iff all ckc_k are even, and in that case

    r2(n)=4j(bj+1).r_2(n) = 4\prod_j\,(b_j + 1) .

    (Count: z=u(1+i)ajπjsjπˉjbjsjkqkck/2z = u\,(1+\iu)^{a}\prod_j\pi_j^{s_j} \bar\pi_j^{\,b_j - s_j}\prod_kq_k^{c_k/2} with uu a unit and 0sjbj0 \leq s_j \leq b_j; why is this list exhaustive and repetition-free?)

  3. Show that dχ(d)d \mapsto \chi(d) is completely multiplicative, deduce that ndnχ(d)n \mapsto \sum_{d \mid n}\chi(d) is multiplicative, and compute it on prime powers: it equals 11 on 2a2^a; b+1b + 1 on pbp^b (p1p \equiv 1); 11 or 00 on qcq^c (q3q \equiv 3) according as cc is even or odd.
  4. Conclude Jacobi’s theorem:

    r2(n)=4dnχ(d)=4(d1(n)d3(n)),r_2(n) = 4\sum_{d \mid n}\chi(d) = 4\bigl(d_1(n) - d_3(n)\bigr),

    where di(n)d_i(n) counts the divisors i(mod4)\equiv i \pmod 4. Verify on n=3,5,9,25n = 3, 5, 9, 25, and list the 1616 representations of 6565.

  5. (The circle) Show that nxr2(n)\sum_{n \leq x}r_2(n) is the number of lattice points of Z2\Z^2 in the closed disc of radius x\sqrt x, and prove

    nxr2(n)=πx+O(x)\sum_{n\leq x}r_2(n) = \pi x + O(\sqrt x)

    (each lattice point owns a unit square; compare areas, the error living in an annulus of width O(1)O(1)).

  6. (Leibniz, read arithmetically) Combine questions 19–20:

    dxχ(d)xd=πx4+O(x),\sum_{d \leq x}\chi(d)\Bigl\lfloor\frac xd\Bigr\rfloor = \frac{\pi x}4 + O(\sqrt x),

    and deduce — removing the floors carefully — Leibniz’s series

    113+1517+=π4.1 - \frac13 + \frac15 - \frac17 + \dots = \frac\pi4 .

    The alternating series of odd reciprocals is the average excess of divisors 1\equiv 1 over divisors 3\equiv 3: analysis computed by arithmetic.

  7. (How rare are sums of two squares?) Show that no integer 3(mod4)\equiv 3 \pmod 4 is a sum of two squares (two ways: squares mod 44, or the parity criterion of question 17), so at least a quarter of all integers are missed; and show that the average 1xnxr2(n)π\frac1x\sum_{n\leq x}r_2(n) \to \pi of question 20 is compatible with representable integers having density 00 — exhibit integers with abnormally many representations (take products of many primes 1mod4\equiv 1 \bmod 4) to explain how a vanishing proportion can still carry a positive average. (Landau proved the true density decays like 1/logx1/\sqrt{\log x}; that is beyond our tools, but the mechanism is now visible.)

Part VI — Complements: primitive representations and Pythagoras.

  1. Call a representation n=a2+b2n = a^2 + b^2 primitive if gcd(a,b)=1\gcd(a, b) = 1. Show that n1n \geq 1 admits a primitive representation iff 4n4 \nmid n and no prime q3(mod4)q \equiv 3 \pmod 4 divides nn. (For the necessity, reuse the descent of question 13 and squares mod 44; for the sufficiency, build zz from 1+i1 + \iu and the πj\pi_j only — no conjugates — and explain why a common prime factor of aa and bb would force both πj\pi_j and πˉj\bar\pi_j, or (1+i)2(1+\iu)^2, into zz.)
  2. (Pythagorean triples) Let a2+b2=c2a^2 + b^2 = c^2 with a,b,ca, b, c positive, gcd(a,b)=1\gcd(a, b) = 1 and bb even. Show that a+iba + \iu b and aiba - \iu b are coprime in Z[i]\Z[\iu] (a common Gaussian prime divisor would divide 2a2a and 2b2b, and cc is odd), deduce from unique factorization that a+ib=u(m+in)2a + \iu b = u(m + \iu n)^2 for a unit uu, and conclude the classical parametrization: up to swapping aa and bb,

    a=m2n2,b=2mn,c=m2+n2,a = m^2 - n^2, \qquad b = 2mn, \qquad c = m^2 + n^2,

    with m>n1m > n \geq 1 coprime of opposite parities. Recover (3,4,5)(3, 4, 5) and (21,20,29)(21, 20, 29) from (m,n)=(2,1)(m, n) = (2, 1) and (5,2)(5, 2).

  3. (Numerical verification) Take x=25x = 25. Compute r2(n)r_2(n) for 1n251 \leq n \leq 25 from Jacobi’s formula, check that the nonzero values occur exactly at n=1,2,4,5,8,9,10,13,16,17,18,20,25n = 1, 2, 4, 5, 8, 9, 10, 13, 16, 17, 18, 20, 25, and that

    n25r2(n)=80=4d25χ(d)25d.\sum_{n \leq 25} r_2(n) = 80 = 4\sum_{d \leq 25}\chi(d) \Bigl\lfloor\frac{25}d\Bigr\rfloor .

    Verify that the closed disc of radius 55 contains 8181 lattice points, and compare with πx78.5\pi x \approx 78.5: the error is well within the O(x)O(\sqrt x) of question 20.

Solution

Solution of Problem 2.1.

1. N(z)=zzˉN(z) = z\bar z, so N(zw)=zwzw=zzˉwwˉ=N(z)N(w)N(zw) = zw\overline{zw} = z\bar z\, w \bar w = N(z)N(w). If uv=1uv = 1: N(u)N(v)=1N(u)N(v) = 1 in N\N, so N(u)=1N(u) = 1, i.e. u{±1,±i}u \in \{\pm 1, \pm \iu\}; all four are units. Brahmagupta: (a2+b2)(c2+d2)=N((a+ib)(c+id))=(acbd)2+(ad+bc)2(a^2+b^2)(c^2+d^2) = N\bigl((a + \iu b)(c + \iu d)\bigr) = (ac - bd)^2 + (ad + bc)^2.

2. If z=abz = ab, then N(z)=N(a)N(b)N(z) = N(a)N(b) is prime, so N(a)=1N(a) = 1 or N(b)=1N(b) = 1: one factor is a unit. As N(z)>1N(z) > 1, zz is neither zero nor a unit: irreducible — and prime, since Z[i]\Z[\iu] is a UFD (Theorem 2.14, Theorem 2.18 and Lemma 2.17).

3. π\pi divides N(π)=ππˉ2N(\pi) = \pi\bar\pi \geq 2, an integer; factoring N(π)N(\pi) into prime numbers and using that π\pi is prime, πp\pi \mid p for some prime number pp. If also πqp\pi \mid q \neq p: Bézout in Z\Z gives 1=up+vq1 = up + vq, so π1\pi \mid 1 — absurd: pp is unique. From p=πγp = \pi\gamma: p2=N(p)=N(π)N(γ)p^2 = N(p) = N(\pi)N(\gamma) with N(π)1N(\pi) \neq 1, so N(π){p,p2}N(\pi) \in \{p, p^2\}.

4. Let π\pi be a Gaussian prime dividing pp, p=πγp = \pi\gamma. If N(π)=p2N(\pi) = p^2: N(γ)=1N(\gamma) = 1, so pp is an associate of π\pi, itself a Gaussian prime; and no Gaussian prime has norm pp (if N(ρ)=pN(\rho) = p then ρρρˉ=p\rho \mid \rho\bar\rho = p, and pp prime in Z[i]\Z[\iu] would force ρ\rho associate to pp, giving N(ρ)=N(p)=p2pN(\rho) = N(p) = p^2 \neq p). If N(π)=pN(\pi) = p: writing π=a+ib\pi = a + \iu b, p=ππˉ=a2+b2p = \pi\bar\pi = a^2 + b^2.

5. In the abelian group (Z/pZ)×(\Z/p\Z)^\times, pair each element with its inverse. The self-inverse elements are the roots of X21X^2 - 1: exactly ±1\pm 1 (at most two roots in a field). The product of all elements is then 1(1)(pairs kk1)=11 \cdot (-1) \cdot \prod (\text{pairs } k k^{-1}) = -1: (p1)!1(modp)(p-1)! \equiv -1 \pmod p. (For p=2p = 2: 1!11! \equiv -1.)

6. Write (p1)!=k=1mkk=m+1p1k(p-1)! = \prod_{k=1}^m k \cdot \prod_{k=m+1}^{p-1}k with m=p12m = \frac{p-1}2. In the second product substitute k=pjk = p - j, j=1,,mj = 1, \dots, m: modulo pp, j=1m(pj)(1)mm!\prod_{j=1}^m (p - j) \equiv (-1)^m m!. Hence 1(1)m(m!)2-1 \equiv (-1)^m (m!)^2, i.e. (m!)2(1)m+1(modp)(m!)^2 \equiv (-1)^{m+1} \pmod p.

7. If p1(mod4)p \equiv 1 \pmod 4, mm is even and question 6 gives (m!)21(m!)^2 \equiv -1: a square root of 1-1. Conversely, if x21(modp)x^2 \equiv -1 \pmod p (pp odd), then x4=1x2x^4 = 1 \neq x^2: xx has order 44 in (Z/pZ)×(\Z/p\Z)^\times, so 4p14 \mid p - 1 (Lagrange). And p=2p = 2: 12=111^2 = 1 \equiv -1. Conclusion: 1-1 is a square mod pp iff p=2p = 2 or p1(mod4)p \equiv 1 \pmod 4.

8. With x21x^2 \equiv -1: px2+1=(x+i)(xi)p \mid x^2 + 1 = (x + \iu)(x - \iu). If pp were a Gaussian prime it would divide a factor; but xp±ipZ[i]\frac xp \pm \frac \iu p \notin \Z[\iu]. So pp is not a Gaussian prime; by the dichotomy (question 4) — pp not prime means the second branch — p=a2+b2p = a^2 + b^2.

9. Squares are 0\equiv 0 or 1(mod4)1 \pmod 4, so a2+b2{0,1,2}(mod4)a^2 + b^2 \in \{0, 1, 2\} \pmod 4: a prime p3(mod4)p \equiv 3 \pmod 4 is not a sum of two squares. By question 4, the branch N(π)=pN(\pi) = p (p=a2+b2p = a^2+b^2) is impossible: pp stays a Gaussian prime.

10. (1+i)2=2i(1 + \iu)^2 = 2\iu, so 2=i(1+i)22 = -\iu(1 + \iu)^2; and N(1+i)=2N(1 + \iu) = 2 is prime, so 1+i1 + \iu is a Gaussian prime (question 2).

11. Every Gaussian prime divides exactly one prime number pp (question 3); listing by cases: p=2p = 2 gives the associates of 1+i1 + \iu; p3(mod4)p \equiv 3 \pmod 4 gives pp itself (question 9); p1(mod4)p \equiv 1 \pmod 4 gives the pair π,πˉ\pi, \bar\pi of norm pp (questions 4 and 8). The pair is genuine: πˉ{±π,±iπ}\bar\pi \in \{\pm\pi, \pm\iu\pi\} would force, writing π=a+ib\pi = a + \iu b, either b=0b = 0, a=0a = 0, or a=±ba = \pm b, giving p=a2+b2{a2,2a2}p = a^2 + b^2 \in \{a^2, 2a^2\} — impossible for an odd prime. Check: 5=(2+i)(2i)5 = (2 + \iu)(2 - \iu), N(2±i)=5N(2\pm\iu) = 5; 33: prime of norm 99.

12. Write n=2αipiβijqj2γjn = 2^{\alpha}\prod_i p_i^{\beta_i} \prod_j q_j^{2\gamma_j} with pi1p_i \equiv 1, qj3(mod4)q_j \equiv 3 \pmod 4. Each factor is a sum of two squares: 2=12+122 = 1^2 + 1^2; pi=a2+b2p_i = a^2 + b^2 (question 8); qj2γj=(qjγj)2+02q_j^{2\gamma_j} = (q_j^{\gamma_j})^2 + 0^2. The Brahmagupta identity (question 1) propagates the property to the product nn.

13. Let n=a2+b2=N(a+ib)n = a^2 + b^2 = N(a + \iu b) and q3(mod4)q \equiv 3 \pmod 4, qnq \mid n. The Gaussian prime qq (question 9) divides (a+ib)(aib)(a + \iu b)(a - \iu b), hence one of the two factors — say qa+ibq \mid a + \iu b (the other case is identical). But then a+ibq=aq+ibqZ[i]\frac{a + \iu b}{q} = \frac aq + \iu \frac bq \in \Z[\iu] reads off as qaq \mid a and qbq \mid b in Z\Z. Hence q2nq^2 \mid n and nq2=(aq)2+(bq)2\frac n{q^2} = \bigl(\frac aq\bigr)^2 + \bigl(\frac bq\bigr)^2. By strong induction on nn, the exponent of qq in n/q2n/q^2 is even; that of nn is even too.

14. Theorem (Fermat). A positive integer is a sum of two squares if and only if every prime 3(mod4)\equiv 3 \pmod 4 occurs in it with an even exponent. — 2025=34522025 = 3^4 \cdot 5^2: exponent of 33 even, yes (2025=452+02=272+3622025 = 45^2 + 0^2 = 27^2 + 36^2). 2026=210132026 = 2 \cdot 1013 with 10131(mod4)1013 \equiv 1 \pmod 4 prime: yes (1013=222+2321013 = 22^2 + 23^2, and Brahmagupta with 2=12+122 = 1^2+1^2: 2026=(2223)2+(22+23)2=12+4522026 = (22 - 23)^2 + (22 + 23)^2 = 1^2 + 45^2). 20272027 is a prime 3(mod4)\equiv 3 \pmod 4: no.

15. Let p=a2+b2=c2+d2p = a^2 + b^2 = c^2 + d^2 with positive integers, p1(mod4)p \equiv 1 \pmod 4, and π\pi a Gaussian prime with p=ππˉp = \pi\bar\pi (question 4). Both a+iba + \iu b and c+idc + \iu d have norm pp, hence are Gaussian primes (question 2) dividing p=(a+ib)(aib)p = (a+\iu b)(a - \iu b); by uniqueness of factorization, c+idc + \iu d is an associate of a+iba + \iu b or of aiba - \iu b:

c+id{±(a±ib), ±i(a±ib)}={±a±ib, ±b±ia}.c + \iu d \in \{\pm(a \pm \iu b),\ \pm\iu(a \pm \iu b)\} = \{\pm a \pm \iu b,\ \pm b \pm \iu a\}.

Positivity of c,dc, d leaves c+id{a+ib,b+ia}c + \iu d \in \{a + \iu b, b + \iu a\}: {c,d}={a,b}\{c, d\} = \{a, b\}.

16. If n=a2b2=(ab)(a+b)n = a^2 - b^2 = (a-b)(a+b): the two factors have the same parity, so nn is odd (both odd) or divisible by 44 (both even) — never 2(mod4)\equiv 2 \pmod 4. Conversely, nn odd: n=(n+12)2(n12)2n = \bigl(\frac{n+1}2\bigr)^2 - \bigl(\frac{n-1}2\bigr)^2; n=4mn = 4m: n=(m+1)2(m1)2n = (m+1)^2 - (m-1)^2. The answer is a bare congruence condition, with a one-line identity behind it: differences of squares carry no arithmetic depth, and the contrast with sums is the whole point of this problem.

17. (a,b)z=a+ib(a, b) \mapsto z = a + \iu b is a bijection between representations and {z:N(z)=n}\{z : N(z) = n\}. Factor zz in the UFD Z[i]\Z[\iu] using the classification (question 11): up to a unit, z=(1+i)ajπjsjπˉjtjkqkukz = (1+\iu)^{a'}\prod_j\pi_j^{s_j}\bar\pi_j^{t_j} \prod_kq_k^{u_k}, and taking norms (N(1+i)=2N(1+\iu) = 2, N(πj)=N(πˉj)=pjN(\pi_j) = N(\bar\pi_j) = p_j, N(qk)=qk2N(q_k) = q_k^2):

n=2ajpjsj+tjkqk2uk.n = 2^{a'}\prod_jp_j^{s_j + t_j}\prod_kq_k^{2u_k} .

Matching exponents: a=aa' = a, sj+tj=bjs_j + t_j = b_j, 2uk=ck2u_k = c_ksolvable iff every ckc_k is even, and then uk=ck/2u_k = c_k/2 is forced while sj[ ⁣[0,bj] ⁣]s_j \in \intint0{b_j} is free. Distinct data (u,(sj))(u, (s_j)) give non-associate zz’s with the same norm; the unit u{±1,±i}u \in \{\pm1, \pm\iu\} (4 choices) then enumerates each associate class without repetition (two equal products would violate uniqueness of factorization — πj\pi_j and πˉj\bar\pi_j are non-associate since pj=πjπˉjp_j = \pi_j\bar\pi_j is not ramified). Total: r2(n)=4j(bj+1)r_2(n) = 4\prod_j(b_j + 1), and 00 if some ckc_k is odd.

18. χ(dd)=χ(d)χ(d)\chi(dd') = \chi(d)\chi(d') is checked mod 44 (odd ×\times odd covers the four sign cases; anything even gives 0=00 = 0). For coprime m,nm, n, divisors of mnmn are uniquely d=d1d2d = d_1d_2 with d1md_1 \mid m, d2nd_2 \mid n: dmnχ(d)=(d1mχ(d1))(d2nχ(d2))\sum_{d \mid mn}\chi(d) = \bigl(\sum_{d_1\mid m}\chi(d_1)\bigr)\bigl(\sum_{d_2\mid n}\chi(d_2)\bigr): multiplicative. Prime powers: on 2a2^a, only d=1d = 1 is odd: sum =1= 1. On pbp^b with p1p \equiv 1: all χ(pi)=1\chi(p^i) = 1, sum =b+1= b + 1. On qcq^c with q3q \equiv 3: χ(qi)=(1)i\chi(q^i) = (-1)^i, alternating sum =1= 1 (cc even) or 00 (cc odd).

19. The two multiplicative functions 14r2\frac14r_2 (question 17) and dnχ(d)\sum_{d\mid n}\chi(d) (question 18) agree on all prime powers — 11 on 2a2^a; b+1b + 1 on pbp^b; 1c even\mathbf 1_{c\ \mathrm{even}} on qcq^c — hence agree everywhere: Jacobi’s formula, with dnχ(d)=d1(n)d3(n)\sum_{d\mid n}\chi(d) = d_1(n) - d_3(n) by sorting divisors. Checks: r2(3)=0=4(11)r_2(3) = 0 = 4(1 - 1); r2(5)=8=4(20)r_2(5) = 8 = 4(2 - 0) ((±1,±2),(±2,±1)(\pm1,\pm2), (\pm2,\pm1)); r2(9)=4=4(21)r_2(9) = 4 = 4(2 - 1) (divisors 1,911, 9 \equiv 1; 333 \equiv 3; representations (±3,0),(0,±3)(\pm3, 0), (0, \pm3)); r2(25)=12=4(30)r_2(25) = 12 = 4(3 - 0). For 65=51365 = 5\cdot13: r2=422=16r_2 = 4\cdot2\cdot2 = 16, from 65=1+64=16+4965 = 1 + 64 = 16 + 49: the sixteen pairs (±1,±8),(±8,±1),(±4,±7),(±7,±4)(\pm1, \pm8), (\pm8, \pm1), (\pm4, \pm7), (\pm7, \pm4).

20. nxr2(n)\sum_{n \leq x}r_2(n) counts the pairs (a,b)(a, b) with 0<a2+b2x0 < a^2 + b^2 \leq x, i.e. the lattice points of the closed disc DxD_{\sqrt x} minus the origin. Assign to each lattice point PP the unit square P+[0,1)2P + \intco01^2: these squares tile the plane. Every square attached to a point of DxD_{\sqrt x} lies in Dx+2D_{\sqrt x + \sqrt2}, and every square meeting Dx2D_{\sqrt x - \sqrt 2} is attached to a point of DxD_{\sqrt x} (the square has diameter 2\sqrt 2): comparing areas,

π(x2)2#{lattice points in Dx}π(x+2)2,\pi(\sqrt x - \sqrt2)^2 \leq \#\{\text{lattice points in } D_{\sqrt x}\} \leq \pi(\sqrt x + \sqrt 2)^2,

and both bounds are πx+O(x)\pi x + O(\sqrt x). Subtracting the origin changes nothing at this precision.

21. By Jacobi (question 19) and exchanging the order of summation (n=dmn = dm):

14nxr2(n)=nxdnχ(d)=dxχ(d)#{m:dmx}=dxχ(d)xd,\frac14\sum_{n\leq x}r_2(n) = \sum_{n \leq x}\sum_{d \mid n}\chi(d) = \sum_{d \leq x}\chi(d)\,\#\{m : dm \leq x\} = \sum_{d\leq x}\chi(d)\Bigl\lfloor\frac xd\Bigr\rfloor,

which is πx4+O(x)\frac{\pi x}4 + O(\sqrt x) by question 20. Remove the floors: x/d=x/d+O(1)\lfloor x/d\rfloor = x/d + O(1), but summing O(1)O(1) over dxd \leq x is too crude; instead use that the partial sums of χ\chi are bounded (0,1,1,00, 1, 1, 0 cyclically), so by Abel summation dxχ(d){x/d}\sum_{d\leq x}\chi(d)\{x/d\}, whose terms we group in pairs d1,3d \equiv 1, 3, is O(x)O(\sqrt x) — alternatively and more simply: split at x\sqrt x. For dxd \leq \sqrt x, replace x/d\lfloor x/d\rfloor by x/d+O(1)x/d + O(1): error O(x)O(\sqrt x). For d>xd > \sqrt x, x/d\lfloor x/d\rfloor takes each value v<xv < \sqrt x on an interval of consecutive dd’s, on which the χ\chi-sum is O(1)O(1): total error O(x)O(\sqrt x) by summing over the x\leq \sqrt x values of vv, while d>xχ(d)xd=O(x)\sum_{d > \sqrt x}\chi(d)\frac xd = O(\sqrt x) by alternating-series tails (xd>xχ(d)/d=xO(1/x)x\sum_{d>\sqrt x}\chi(d)/d = x\,O(1/\sqrt x)). Hence

xdxχ(d)d=πx4+O(x),i.e.dxχ(d)d=π4+O(1x),x\sum_{d \leq x}\frac{\chi(d)}d = \frac{\pi x}4 + O(\sqrt x), \qquad\text{i.e.}\qquad \sum_{d\leq x}\frac{\chi(d)}d = \frac\pi4 + O\Bigl(\frac1{\sqrt x}\Bigr),

and letting xx \to \infty: 113+15=π41 - \frac13 + \frac15 - \dots = \frac\pi4.

22. If n3(mod4)n \equiv 3 \pmod4 were a2+b2a^2 + b^2: squares are 0,1(mod4)\equiv 0, 1 \pmod 4, and a2+b2{0,1,2}a^2 + b^2 \in \{0, 1, 2\} mod 44 — impossible. (Question 17’s criterion says the same: n3(mod4)n \equiv 3 \pmod 4 forces some prime 3\equiv 3 to odd exponent.) So representable integers avoid a full residue class: density 34\leq \frac34. The average π\pi of r2r_2 concentrates on few integers: n=jkpjn = \prod_{j\leq k}p_j (distinct primes 1mod4\equiv 1 \bmod 4) has r2(n)=42kr_2(n) = 4\cdot2^k representations — unboundedly many — so a sparse set of nn’s can carry the whole average, exactly as a lottery’s mean payoff coexists with almost-sure loss. Landau’s #{nx representable}Cx/logx\#\{n \leq x \text{ representable}\} \sim Cx/\sqrt{\log x} confirms it: density 00, average π\pi.

23. Necessity. Let n=a2+b2n = a^2 + b^2 with gcd(a,b)=1\gcd(a, b) = 1. If a prime q3(mod4)q \equiv 3 \pmod 4 divided nn, question 13 shows qaq \mid a and qbq \mid b: contradiction. If 4n4 \mid n: squares are 0,1(mod4)\equiv 0, 1 \pmod 4, so a2+b20(mod4)a^2 + b^2 \equiv 0 \pmod 4 forces a2b20a^2 \equiv b^2 \equiv 0, i.e. a,ba, b both even: contradiction. Sufficiency. Write n=2αjpjbjn = 2^{\alpha}\prod_jp_j^{b_j} with α1\alpha \leq 1 and pj1(mod4)p_j \equiv 1 \pmod 4, and set z=(1+i)αjπjbj=a+ibz = (1+\iu)^{\alpha}\prod_j \pi_j^{b_j} = a + \iu b, of norm nn. Suppose a prime tt divides gcd(a,b)\gcd(a, b); then tzt \mid z in Z[i]\Z[\iu]. If t3(mod4)t \equiv 3 \pmod 4: tN(z)=nt \mid N(z) = n, excluded. If t1(mod4)t \equiv 1 \pmod 4: t=πtπˉtt = \pi_t\bar\pi_t, so πˉtz\bar\pi_t \mid z; but the factorization of zz contains no conjugate prime (πj\pi_j and πˉj\bar\pi_j are non-associate, question 17), contradicting unique factorization. If t=2=i(1+i)2t = 2 = -\iu(1+\iu)^2: then (1+i)2z(1+\iu)^2 \mid z, forcing α2\alpha \geq 2, excluded. Hence gcd(a,b)=1\gcd(a, b) = 1: the representation is primitive.

24. aa is odd (gcd(a,b)=1\gcd(a, b) = 1, bb even), so c2=a2+b2c^2 = a^2 + b^2 is odd and cc is odd. Let δ\delta be a common Gaussian prime divisor of a+iba + \iu b and aiba - \iu b: it divides their sum 2a2a and their difference 2ib2\iu b, hence 2a2a and 2b2b; a Bézout relation ua+vb=1ua + vb = 1 then gives δ2\delta \mid 2, so δ\delta is associate to 1+i1 + \iu and N(δ)=2N(\delta) = 2 divides N(a+ib)=c2N(a + \iu b) = c^2, which is odd: contradiction. So a+iba + \iu b and aiba - \iu b are coprime with product c2c^2; in the UFD Z[i]\Z[\iu], each Gaussian prime of c2c^2 occurs to an even exponent and splits entirely into one of the two coprime factors, whence a+ib=u(m+in)2=u(m2n2+2imn)a + \iu b = u(m + \iu n)^2 = u\bigl(m^2 - n^2 + 2\iu mn\bigr) with uu a unit. The choices u=±iu = \pm\iu make the real part 2mn\mp 2mn even — impossible, aa is odd. The choices u=±1u = \pm1 give, after adjusting the signs of m,nm, n and swapping their names to make everything positive, a=m2n2a = m^2 - n^2, b=2mnb = 2mn with m>n1m > n \geq 1; and c2=N(m+in)2c^2 = N(m + \iu n)^2 gives c=m2+n2c = m^2 + n^2. A common divisor of mm and nn would divide aa and bb: gcd(m,n)=1\gcd (m, n) = 1; and mn(mod2)m \equiv n \pmod 2 would make aa even: opposite parities. Checks: (m,n)=(2,1)(m, n) = (2, 1) gives (3,4,5)(3, 4, 5); (m,n)=(5,2)(m, n) = (5, 2) gives (254,20,25+4)=(21,20,29)(25 - 4, 20, 25 + 4) = (21, 20, 29), and 441+400=841=292441 + 400 = 841 = 29^2.

25. Jacobi’s formula r2(n)=4(d1(n)d3(n))r_2(n) = 4(d_1(n) - d_3(n)) gives, for n=1,,25n = 1, \dots, 25:

4, 4, 0, 4, 8, 0, 0, 4, 4, 8, 0, 0, 8, 0, 0, 4, 8, 4, 0, 8, 0, 0, 0, 0, 12,4,\ 4,\ 0,\ 4,\ 8,\ 0,\ 0,\ 4,\ 4,\ 8,\ 0,\ 0,\ 8,\ 0,\ 0,\ 4,\ 8,\ 4,\ 0,\ 8,\ 0,\ 0,\ 0,\ 0,\ 12,

nonzero exactly at n=1,2,4,5,8,9,10,13,16,17,18,20,25n = 1, 2, 4, 5, 8, 9, 10, 13, 16, 17, 18, 20, 25 (for instance r2(15)=0r_2(15) = 0: divisors 1,511, 5 \equiv 1 and 3,1533, 15 \equiv 3 balance; r2(20)=8r_2(20) = 8: divisors 1,511, 5 \equiv 1, none 3\equiv 3). The total is 4+4+4+8+4+4+8+8+4+8+4+8+12=804 + 4 + 4 + 8 + 4 + 4 + 8 + 8 + 4 + 8 + 4 + 8 + 12 = 80. The divisor side: the odd d25d \leq 25 contribute

258+53+22+11+11+11+1=20,25 - 8 + 5 - 3 + 2 - 2 + 1 - 1 + 1 - 1 + 1 - 1 + 1 = 20,

reading χ(d)25/d\chi(d)\lfloor 25/d\rfloor for d=1,3,5,,25d = 1, 3, 5, \dots, 25; and 420=804 \cdot 20 = 80, as predicted by question 21’s identity. Lattice points of the closed disc of radius 55: the 8080 points with 1a2+b2251 \leq a^2 + b^2 \leq 25 plus the origin, i.e. 8181; and πx=25π78.54\pi x = 25\pi \approx 78.54, an error of about 2.462.46, comfortably within the O(x)O(\sqrt x) band of question 20 (x=5\sqrt x = 5).