Categories for the Working Mathematician says
Definition. A monad $T= \langle T, \eta, \mu\rangle $ in a category $X$ consists of a functor $T: X \to X$ and two natural transformations
$$\eta : I_X \Rightarrow T, \mu : T^2 \Rightarrow T $$
which make the following diagrams commute
How can the two diagrams in (2) be written as identity equations?
Thanks.

In any diagram: pick two objects $x,y$, list all 'morphism paths' that start in $x$ and end in $y$. All these compositions ought to be equal. This is rather direct for commuting squares and triangles, since we have few paths to consider. Here, we have
$$ \mu \circ T\mu = \mu \circ \mu T $$
and
$$\mu \circ \eta T = \mu \circ T\eta = 1_T.$$