# Question on the commutativity of a diagram of morphisms

Let us consider a category $$\mathfrak{A}$$ and the following diagram of morphisms:

$$\require{AMScd}$$ $$\begin{CD} A @>{f}>> B\\ @V{h}VV @V{k}VV\\ C @>{g}>> D \end{CD}$$

Assume that $$k \circ f=g \circ h$$ and that there exists a unique $$w: B \longrightarrow C$$ such that $$w \circ f=h$$. May I also deduce that $$g \circ w=k$$?

• I added the labels to your vertical arrows. Check my edit to see how to do this. Sep 3, 2021 at 21:52

Another counterexample, using the category of abelian groups and group homomorphisms (just to keep things down to earth): $$\require{AMScd}$$ $$\begin{CD} 0 @>>> \mathbb{Z}/2\\ @VVV @VV{1}V\\ 0 @>>> \mathbb{Z}/2 \end{CD}$$ This clearly commutes. There is a unique morphism $$w: \mathbb{Z}/2 \to 0$$ which happens to make the upper left triangle commute — that is, not only does the subset $$\{w: w \circ f = h\} \subseteq \text{Hom}(B,C)$$ have cardinality 1, but in fact $$\text{Hom}(B,C)$$ has cardinality 1. The bottom right triangle won't commute in this case.

No. Consider the category whose only objects are distinct objects $$A, B, C, D$$, where the only arrows $$A \to A$$, $$B \to B$$, $$C \to C$$, $$D \to D$$ are the identity arrows, and the following are all the other arrows:

1. $$f : A \to B$$
2. $$h : A \to C$$
3. $$w : B \to C$$
4. $$e : A \to D$$
5. $$k \neq k' : B \to D$$
6. $$g : C \to D$$

Note that with the exception of $$B \to D$$, there is at most one arrow $$X \to Y$$. So the only nontrivial composition is $$g \circ w$$, which we define to be $$k'$$.

This forms a category. And in this category, it is the case that $$k \circ f = g \circ h$$. But it is not the case that $$g \circ w = k$$.

• I'm not 100% sure this gives a category. Sep 3, 2021 at 20:34
• @Randall Clearly, composition is well-defined. The identity law is satisfied automatically by definition, so the only thing to check is the associativity law. The only arrows with a common domain and codomain that could be unequal are $k, k' : B \to D$, so we need only check associativity for trios which compose to $B \to D$. But any such trio must contain an identity morphism, so associativity is trivial. Sep 3, 2021 at 20:35
• I don't doubt that you're right. Is it clear that $k' \circ f = k \circ f$? You need that for the associativity $(gw)f = g(wf)$ to hold, right? Sep 3, 2021 at 20:39
• @Randall We see that both $k' \circ f$ and $k \circ f$ are from $A \to D$. The only arrow $A \to D$ is $e : A \to D$. Sep 3, 2021 at 20:40
• Oh, I see. I didn't notice the edit. Sep 3, 2021 at 20:41