Awodey's Category Theory Exercise 9.9.2 I am having problems with this question in Awodey's Category Theory book p.248:


  
*Show that every monoid M admits a surjection from a free monoid $F(X) → M$, by considering the counit of the free $\dashv$ forgetful adjunction.
  

Let $f : F(X)→M$ be a monoid homomorphism and $m \in M$. We want to show that there is $x \in F(X)$ such that $f(F(x))=m$. But now I'm kind of stuck.
I know I should use the the UMP of the counit $\epsilon : F \circ U \to 1_\mathbf{D}$ somehow, which says that, for $C \in \mathbf{C}$ and $D \in \mathbf{D}$, each $f : F(C) \to D$ determines a function $g : U(D) \to C$ uniquely up to isomorphism such that $f = F(g) \circ \epsilon_D$. 
Any help would be highly appreciated!
Thanks!


Let $f : F(X)→M$ be a monoid homomorphism and $m \in M$. We want to show that there is $x \in F(X)$ such that $f(F(x))=m$. But now I'm kind of stuck.

This looks like you're trying to show that every monoid homomorphism from a free monoid is surjective, but you only have to show that there exists a surjection from a free monoid.
You're told to use the counit of the adjunction, which is a natural transformation $FU\rightarrow id$. So its component at $M$ is a homomorphism $F(U(M))\rightarrow M$. Try to show that this is surjection. 
(Hint: Find a right inverse to the underlying function $U(F(U(M)))\rightarrow U(M)$.)
