Is there a concept of a "free Hilbert space on a set"?

Consier the category $\mathsf{Hilb}$ of Hilbert spaces and continuous linear maps between them. The free Hilbert space $H(X)$ on a set $X$ (in the sense of category theory) would have to satisfy the adjunction $$\hom_\mathsf{Hilb}(H(X),K) \cong \hom_{\mathsf{Set}}(X,|K|),$$ where $K$ is a Hilbert space with underlying set $|K|$. Notice that $H(X)=\ell^2(X)$ for finite sets $X$. More precisely, we have for arbitrary sets $X$ $$\hom_\mathsf{Hilb}(\ell^2(X),K) = \{f \in \hom_{\mathsf{Set}}(X,|K|) : \sum_{x \in X} ||f(x)||^2 < \infty\}.$$ Now let $X$ be any infinite set. Assume that $H(X)$ exists. Let $e : X \to |H(X)|$ be the unit. For every map $f : X \to |K|$ with $K \in \mathsf{Hilb}$ there is a unique $\tilde{f} : H(X) \to K$ such that $\tilde{f}(e(x))=f(x)$ for all $x \in X$. If $C:=||\tilde{f}|| \in \mathbb{R}_{\geq 0}$, it follows $||f(x)|| \leq C ||e(x)||$. Certainly we may choose $f(x) \neq 0$, so that also $e(x) \neq 0$. Hence, if $g : X \to |K|$ is any map, then $g$ is bounded (consider $f(x):=g(x) \cdot ||e(x)||$). This is a contradiction (assume $\mathbb{N} \subseteq X$ and define $g(n):= n \cdot u$ for some unit vector $u$).


Here is the answer to the analogous question about Banach spaces. The same kind of argument as in Martin Brandenburg's answer shows that there is no free Banach space on a set if you think the morphisms in the category of Banach spaces are the continuous linear maps.

However, there is a better choice of morphisms available: you can instead let the morphisms be the continuous linear maps of norm at most $1$. (See this blog post for a defense of this choice.) One of the many nice things about this choice of morphism is that an isomorphism in this category is an isometric isomorphism; in other words, this category really remembers the norm on a Banach space and not just the norm up to Lipschitz equivalence. It is also categorically extremely well-behaved: the corresponding category is complete, cocomplete, and has a symmetric monoidal structure, the Banach space tensor product, with respect to which it is closed monoidal.

In this category there is such a thing as the free Banach space on a set $S$, and it turns out to be precisely $\ell^1(S)$ provided that you also modify the forgetful functor: the new forgetful functor sends a Banach space not to its underlying set but to the underlying set of its unit ball. (This is also $\text{Hom}(\mathbb{C}, -)$ where $\mathbb{C}$ is the monoidal unit for the Banach space tensor product.)


Unfortunately, I don't think this argument can be adapted to the case of Hilbert spaces. There are a couple of different choices of morphism and forgetful functor you can try and I think none of them work. Potentially the real problem with Hilbert spaces is that they do not really form a category: they form a dagger category with involution given by the adjoint, and that structure really needs to be taken into account when thinking categorically about Hilbert spaces.

$\ell^2(S)$ can be thought of as satisfying a universal property, but it's not free on a collection of vectors: instead, it's free on a collection of orthonormal vectors.