TITLE: Why is the forgetful functor representable?
QUESTION [8 upvotes]: I'm reading Adowey's Category Theory, and I'm struggling with the last exercise of the second chapter, which is to show that the forgetful functor for monoids, $U : \mathbf{Mon} \to \mathbf{Sets}$, is representable.
Well. My first reaction upon looking at the question was thinking it was wrong, because a representable functor takes objects to sets of functions, while the underlying set of a monoid has no obligation to be of that sort. I then came to the conclusion that what was actually necessary was to show that the forgetful functor was, in some way, isomorphic to a functor of the sort $\mathrm{Hom}(A_0, -)$ for some monoid $A_0$, and some googling led me to believe it would be a good idea to set $A_0 = \mathbb{N}$, but this doesn't seem to work for the following reason:
Fix the monoid $A = (\mathbb{Z}_2, +)$, and the monoid $B$ which is exactly the same but the $0$ and $1$ are swapped. These two monoids have the same underlying set, that is, it should definitely be true that $U(A) = U(B)$. However, notice that $\mathrm{Hom}(A_0, A)$ is not equal to $\mathrm{Hom}(A_0, B)$, for any monoid $A_0$ in fact: simply consider that the function constant equal to $0$ is an element of the former but not the latter.
This leads me to believe that there is no way that the forgetful functor can be thought of as a representable functor, because, in some sense, homomorphisms from a monoid $A_0$ to $A$ "care" about which element of $A$ is the unit, while the underlying set of $A$ does not.
Where is the error in my thinking, and how should I interpret the statement "The forgetful functor is representable"?

REPLY [6 votes]: When you have an adjunction $\mathsf{F} \dashv \mathsf{U}$ $$\mathsf{F}: \mathsf{Set} \leftrightarrows \mathsf{K}: \mathsf{U},$$ where $\mathsf{U}$ is a forgetful like functor, $\mathsf{U}$ is always representable. This is due to a very specific entanglement that is characteristic of the category of sets (and in general will kinda apply for $\mathcal{V}$ in $\mathcal{V}$-$\mathsf{Cat}$ when $\mathcal{V}$ is monoidal closed). In fact $$\mathsf{U}(\_) \cong \mathsf{Set}(1, \mathsf{U}(\_)) \cong \mathsf{K}(\mathsf{F}1, (\_)),$$ and thus the forgetful functor is representable and is represented by the free algebra over the one element set. This is evident when $\mathsf{K}$ is $\mathsf{R}$-$\mathsf{Mod}$, groups, monoids and algebraic structures in general.
Notice that in the proof I used isomorphic (!!!) functors!