Exact squares and endpoint tests

Written by GPT-6.1 Sol (OpenAI), reasoning effort Ultra, October 2026. Self-checked by the writing AI; no independent review. Public domain (CC0).

A commutative square has two comparison maps: one into a pullback and one out of a pushout. Their failure to be epic or monic is measured by the same object. When the square lies between exact rows, that obstruction can be read from the endpoints. This also tests the exactness of an entire rectangle, including the commutativity of its two outer corner squares.

Work in an arbitrary abelian category \(\mathcal A\). We use the ordinary kernel, cokernel and image conventions of Trace coreflections and balanced nonabelian categories. The short exact comparison used below is Composition factors and uniform chain bounds, Lemma 1.1. No infinite limits, generator or projective objects are required.

1. The signed obstruction of a square

Start with maps

\[ \begin{gathered} a:X_1\to X_2,\qquad b:Y_1\to Y_2,\\ f_1:X_1\to Y_1,\qquad f_2:X_2\to Y_2,\\ f_2a=bf_1. \end{gathered} \tag{1.1} \]

Let \(P=X_2\times_{Y_2}Y_1\), with comparison \(\gamma:X_1\to P\) whose components are \(a,f_1\). Let \(Q=X_2\oplus_{X_1}Y_1\), with structural maps \(e:X_2\to Q\), \(h:Y_1\to Q\) and comparison \(\theta:Q\to Y_2\). Thus

\[ \begin{gathered} ea=hf_1,\\ \theta e=f_2,\qquad\theta h=b. \end{gathered} \tag{1.2} \]

The square is Cartesian precisely when \(\gamma\) is an isomorphism, and cocartesian precisely when \(\theta\) is an isomorphism.

Put \(D=X_2\oplus Y_1\). The positive pair and the signed difference are

\[ \begin{gathered} u=(a,f_1):X_1\to D,\\ v=(f_2,-b):D\to Y_2. \end{gathered} \tag{1.3} \]

Commutativity says \(vu=0\). The kernel universal property identifies \(P\) with \(\ker v\): a map to \(D\) lies in that kernel exactly when its two components satisfy the pullback equation. Hence \(\gamma\) is the factorization of \(u\) through \(\ker v\). This is the signed recognition interface of Stacks, Lemma 12.5.11.

For the pushout, use the other sign convention:

\[ \begin{gathered} u'=(a,-f_1),\qquad v'=(f_2,b),\\ Q=\operatorname{coker}u',\\ \theta q_Q=v', \end{gathered} \tag{1.4} \]

where \(q_Q:D\to Q\) is the quotient. A map out of this cokernel is precisely a pair of maps agreeing after composition with \(a,f_1\).

Proposition 1.1. There are canonical isomorphisms

\[ \begin{gathered} H=\ker v/\operatorname{im}u,\\ \operatorname{coker}\gamma\simeq H\simeq\ker\theta. \end{gathered} \tag{1.5} \]

Consequently \(\gamma\) is epic if and only if \(\theta\) is monic. This equivalence requires only the commutative square.

Proof. Since \(P\to D\) is monic, the image of \(\gamma\) inside \(P=\ker v\) is \(\operatorname{im}u\), giving its stated cokernel.

The inverse image of \(\ker\theta\) under \(q_Q\) is \(\ker v'\). Pullbacks of epimorphisms are epimorphisms in an abelian category; the precise canonical interface is Stacks, Lemma 12.5.13. The kernel of the resulting arrow to \(\ker\theta\) is \(\ker q_Q=\operatorname{im}u'\). Therefore

\[ \ker\theta\simeq\ker v'/\operatorname{im}u'. \tag{1.6} \]

The involution \(\sigma=\operatorname{diag}(1,-1)\) of \(D\) satisfies \(u'=\sigma u\), \(v'=v\sigma\), and identifies this quotient with \(H\). An abelian arrow is epic exactly when its cokernel vanishes, and monic exactly when its kernel vanishes. \(\square\)

The two minus signs occur in different places. Replacing \(u'\) by \(u\) while retaining \(v'\) generally destroys the equation \(v'u'=0\).

2. Exact rows reduce the test to the endpoints

Extend the square to a commutative diagram between exact rows:

\[ \begin{gathered} 0\to X_0\xrightarrow{i}X_1\xrightarrow{a}X_2 \xrightarrow{q}X_3\to0,\\ 0\to Y_0\xrightarrow{j}Y_1\xrightarrow{b}Y_2 \xrightarrow{r}Y_3\to0,\\ f_t:X_t\to Y_t\quad(0\le t\le3),\\ f_1i=jf_0,\\ f_2a=bf_1,\qquad f_3q=rf_2. \end{gathered} \tag{2.1} \]

Theorem 2.1. For the middle square:

  1. \(\gamma\) is epic, equivalently \(\theta\) is monic, if and only if \(f_0\) is epic and \(f_3\) is monic.
  2. The square is Cartesian if and only if \(f_0\) is an isomorphism and \(f_3\) is monic.
  3. The square is cocartesian if and only if \(f_0\) is epic and \(f_3\) is an isomorphism.

Proof. Write \(Z_X=\ker q=\operatorname{im}a\), \(Z_Y=\ker r=\operatorname{im}b\). The image quotients \(X_1\to Z_X\), \(Y_1\to Z_Y\) are epic, with kernels \(X_0,Y_0\).

Let \(L=\ker(f_3q)\subseteq X_2\). The equation \(rf_2=f_3q\) supplies a map \(L\to Z_Y\), and

\[ P\simeq L\times_{Z_Y}Y_1. \tag{2.2} \]

Indeed, a compatible pair mapping to \(X_2,Y_1\) satisfies \(f_3q=rb=0\) on its first component, so it factors uniquely through \(L\). Conversely compatibility over \(Z_Y\) implies compatibility over \(Y_2\). The two constructions are inverse on maps from every test object.

Pulling back the actual epimorphism \(Y_1\to Z_Y\) gives the bottom short exact row in the comparison

\[ \begin{array}{ccccc} X_0&\to&X_1&\to&Z_X\\ \downarrow f_0&&\downarrow\gamma&&\downarrow\\ Y_0&\to&P&\to&L. \end{array} \tag{2.3} \]

Both rows in (2.3) have zeros at their two ends. The right vertical arrow is the inclusion \(Z_X\to L\). Pulling back \(q\) along \(\ker f_3\to X_3\) separately identifies that pullback with \(L\) and gives

\[ 0\to Z_X\to L\to\ker f_3\to0. \tag{2.4} \]

Suppose \(\gamma\) is epic. Precomposing an arrow with an epimorphism preserves its image: the two cokernels have the same universal property, and the images are their kernels. The image of \(P\to X_2\) is \(L\), while that of its composite with \(\gamma\) is \(\operatorname{im}a=Z_X\). Thus \(L=Z_X\), and (2.4) gives \(\ker f_3=0\).

The left square in (2.3) is now a pullback: its left terms are the kernels of the maps to the common quotient \(Z_X\). Pulling back \(\gamma\) makes \(f_0\) epic.

Conversely, let \(f_3\) be monic and \(f_0\) epic. Equation (2.4) identifies \(L\) with \(Z_X\). If \(c:P\to T\) kills \(\gamma\), its restriction to \(Y_0\) kills \(f_0\), so is zero. The bottom quotient in (2.3) gives \(c=d(P\to Z_X)\). The equality \(c\gamma=0\) says \(d\) kills the epimorphism \(X_1\to Z_X\), hence \(d=0\). Taking \(c\) to be the cokernel of \(\gamma\) proves epicity. Proposition 1.1 supplies the equivalent assertion about \(\theta\), proving part 1.

If \(\gamma\) is invertible, part 1 gives monicity of \(f_3\); the kernel pullback in (2.3) makes \(f_0\) invertible. Conversely, if \(f_0\) is invertible and \(f_3\) monic, both endpoint maps in (2.3) are invertible. The short exact comparison lemma makes \(\gamma\) invertible. This proves part 2. The kernel comparison also agrees with Stacks, Lemma 12.5.12.

Apply part 2 in \(\mathcal A^{\mathrm{op}}\), reversing both rows and interchanging them. The pullback comparison becomes \(\theta^{\mathrm{op}}\), with first endpoint \(f_3^{\mathrm{op}}\) and last endpoint \(f_0^{\mathrm{op}}\). Its criterion is exactly that \(f_3\) be invertible and \(f_0\) epic. This proves part 3. \(\square\)

The proof never treats \(Y_1\to Y_2\) as an epimorphism. Its image quotient \(Y_1\to Z_Y\) is the epimorphism used in (2.2).

3. Completing an exact rectangle

Assume (2.1), and choose exact middle columns for \(t=1,2\):

\[ 0\to Z_t\to X_t\to Y_t\to W_t\to0. \tag{3.1} \]

The three internal arrows in (3.1) are \(z_t,f_t,\pi_t\), respectively. Their kernels and cokernels induce \(s:Z_1\to Z_2\), \(t:W_1\to W_2\), with

\[ z_2s=az_1,\qquad t\pi_1=\pi_2b. \tag{3.2} \]

Define the remaining corners by

\[ \begin{gathered} K=X_0\times_{X_1}Z_1,\\ R=Y_3\oplus_{Y_2}W_2. \end{gathered} \tag{3.3} \]

Write their projections as \(\kappa_X:K\to X_0\), \(\kappa_Z:K\to Z_1\), and their pushout maps as \(\rho_Y:Y_3\to R\), \(\rho_W:W_2\to R\). Thus \(i\kappa_X=z_1\kappa_Z\) and \(\rho_Yr=\rho_W\pi_2\).

The rectangle is

\[ \begin{array}{ccccccc} K&\!\to\!&Z_1&\!\to\!&Z_2&\!\to\!&0\\ \downarrow&&\downarrow&&\downarrow&&\downarrow\\ X_0&\!\to\!&X_1&\!\to\!&X_2&\!\to\!&X_3\\ \downarrow&&\downarrow&&\downarrow&&\downarrow\\ Y_0&\!\to\!&Y_1&\!\to\!&Y_2&\!\to\!&Y_3\\ \downarrow&&\downarrow&&\downarrow&&\downarrow\\ 0&\!\to\!&W_1&\!\to\!&W_2&\!\to\!&R. \end{array} \tag{3.4} \]

Its arrows are those in (2.1)–(3.3), with zero maps where a vertex is zero. All squares already commute except possibly the upper right and lower left squares. Their missing equations are \(qz_2=0\) and \(\pi_1j=0\).

Theorem 3.1. The following conditions are equivalent:

  1. Every square of (3.4) commutes, and every row and column is exact when supplied with zeros at both ends.
  2. \(\gamma:X_1\to X_2\times_{Y_2}Y_1\) is epic.
  3. \(\theta:X_2\oplus_{X_1}Y_1\to Y_2\) is monic.

Proof. First record four consequences of the hypotheses alone.

The projection \(\kappa_X\) is a kernel of \(f_0\). A map to \(X_0\) is killed by \(f_0\) exactly when its composite with \(i\) is killed by \(f_1\), since \(f_1i=jf_0\) and \(j\) is monic. The kernel \(z_1\) and the pullback defining \(K\) then give the unique factorization. The projection \(\kappa_Z\) is a kernel of \(s\): \(sw=0\) exactly when \(az_1w=0\), by monicity of \(z_2\), and \(i\) is a kernel of \(a\).

The map \(\rho_Y\) is a cokernel of \(f_3\). It kills \(f_3\), because

\[ \rho_Yf_3q=\rho_Yrf_2=\rho_W\pi_2f_2=0 \tag{3.5} \]

and \(q\) is epic. If \(c:Y_3\to T\) kills \(f_3\), then \(cr\) kills \(f_2\) and factors uniquely through \(\pi_2\). This factor and \(c\) are a compatible pair for the pushout \(R\), giving the required map \(R\to T\). Uniqueness of the factor through \(\pi_2\) ensures uniqueness of the map even though only its \(Y_3\) component was initially specified.

Similarly \(\rho_W\) is a cokernel of \(t\). The equation \(\rho_Wt\pi_1=\rho_Yrb=0\) and epicity of \(\pi_1\) show that it kills \(t\). If \(d:W_2\to T\) kills \(t\), then \(d\pi_2b=dt\pi_1=0\); hence \(d\pi_2\) factors uniquely through \(r\). This supplies the compatible \(Y_3\) component and the unique map out of \(R\).

Assume condition 2. Theorem 2.1 makes \(f_0\) epic and \(f_3\) monic. The first and last columns are exact by the kernel and cokernel descriptions above.

There is a map \(Z_2\to P\) with components \((z_2,0)\), since \(f_2z_2=0\). Pull back \(\gamma\) along it. A compatible pair has its \(X_1\) component killed by \(f_1\), so factors uniquely through \(z_1\). The remaining equation identifies its \(Z_2\) component with \(s\) of that factor. Thus the pullback is \(Z_1\), with projection \(s\). It follows that \(s\) is epic. The top row is exact, and

\[ qz_2s=qaz_1=0 \tag{3.6} \]

forces \(qz_2=0\), making the upper right square commute.

Proposition 1.1 makes \(\theta\) monic. Let \(E=\operatorname{im}(e:X_2\to Q)\). The canonical cokernel comparison for the pushout, Stacks, Lemma 12.5.12, identifies

\[ W_1=\operatorname{coker}f_1\simeq Q/E. \tag{3.7} \]

Since \(\theta e=f_2\) and \(\theta\) is monic, it identifies \(E\) with \(\operatorname{im}f_2\). Quotienting the inclusion \(Q\to Y_2\) by this same subobject gives a monomorphism

\[ Q/E\longrightarrow Y_2/\operatorname{im}f_2=W_2. \tag{3.8} \]

Indeed, the inverse image of \(\operatorname{im}f_2\) in \(Q\) is exactly \(E\): its inclusion into \(Y_2\) factors through \(Q\) via \(E\), and monicity of \(\theta\) makes that factor unique. The kernel of (3.8) is therefore \(E/E=0\). Under (3.7), the map is \(t\), since its composite with \(\pi_1\) is \(\pi_2b\). Hence \(t\) is monic, and the bottom row is exact by the earlier cokernel description. Finally

\[ \pi_1jf_0=\pi_1f_1i=0 \tag{3.9} \]

and epicity of \(f_0\) force \(\pi_1j=0\). The lower left square commutes. The middle rows and columns were exact by assumption, so all four rows and all four columns have been checked.

Conversely, condition 1 makes \(f_0\) epic through the first column and \(f_3\) monic through the last. Theorem 2.1 gives condition 2. Proposition 1.1 gives the equivalence of conditions 2 and 3. \(\square\)

Neither comparison is required to be invertible. The next exercises distinguish that stronger requirement from the theorem's epicity and monicity tests.

4. Graded exercises with complete solutions

Exercise 1 — Introductory. Let \(k\) be a field. Take both exact rows to be

\[ 0\to k\xrightarrow{i}k^2\xrightarrow{a}k^2 \xrightarrow{q}k\to0, \tag{4.1} \]

where \(i(x)=(x,0)\), \(a(x,y)=(y,0)\), \(q(u,v)=v\). Choose \(\lambda,\mu,\nu\in k\), and put \(f_0=\lambda\), \(f_1=\operatorname{diag}(\lambda,\mu)\), \(f_2=\operatorname{diag}(\mu,\nu)\), \(f_3=\nu\). Verify the hypotheses, compute \(P,\gamma,Q,\theta\), and determine when the completed rectangle is exact. Does the answer depend on \(\mu\)?

Solution. The first map is injective, its image is the kernel of \(a\), the image of \(a\) is the kernel of \(q\), and \(q\) is surjective. The three commutation equations follow directly from the coordinate maps.

A pair \(((u,v),(s,w))\) belongs to \(P\) exactly when

\[ w=\mu u,\qquad \nu v=0. \tag{4.2} \]

Thus \(P\simeq k_u\oplus k_s\oplus\ker(\nu:k\to k)\), with

\[ \gamma(x,y)=(y,\lambda x,0). \tag{4.3} \]

It is epic precisely when \(\lambda\ne0\), \(\nu\ne0\), and then is invertible.

Let \(U,V\) be the basis vectors of \(X_2\), and \(S,T\) those of \(Y_1\). The pushout imposes \(\lambda S=0\), \(U=\mu T\). If \(\lambda\ne0\), \(Q\) has basis \(T,V\), sent by \(\theta\) to \((1,0),(0,\nu)\). If \(\lambda=0\), \(Q\) has basis \(S,T,V\), sent to \(0,(1,0),(0,\nu)\). Hence \(\theta\) is monic exactly when both endpoint scalars are nonzero. By Theorem 3.1 this is exactly the condition for the entire completed rectangle. The scalar \(\mu\), including zero, changes a relation but never the endpoint test. \(\square\)

Exercise 2 — Intermediate. In abelian groups fix \(n\ge2\). Construct the outer corners and rows in each case, and determine which middle comparisons are invertible.

(a) Put \(X_0=X_1=\mathbb Z\), \(Y_0=Y_1=\mathbb Z/n\mathbb Z\), all terms with indices 2 and 3 zero, \(i,j\) identities, and \(f_0=f_1\) reduction modulo \(n\).

(b) Put all terms with indices 0 and 1 zero, \(X_2=X_3=Y_2=Y_3=\mathbb Z\), \(q,r\) identities, and \(f_2=f_3\) multiplication by \(n\).

Solution. In (a),

\[ \begin{gathered} Z_1=n\mathbb Z,\quad Z_2=0,\\ W_1=W_2=0,\\ K=n\mathbb Z,\qquad R=0. \end{gathered} \tag{4.4} \]

The map \(K\to Z_1\) is invertible; \(K\to X_0\) and \(Z_1\to X_1\) are subgroup inclusions. All other outer arrows are zero. The first and second columns are the exact reduction sequences; the top row has the identity \(n\mathbb Z\to n\mathbb Z\), and the other outer row and column are zero sequences. Both corner equations hold. Here \(P=\mathbb Z/n\mathbb Z\), and \(\gamma\) is reduction, epic but not invertible. The pushout is \(Q=0\), and \(\theta:0\to0\) is invertible. The entire rectangle is exact while its middle square fails to be Cartesian.

In (b),

\[ \begin{gathered} Z_1=Z_2=0,\quad W_1=0,\\ W_2=\mathbb Z/n\mathbb Z,\quad K=0,\\ R=\mathbb Z/n\mathbb Z. \end{gathered} \tag{4.5} \]

The map \(\rho_Y\) is reduction, and \(\rho_W\) is the identity. The third and fourth columns are the exact multiplication-by-\(n\) sequence, while the bottom row has the identity \(W_2\to R\). Other outer arrows are zero, and both corner equations hold. Now \(P=0\), \(\gamma:0\to0\) is invertible, \(Q=\mathbb Z\), and \(\theta\) is multiplication by \(n\), monic but not invertible. The entire rectangle is exact; its middle square is Cartesian and fails to be cocartesian. \(\square\)

Exercise 3 — Advanced. Let all four vertices of (1.1) be \(\mathbb Z\), with \(a=f_1=2\), \(f_2=b=1\). Compute both universal objects and \(H\), keeping the signs explicit. Extend the square to exact rows and locate the endpoint preventing an exact completed rectangle.

Solution. Commutativity is \(1\cdot2=1\cdot2\), and

\[ \begin{gathered} u(x)=(2x,2x),\\ v(y,z)=y-z,\\ u'(x)=(2x,-2x),\\ v'(y,z)=y+z. \end{gathered} \tag{4.6} \]

The pullback is the diagonal \(\mathbb Z\), with \(\gamma\) multiplication by 2, so its cokernel and \(H\) are \(\mathbb Z/2\mathbb Z\). The pushout is the quotient by the subgroup generated by \((2,-2)\). The vectors \((0,1),(1,-1)\) form an integral basis; the relation kills twice the second. Thus

\[ Q\simeq\mathbb Z\oplus\mathbb Z/2\mathbb Z. \tag{4.7} \]

The map \(\theta\) projects onto the free summand, since \(v'(0,1)=1\), \(v'(1,-1)=0\). Its kernel agrees with \(H\). Here \(\gamma\) is monic but not epic, while \(\theta\) is epic but not monic.

For the row extension take \(X_0=Y_0=0\), \(X_3=\mathbb Z/2\mathbb Z\), \(Y_3=0\), with \(q\) reduction and \(r:\mathbb Z\to0\) zero. The endpoint \(f_0\) is invertible, but \(f_3:\mathbb Z/2\mathbb Z\to0\) is not monic. It violates the endpoint criterion, as the nonzero obstruction predicts. \(\square\)

Exercise 4 — Expert. For (2.1), prove a short exact sequence

\[ 0\to\operatorname{coker}f_0\to H\to\ker f_3\to0. \tag{4.8} \]

If these objects have finite length, derive a formula for \(\ell(H)\). Explain how it recovers the first endpoint test and whether the exact sequence requires finite length.

Solution. Retain \(Z_X,L\) and the epimorphism \(p:P\to L\). Let \(P_0\) be the inverse image of \(Z_X\subseteq L\), and let \(I=\operatorname{im}\gamma\). Then \(I\subseteq P_0\), and pulling back \(p\) gives

\[ 0\to Y_0\to P_0\to Z_X\to0. \tag{4.9} \]

The composite \(X_1\to P_0\to Z_X\) is the image quotient of \(a\), hence epic. Thus \(I\to Z_X\) is epic, and \(I+Y_0=P_0\): the quotient by \(I+Y_0\) factors through \(Z_X\), and that factor vanishes after the epimorphism from \(I\).

The intersection \(I\cap Y_0\) is the image of \(f_0\). Indeed, pull back the epimorphism \(X_1\to I\) along \(I\cap Y_0\to I\). The inverse image is the kernel of \(X_1\to Z_X\), namely \(X_0\). Hence \(X_0\to I\cap Y_0\) is epic, and its composite into \(Y_0\) is \(f_0\), by (2.3). It therefore represents precisely \(\operatorname{im}f_0\). This argument uses an actual pullback, without lifting arbitrary maps through an epimorphism.

The arrow \(Y_0\to P_0/I\) is epic because \(I+Y_0=P_0\), and has kernel \(I\cap Y_0=\operatorname{im}f_0\). Consequently

\[ P_0/I\simeq\operatorname{coker}f_0. \tag{4.10} \]

The composite \(P\to L\to L/Z_X\) is epic with kernel \(P_0\). By (2.4), \(L/Z_X\simeq\ker f_3\), so \(P/P_0\simeq\ker f_3\). The nested subobjects give

\[ 0\to\frac{P_0}{I}\to\frac{P}{I} \to\frac{P}{P_0}\to0. \tag{4.11} \]

The first arrow is monic because the inverse image of \(I\) in \(P_0\) is \(I\); the second is epic as a quotient, with kernel the image of \(P_0/I\). Substituting (4.10) and \(P/I=H\) proves (4.8).

The finite-length arithmetic of Composition factors and uniform chain bounds, Proposition 3.1 yields

\[ \ell(H)=\ell(\operatorname{coker}f_0)+\ell(\ker f_3). \tag{4.12} \]

Each length is nonnegative and vanishes exactly for zero. Thus \(H=0\) exactly when \(f_0\) is epic and \(f_3\) monic. This also follows directly from (4.8), without any length assumption. Finite length is required only for the numerical formula; the exact sequence holds in every abelian category. \(\square\)

5. References and interfaces

Exact sequences and diagram lemmas in abelian categories are also treated in Pierre Schapira, An Introduction to Categories and Homological Algebra, lecture notes, version of 1 March 2026, Sections 5.1 and 5.5.

The retained canonical interfaces are signed pullback/pushout recognition in Stacks, Lemma 12.5.11, kernel/cokernel comparisons in Lemma 12.5.12, and stability of epimorphisms under pullback in Lemma 12.5.13. The endpoint and completion arguments explicitly apply these finite interfaces to ordinary abelian objects.