Understand representations of c*-algebras from a categorical point of view In my lecture on von Neumann algebras we have defined a representation of a c*-algebra $\mathcal{A}$ as a *-homomorphism $\pi$ into $\mathcal{B}(\mathcal{H})$ for some Hilbert space $\mathcal{H}$. Then we have defined subrepresentations as the restriction of $\pi$ to invariant subspaces, i.e.: If $\mathcal{K}$ is a closed subspace of $\mathcal{H}$ such that for every $a\in\mathcal{A}$ we have $\pi(a)(\mathcal{K}) \subseteq \mathcal{K}$, then $$\pi|_\mathcal{K}: \mathcal{A}\to\mathcal{B}(\mathcal{K}),  a\mapsto \pi(a)|_\mathcal{K}$$ is a subrepresentation of $\pi$ on $\mathcal{K}$.
My question is: How can we understand this from a categorical point of view. First I thought that just a morphism is a representation of one object of a category as another. However in this generality it wouldn't be obvious to extend the term of a subrepresentation to this larger context.
I did some research and figured out that the aim of a representation is indeed to represent a structure as linear maps on a vector space, in this case as a subalgebra of $\mathcal{B}(\mathcal{H})$, in the case of groups as a subgroup of $\mathrm{Aut}(X)$ for some vector space $X$.
In the case of groups I have found two ways to obtain representations: First via a group action $\varphi: G \times X \to X$, then $\pi(g)=\varphi(g,\cdot)$ is a representation. Secondly if one considers a group as a category with one object $*$, then $G=\mathrm{Mor}(*)$ and a functor from this one object category into $\mathrm{Vect}$ yields a representation.
However, both constructions didn't enlighten me in such a way that I would see how the c*-algebra case fits into this construction or how one could express the idea of representations in a larger class of categories uniformly.
Disclaimer: I have no deep knowledge in category theory. I am totally convinced that thinking in categories is essential to really understand mathematics, otherwise I wouldn't rise such questions, nevertheless it would be nice to get an answer on a level that I am able to understand ;)
Kind regards,
Sebastian
 A: Not sure if this is what you are looking for, but if $A$ is a $C^*$-algebra, then we can define the category $\textbf{rep}(A)$ of the representations of $A$. More precisely:

*

*The objects of $\textbf{rep}(A)$ are pairs $(H,\pi)$ where $H$ is a Hilbert space and $\pi:A\to\mathcal{B}(H)$ is a $*$-homomorphism.


*The morphisms between two representations are the bounded operators that intertwine the images of the representations, i.e.
$$\text{Hom}_{\textbf{rep}(A)}((H,\pi), (K,\rho)):=\{u\in\mathcal{B}(H,K): u\circ\pi(a)=\rho(a)\circ u \text{ for all }a\in A\} $$
One can easily verify that $\text{rep}(A)$ is a pre-abelian category, i.e. we have kernel representations and co-kernel representations. More precisely, if $(H,\pi)\xrightarrow{u}(K,\rho)$ is a morphism in $\textbf{rep}(A)$, then the pair $(\ker(u), \pi(\cdot)\vert_{\ker(u)})$ is a representation of $A$ and the inclusion operator $i:\ker(u)\to H$ is a morphism in $\textbf{rep}(A)$. This is the kernel of $u$, i.e.
$$\ker\big((H,\pi)\xrightarrow{u}(K,\rho)\big)=(\ker(u),\pi(\cdot)\vert_{\ker(u)})\xrightarrow{i}(H,\pi).$$
Likewise, one shows that we have cokernels: the pair $(u(H)^\bot,\rho(\cdot)\vert_{u(H)^\bot})$ is a representation of $A$ and the projection operator $p:K\to u(H)^\bot$ is a morphism in $\textbf{rep}(A)$, so
$$\text{cokernel}\big((H,\pi)\xrightarrow{u}(K,\rho)\big)=(K,\rho)\xrightarrow{p}(u(H)^\bot,\rho(\cdot)\vert_{u(H)^\bot}).$$
The category is not really abelian and the explanation is the same as why the category $\textbf{Hilb}$ is not abelian, but c'est la vie!
We can say a few more things: irreducible representations are identified with the objects $(H,\pi)$ that are simple, in the sense that the Hom-sets $\text{Hom}_{\textbf{rep}(A)}(-, (H,\pi))$ do not contain any non-trivial monomorphisms, i.e. injective intertwining operators.
When we say that two representations are "unitarily equivalent" we simply mean that they are isomorphic in the category $\textbf{rep}(A)$.
There are probably a few more things that we can say, for example about what the role of cyclic representations is, about the universal representation and so on, but I think the above cover the main idea.
EDIT: As noted in the comments by QuantumSpace, the fact that isomorphism in this category is exactly unitary equivalence is not obvious. I include a proof below, the idea of which was communicated to me by QuantumSpace (thank you).
Let $(H,\pi), (K,\rho)\in\textbf{rep}(A)$ with $(H,\pi)\cong(K,\rho)$, so there exists a bijective $s\in B(H,K)$ (i.e. an invertible operator) such that $s\pi(a)=\rho(a)s$ for all $a\in A$.
We then do polar decomposition for $s$, say $s=u|s|$ where $|s|:=(s^*s)^{1/2}\in B(H)$ and $u\in B(H,K)$ is a partial isometry. Now by invertibility of $s$ we have that $|s|$ is also invertible in $B(H)$ and thus $u=s|s|^{-1}$. One can easily show that $u$ is a unitary: it is obviously surjective and
$$\langle u\xi,u\eta\rangle_K=\langle s^*s(s^*s)^{-1/2}\xi,(s^*s)^{-1/2}\eta\rangle_H=\langle|s|\xi,|s|^{-1}\eta\rangle_H=\langle\xi,|s||s|^{-1}\eta\rangle_H=\langle\xi,\eta\rangle_H,$$
where we used that $|s|$ is self-adjoint.
Now observe that $s^*s\pi(a)=s^*\rho(a)s=(\rho(a^*)s)^*s=(s\pi(a^*))^*s=\pi(a)s^*s$, so $s^*s$ commutes with $\pi(A)$, and hence so does $|s|$ and thus so does $|s|^{-1}$. Therefore
$$u\pi(a)=s|s|^{-1}\pi(a)=s\pi(a)|s|^{-1}=\rho(a)s|s|^{-1}=\rho(a)u$$
and thus $u$ is a unitary intertwining operator, i.e. $(H,\pi)$ and $(K,\rho)$ are unitarily equivalent.
