Suppose that the diagram (4) is commutative and has exact rows. Under these conditions:
(i) If g is injective and if f and v are surjective, then h is injective. (ii) If g is surjective and if h and u′ are injective, then f is surjective.
To prove (i), consider the diagram
u(M)f′↓u′(M′)ww′Ng↓N′vv′Ph↓P′
where f′ is the mapping having the same graph as the restriction of g to u(M), w and w′ being the canonical injections; it is clear that this diagram is commutative and has exact rows. Moreover w′ is injective, and by assumption v is surjective; we therefore have, by prop. 2 (iii), an exact sequence
Ker(g)⟶Ker(h)dCoker(f′);
since g is injective and f′ is surjective, we therefore have Ker(h)=0.
To prove (ii), consider the diagram
Mf↓M′uu′Ng↓N′ww′ν(N)h′↓ν′(N′)
where this time h′ is the mapping having the same graph as the restriction of h to ν(N), and w and w′ have respectively the same graphs as ν and ν′; this diagram is commutative and its rows are exact. Moreover w is surjective and by assumption u′ is injective; we therefore have, by prop. 2 (iii), an exact sequence
Ker(h′)dCoker(f)⟶Coker(g);
since g is surjective and h′ is injective, we therefore have Coker(f)=0.
Corollary 3 (Five Lemma). — Consider a commutative diagram of A-modules
(i) If f2 and f4 are injective and f1 surjective, f3 is injective.
(ii) If f2 and f4 are surjective and f5 injective, f3 is surjective.
In particular, if f1, f2, f4 and f5 are isomorphisms, the same is true of f3.
To prove (i), put M2=Coker(u1), M2′=Coker(u1′) and denote by f2:M2→M2′ the mapping deduced from f2. It follows from cor. 2 (i) that f2 is injective. Applying cor. 1 (i) to the diagram
where u2 and u2′ are deduced from u2 and u2′, we see that f3 is injective.
To prove (ii), set M4=Ker(u4), M4′=Ker(u4′) and denote by f4:M4→M4′ the mapping induced by f4. It follows from cor. 2 (ii) that f4 is surjective. Applying cor. 1 (ii) to the diagram