TITLE: Commutative diagrams: including the inverse map
QUESTION [5 upvotes]: Suppose I have a commutative diagram in which some of the arrows are isomorphisms. It is an interesting fact that the diagram does not necessarily remain commutative if I add the inverses of these arrows--even if they are identity maps. For instance, in the following diagram, 

I cannot necessarily travel by $g^{-1}=\text{Id}$, since then if I start at the lower left copy of $\mathbb{Z}$, I have that $j \circ g^{-1} \circ f \neq h$. 
Despite this being evident, it still seems sort of surprising to me that I can't always travel by the inverse arrow. If someone could shed some more light on it in any way, I'd appreciate it. For instance, under what circumstances may I include the inverse arrow and have the diagram remain commutative?

REPLY [4 votes]: Let $\mathcal{C}$ be a category, $\mathcal{P}$ be a preordered graph (i.e. a subgraph of a preorder), $D\colon\mathcal{P}\to\mathcal{C}$ be a diagram. Then the diagram $D$ is called commutative iff $D$ lifts to a functor $F(\mathcal{P})\to C$, where $F(\mathcal{P})$ is the free preorder, generated by $\mathcal{P}$. If we add inverses to some set of arrows $S\subset Arr(\mathcal{P})$ to $\mathcal{P}$, i.e. we get a preordered graph $\mathcal{P}_{S}$, and the diagram $D$ extends to a diagram $D_{S}\colon\mathcal{P}_{S}\to\mathcal{C}$, then $D_{S}$ is commutative iff $D_{S}$ lifts to a functor from a localization $F(\mathcal{P})[S^{-1}]\to\mathcal{C}$.
If the image $D(Arr(\mathcal{P}))$ consists only of isomorphisms, then for every $S\subset Arr(\mathcal{P})$ the diagram $D_{S}$ lifts to a functor $F(\mathcal{P})[S^{-1}]\to\mathcal{C}$, namely, to a functor $F(\mathcal{P})[S^{-1}]\to F(\mathcal{P})[\mathcal{P}^{-1}]\to\mathcal{C}[D(\mathcal{P})^{-1}]$, because in this case $\mathcal{C}[D(\mathcal{P})^{-1}]=\mathcal{C}$ is a trivial localization!
Actually, the diagram $D_S$ always commutes in $\mathcal{C}[D(\mathcal{P})^{-1}]$. For example, let $\mathcal{C}=\mathcal{K}(\mathcal{A})$ be a homotopy category of an abelian category $\mathcal{A}$ and $D$ be a diagram of quasi-isomorphisms in $\mathcal{A}$, some of whose are isomorphisms in $\mathcal{K}(\mathcal{A})$. Then if we add all inverses of isomorphisms to this diagram, then it commutes in the derived category $\mathcal{D}(\mathcal{A})$.
Your diagram, of course, consists not only of isomorphisms. The localization of the free preordered graph, generated by it (with inverses of identity morphisms in $\mathbf{Ab}$) is a full graph on four vertices, so each $\mathbf{Ab}$-arrow in the image of the original diagram must be an isomorphism, but they aren't.