Let M,N and Z be R-modules and let f:M→Z and g:N→Z be morphisms. We will construct the module M×ZN with two projections πM:M×ZN→M and πN:M×ZN→N. We will then show that it satisfies the universal property of a fibered product of M and N over Z.
Consider the set of pairs
M×ZN={(m,n)∣m∈M,n∈N,f(m)=g(n)}
with the standard projections πM:(m,n)↦m, and πN:(m,n)↦n.
By construction, this satisfies f∘πM=g∘πN.
We define addition on it as
(m1,n1)+(m2,n2)=(m1+m2,n1+n2).
This works, since if f(m1)=g(n1) and f(m2)=g(n2) then
So M×ZN is a subset of M⊕N closed under addition and the action of R, hence it is a submodule of M⊕N.
Now, suppose some R-module X has morphisms u:X→M and v:X→N such that for all x∈X, f(u(x))=g(v(x)). We can define a morphism σ:X→M×ZN by x↦(u(x),v(x)).
Note that σ is simply the restriction of the pairing (u,v):X→M⊕N to the submodule M×ZN. (This makes it clear that σ is an R-module homomorphism.) Indeed, (u(x),v(x)) has to land in M×ZN since f(u(x))=g(v(x)).
The pairing morphism is uniquely determined by u and v, and so if there were a morphism σ′ with the same properties it would have to be the restriction of the unique pairing to the same submodule, resulting in the same morphism. That is, given the inclusion ι:M×ZN↪M⊕N we see that
ι∘σ′=(u,v)=ι∘σ,
and since ι is a monomorphism, σ′=σ.
So, σ is uniquely determined by u and v, which demonstrates that our construction satisfies the universal property of a fibered product.