TITLE: Algebra in a category
QUESTION [8 upvotes]: I am try to understand the concept: an algebra in a category. Let $\mathcal{C}$ be a category and $A$ an object in $\mathcal{C}$. $A$ is an algebra in $\mathcal{C}$ means the multiplication $m: A \otimes A \to A$ is a morphism in $\mathcal{C}$? 
Let $H$ be a bialgebra and $V$ a Yetter-Drinfeld module over $H$. Let $YD_{H}^H$ be the monoidal category of all Yetter-Drinfeld modules over $H$. Since $YD_H^H$ is a tensor category, the tensor algebra $T(V)$ is a Yetter-Drinfeld module over $H$. Therefore $T(V)$ is an object in $YD_H^H$. When we want to show that $T(V)$ is an algebra in $YD_H^H$, we need to show that the multiplication $m: T(V)\to T(V) \otimes T(V)$ is a homomorphsim of $H$-modules? That is, $h.(ab)=(h_{(1)}.a)(h_{(2)}.b)$ for $h \in H, a,b \in T(V)$. Is this correct? Thank you very much.

REPLY [4 votes]: The answer to the specific situation you describe is as follows: Yes, $T(V)$ is an algebra in Yetter-Drinfeld modules over $H$ (using the concept that Jacob White mentions in his answer, where in addition we also have a $1$, which is a map from the tensor unit to the algebra satisfying the unital property expressed as a commutative diagram). A reference for this fact for $T(V)$ is, for example, [AS, 2.1]. You need to check two things:

The multiplication is a map of algebras (you state this condition),
The multiplication is a map of coalgebras (this is missing).

In fact, more is true. As $YD_{H}^H$ is a braided monoidal category, we can speak of bialgebra and Hopf algebra objects in it. $T(V)$ is a (graded, braided) Hopf algebra object in this category. This concept is for example defined in [AS, 1.7].
[AS]: Andruskiewitsch, Nicolás; Schneider, Hans-Jürgen. Pointed Hopf algebras. New directions in Hopf algebras, 1--68, Math. Sci. Res. Inst. Publ., 43, Cambridge Univ. Press, Cambridge, 2002