The categorical product A × B of two objects is characterized by a universal property: it comes with projections π_1: A×B → A and π_2: A×B → B such that for any object C with morphisms f: C → A and g: C → B, there is a unique morphism ⟨f,g⟩: C → A×B with π_1∘⟨f,g⟩ = f and π_2∘⟨f,g⟩ = g. The coproduct A+B is the dual: characterized by injections and unique morphisms out of it. In Set these are Cartesian product and disjoint union; in Grp they are direct product and free product; in Ab they coincide as the direct sum.
Prove that the Cartesian product of sets satisfies the universal property of the categorical product in Set. Then derive the coproduct by duality and verify it is the disjoint union. Compute products and coproducts in a poset category to see they correspond to meets (infima) and joins (suprema).
You already know the Cartesian product of sets: A × B = {(a, b) : a ∈ A, b ∈ B}. Category theory asks a surprising question: can we describe this construction purely in terms of morphisms, without ever mentioning elements? The answer is the universal property of the product.
The categorical product A × B is defined by two projection morphisms π₁: A×B → A and π₂: A×B → B, satisfying the following condition: for any object C and any pair of morphisms f: C → A and g: C → B, there exists a unique morphism ⟨f,g⟩: C → A×B such that π₁∘⟨f,g⟩ = f and π₂∘⟨f,g⟩ = g. The key word is *unique* — there is exactly one way to factor a pair of morphisms through the product. You can verify this in Set: the unique morphism ⟨f,g⟩ is just c ↦ (f(c), g(c)), the function that pairs the outputs. Any other function into A × B that agrees with π₁ and π₂ must produce the same pairs, so uniqueness holds.
The coproduct is the dual construction — obtained by reversing all the arrows. The coproduct A + B comes with injection morphisms i₁: A → A+B and i₂: B → A+B, and for any C with morphisms f: A → C and g: B → C, there is a unique morphism [f,g]: A+B → C satisfying [f,g]∘i₁ = f and [f,g]∘i₂ = g. In Set, this is the disjoint union: [f,g] applies f to elements tagged as coming from A and g to elements tagged as coming from B. Notice how the arrows to the product (morphisms *into* A×B) become arrows from the coproduct (morphisms *out of* A+B) — perfect duality.
The behavior of products and coproducts varies dramatically across categories. In a poset (ordered set viewed as a category), the product of two elements is their meet (greatest lower bound) and the coproduct is their join (least upper bound) — notions you may recognize from lattice theory. In Ab, finite products and coproducts coincide as the direct sum A ⊕ B, a special property of abelian categories. In Grp, the product is the familiar direct product but the coproduct is the free product A * B, a much larger and more complicated construction where elements interleave freely from both groups.
The deep lesson is that the same abstract universal property pattern — existence and uniqueness of a factoring morphism — determines the "right" notion of pairing or co-pairing in each category. The product is defined by what maps *into* it; the coproduct by what maps *out of* it. Mastering this duality is the first step toward understanding limits and colimits in full generality.