Morphisms in a commutative diagram I'm studying category theory as a hobby. I'm at a beginner level.
I have a simple question:
Suppose we have a commutative diagram.
In it there are two objects A,B and exist 2 morphisms from A to B and from B to A. Is it true that the two objects are isomorphic?
(And the reason is that in a commutative diagram the only endomorphisms are the identity morphisms)
Many thanks in advance!
 A: Consider the diagram $f\colon A\rightleftarrows B\colon g$. There are four commutativity conditions one could impose.


*

*No conditions

*$g\circ f=\mathrm{id}_A$, i.e. $A\xleftarrow{g}B$ is a left inverse (also known as a retraction) of $X\xrightarrow{f}Y$.

*$f\circ g=\mathrm{id}_B$, i.e. $A\xleftarrow{g}B$ is a right inverse (also known as a section) of $A\xrightarrow{f}B$.

*Both $g\circ f=\mathrm{id}_A$ and $f\circ g=\mathrm{id}_B$, i.e. $g$ and $f$ are inverses of one another and are therefore isomorphisms.


The "standard" definition of commutative diagram, that for any two objects, any two paths of composable morphisms compose to the same thing, coincides with the commutativity condition 4. (since the empty path composes to the identity morphism). 
But in practice you often want to (and books and papers often do) express one of the weaker conditions 1., 2., 3., or perhaps even some other condition ($(g\circ f)\circ(g\circ f)=g\circ f$, for example). To accommodate such usage, it is more useful to think not of commutative diagrams, but of diagrams with imposed commutativity relations, where the commutativity relations are usually left implicit but can be figured out from the context in which the diagram appears. 
A concrete example is the diagram $X\to Y\rightrightarrows Z$ of an equalizer of two morphisms. Here the implicit commutativity relation is that any two maximal paths of composable morphisms compose to the same morphism (otherwise, the standard definition of commutative diagram wold force the parallel morphisms $Y\rightrightarrows Z$ to be the same morphism).
A: If the following diagram is said to be a commutative diagram
\begin{array}{ccc}
A & \leftrightarrows & B\end{array}
then the two pictured arrows are indeed isomorphisms.
In this diagram there are at most $4$ arrows involved: the two pictured arrows and next to that also the non-pictured identities. Essential for commutative diagram: parallel arrows are equal. 
If $f:A\to B$ and $g:B\to A$ then $\text{id}_A$ and $g\circ f$ are parallel so that the conclusion $\text{id}_A=g\circ f$ is justified. Likewise $\text{id}_B=f\circ g$.
For a broader treatment of commutative diagrams have a look at Grothendiecks Tohoku paper on the pages 10 and 11.
