Hom is left exact

Hom preserves kernels: Hom_R(M,-) is left exact (covariant) and Hom_R(-,N) is left exact (contravariant); Ext measures the failure of exactness beyond that.
Hom is left exact

Let RR be a and write for the Hom functor.

Statement (covariant in the second variable)

Fix a left RR-module MM. If

0AuAvA 0 \to A' \xrightarrow{u} A \xrightarrow{v} A''

is an exact sequence of left RR-modules, then

0HomR(M,A)uHomR(M,A)vHomR(M,A) 0 \to \mathrm{Hom}_R(M,A') \xrightarrow{u_*} \mathrm{Hom}_R(M,A) \xrightarrow{v_*} \mathrm{Hom}_R(M,A'')

is exact.

Equivalently: HomR(M,)\mathrm{Hom}_R(M,-) preserves kernels (and monomorphisms), but it need not preserve cokernels (and epimorphisms).

Statement (contravariant in the first variable)

Fix a left RR-module NN. If

AuAvA0 A' \xrightarrow{u} A \xrightarrow{v} A'' \to 0

is exact, then applying HomR(,N)\mathrm{Hom}_R(-,N) yields an exact sequence

0HomR(A,N)vHomR(A,N)uHomR(A,N). 0 \to \mathrm{Hom}_R(A'',N) \xrightarrow{v^*} \mathrm{Hom}_R(A,N) \xrightarrow{u^*} \mathrm{Hom}_R(A',N).

Failure of right exactness and Ext

The failure of Hom\mathrm{Hom} to be exact is measured by : ExtR1(,N)\mathrm{Ext}^1_R(-,N) (and higher Extn\mathrm{Ext}^n) are the of HomR(,N)\mathrm{Hom}_R(-,N), and every gives a (a special case of ).

If MM is , then HomR(M,)\mathrm{Hom}_R(M,-) is exact. If NN is , then HomR(,N)\mathrm{Hom}_R(-,N) is exact.

Examples

Example 1: Hom need not be right exact (over Z\mathbb Z)

Start from the short exact sequence

0Z×nZZ/n0. 0 \to \mathbb Z \xrightarrow{\times n} \mathbb Z \to \mathbb Z/n \to 0.

Apply HomZ(,Z)\mathrm{Hom}_{\mathbb Z}(-,\mathbb Z). Since Hom(Z/n,Z)=0\mathrm{Hom}(\mathbb Z/n,\mathbb Z)=0 and Hom(Z,Z)Z\mathrm{Hom}(\mathbb Z,\mathbb Z)\cong \mathbb Z, we get

00Z×nZExtZ1(Z/n,Z)0. 0 \to 0 \to \mathbb Z \xrightarrow{\times n} \mathbb Z \to \mathrm{Ext}^1_{\mathbb Z}(\mathbb Z/n,\mathbb Z)\to 0.

The map Z×nZ\mathbb Z\xrightarrow{\times n}\mathbb Z is not surjective for n>1|n|>1, so Hom(,Z)\mathrm{Hom}(-,\mathbb Z) fails to preserve the cokernel; the cokernel is

ExtZ1(Z/n,Z)Z/n. \mathrm{Ext}^1_{\mathbb Z}(\mathbb Z/n,\mathbb Z)\cong \mathbb Z/n.

Example 2: If MM is free, then Hom is exact

If MRrM\cong R^{\oplus r} is free, then

HomR(M,A)Ar. \mathrm{Hom}_R(M,A)\cong A^{\oplus r}.

Thus HomR(M,)\mathrm{Hom}_R(M,-) is a finite product of the identity functor, hence exact (it preserves both kernels and cokernels).

Example 3: Vector spaces over a field

If kk is a field and VV is a kk-vector space, then VV is free (hence projective). Therefore Homk(V,)\mathrm{Hom}_k(V,-) is exact, and equivalently

Extkn(V,W)=0(n>0) \mathrm{Ext}^n_k(V,W)=0 \quad (n>0)

for all kk-vector spaces WW.