Problem: Show that a diagram $\cdot\substack{\rightarrow\\[-1em] \leftarrow} \cdot$ commutes if and only if the maps assigned to the two arrows are inverse.
I'm wondering how to prove the forward direction of this claim. I'll call the maps and objects $f\colon A \to B$ and $g\colon B \to A$
I can get that $f = fgf$. Similarly, $g = gfg$. This seems like it only proves that $fg$ and $gf$ are idempotent, or maybe that $f$ is a fixed point of $fg$ and $g$ is a fixed point for $gf$, I don't see that it follows that $g$ and $f$ are inverses.
The definition of commutative diagram I have is: A diagram in $\mathcal{C}$ commutes if for each pair $p$, $q$ of dots in $G$ all paths in $G$ from $p$ to $q$ are interpreted as the same map in $\mathcal{C}$.
Am I allowed to use that I have maps $1_A\colon A \to A$ and $1_B\colon B \to B$ since they are objects in a category? I guess in that case we can easily derive the required statement since we then have e.g. $1_A = gf$, but the examples in my textbook do not use any extra assumptions outside of explicit maps listed in the graph description. If I can't assume that, how can I proceed?