Vector space as a category? Am I correct that a vector space $V$ is a category where

*

*Objects are vectors.

*Morphisms are linear maps $V \to V$, so that $\text{hom}(u, v)$ are all linear maps $A$ that take $u$ to $v$: $v = Au$.

*Morphism composition is the composition of linear maps.

*Identity morphism $\text{id}_v$ for vector $v$ might be tricky to define. In the simplest case $\text{id}_v$ is the identity linear map, the same for every vector. However, if $V$ is an inner product space, we can take $\text{id}_v$ to be the projection $\text{id}_v(u) = \langle u, v \rangle / \langle v, v \rangle v$.

If so, is there a reference which explores this idea in depth? Including vector spaces with additional structures, e.g. inner product spaces. Also I am interested in meaningful subcategories of such category.
I see two advantages to such an exposition:

*

*Finite-dimensional vectors (objects) and matrices (morphisms) can be manipulated by computers, allowing computations with such representations of categories.

*It might be easier to teach/illustrate category theory and its constructions in this setting, especially for non-mathematicians.

The concrete reason why I am asking is the paper "Categorical Representation Learning: Morphism is All You Need" by Artan Sheshmani and Yizhuang You. They use a vector space to model a certain category. What I want to learn are category theory constructions that are possible on vector spaces as categories, so I could explore their approach further.
 A: For concreteness, we'll work with vector spaces over $\mathbb{R}$, but all of this applies more generally.

Let $F$ be the functor from the terminal category to $\mathrm{Vect}$ that sends the object of the terminal category to $\mathbb{R}$. Let $G$ be the inclusion functor of the full subcategory of $\mathrm{Vect}$ consisting of just $V$. Then the category you want is equivalent to the comma category $(F/G)$.
To elaborate a bit, an object in $(F/G)$ is a pair of objects from the two source categories plus a morphism in the target category. For us, the two source categories only have one object, so there's only one possible pair. The morphism is from $\mathbb{R}$ to $V$ in $\mathrm{Vect}$. There's an isomorphism between linear maps from $\mathbb{R}$ to $V$ and elements of $V$, so the objects of our category can be thought of as elements of $V$.
A morphism in $(F/G)$ is a pair of morphisms in the source categories such that a certain square commutes. The source of $F$ is the terminal category, so there's only one choice of morphism there. A morphism in the source of $G$ is an endomorphism of $V$. We'll call our choice $L : V \to V$.
For a morphism from $u$ to $v$, the square that has to commute is then
$$
\require{AMScd}
\begin{equation}
\begin{CD}
 \mathbb{R} @>\mathrm{id}>> \mathbb{R} \\
    @V{u}VV    @VV{v}V \\
 V @>>{L}> V
\end{CD}
\end{equation}
$$
Explicitly, this says that $L u = v$.

Whether this really "represents" the vector space $V$ depends on if we can recover the full vector space from this category. One problem is that any two nonzero vectors will be isomorphic in this category: there's an invertible linear map that sends one to the other. You can prove this using a basis for $V$. The zero vector is never isomorphic to any nonzero vector since there are no linear maps sending the zero vector anywhere else.
This implies that addition of vectors cannot be recovered using categorical properties. In the category corresponding to $\mathbb{R}$, $-1$ and $1$ are isomorphic, but $1 + 1$ and $-1 + 1$ are not. So addition does not respect isomorphism.
A: In general you can imagine a monoid $(M,\cdot)$ as a category in the follwoing way. Define $\mathcal{M}$ to be the category with one object, call it $*$. For each element in $m\in M$ we take one morphism $m:*\to *$ in $\mathcal{M}$. The composition law in $\mathcal{M}$ is inherited by the multiplication in $M$. As $M$ is a monoid it has a neutral element, corresponding to the identity morphism of $*$ and multiplication is associative and therefore composition in $\mathcal{M}$ is associative.
As every vector space is a monoid, we can to this for vector spaces in particular.
