Homotopy of quivers The matrix ring $k^{n\times n}$ can be realized in many ways as a quotient of a path algebra: For example choose the quiver $1\leftrightarrows 2 \leftrightarrows \cdots \leftrightarrows n-1\leftrightarrows n$ and impose the relations $i\to i\pm 1\to i = e_i$ where $e_i$ is the idempotent associated to the vertex $i$. So in this sense loops are trivial. The isomorphism is given by $e_i\mapsto E_{ii}$ and $(i\to i\pm 1) \mapsto E_{i,i\pm 1}$.
In fact one can show that every path algebra over a strongly connected finite quiver has a matrix ring as a quotient: Factoring out all "loops" (i.e. imposing the relation $i_1\to i_2 \to \ldots \to i_k \to i_1=e_{i_1}$ for every closed loop in the quiver) gives a matrix algebra where the vertex idempotents become the diagonal idempotents in the matrix ring.
It is not even necessary to quotient out all loops as can be seen be the example with the linear quiver. One has to quotient out just enough loops that all other loops lie in the ideal generated by that.
This feels like a homotopy condition: Consider the quiver as one dimensional CW-complex and glue in a 2-cell to some loops you want to get rid of. If the resulting complex is simply connected, the corresponding path algebra should be a matrix ring.
Now my questions:


*

*This naive form of the statement seems not to be true because it does not take into account the orientations of the loops. Is there a way to make this homotopy feeling precise? (If the quiver is symmetric in the sense that edges come in pairs of opposite orientation then I think I have proved the statement.)

*Is there a more general version of this line of thinking? Maybe some result that says that if two quivers are homotopy equivalent and the relations are in compatible in some sense then the corresponding path algebra quotients are morita equivalent?

 A: Once upon a time I noticed roughly this but didn't know what to do with it. I would rephrase as follows.
Any category $C$ has an associated "category algebra" $k[C]$ spanned by the morphisms of $C$ where the product of two morphisms is $0$ if they can't compose and their composition otherwise. This algebra is unital iff $C$ has finitely many objects; in this case it can be thought of as the endomorphism algebra of a formal direct sum of all of the objects of $C$. If $C$ is the one-object category associated to a group $G$, then $k[C] \cong k[G]$. Somewhat more generally the following is true.

Theorem: Let $C$ be a groupoid with finitely many objects. Suppose $C$ is the disjoint union of connected groupoids $C_i$ with $n_i$ objects, each of which is isomorphic, and each of which has automorphism groups $G_i$. Then
$$k[C] \cong \bigoplus_i M_{n_i}(k[G_i]).$$
In particular, the Morita equivalence class of $k[C]$ only depends on the homotopy type (by which I mean equivalence class under equivalence of categories) of $C$, and $k[C]$ is a matrix algebra over $k$ iff $C$ is contractible (by which I mean equivalent to the terminal groupoid).

I don't have a conceptual explanation of this, though. By a conceptual explanation I mean one would want to upgrade $C \mapsto k[C]$ to a $2$-functor from the $2$-category $\text{Cat}$ of categories, functors, and natural transformations to the $2$-category $\text{Bimod}$ of rings, bimodule categories, and bimodule homomorphisms (equivalence in this $2$-category is Morita equivalence), but as far as I can tell $C \mapsto k[C]$ is not even a functor! (The problem is that functors can cause morphisms which were previously not composable to become composable.) Perhaps one should instead talk about the free $k$-linear category on $C$...

Edit: Aha! We should definitely instead be talking about the free $k$-linear category on $C$, which I will confusingly also denote $k[C]$. Sorry about that.
But now $C \mapsto k[C]$ is a $2$-functor. It takes values in the $2$-category of $k$-linear categories, functors, and natural transformations, and so in particular it sends equivalent categories to equivalent $k$-linear categories. Now the problem reduces to understanding why equivalent $k$-linear categories give rise to Morita equivalent rings. It will be helpful, but not necessary, to be aware that Morita theory naturally generalizes to $k$-linear categories as follows.

Theorem: Let $R, S$ be $k$-linear categories (thought of as generalizations of $k$-algebras, which we reduce to when $R, S$ have one object). The categories $\text{Mod}(R), \text{Mod}(S)$ of functors $R^{op} \to k\text{-Mod}, S^{op} \to k\text{-Mod}$ (thought of as either analogues of presheaves or generalizations of right modules) are equivalent if and only if $R$ and $S$ have equivalent Cauchy completions.

Here the Cauchy completion of a $k$-linear category $R$ is obtained from $R$ by first adjoining formal direct sums and then splitting idempotents. It is a slight generalization of the Karoubi envelope, which figures in the corresponding theorem for ordinary categories.
Example. Let $R$ be the one-object $k$-linear category associated to a ring which I will, again confusingly, also denote by $R$. Adjoining formal direct sums gives us the category of finitely generated free right $R$-modules, while splitting idempotents gives us the category of finitely generated projective right $R$-modules.
Now we just need one more observation.
Observation: Let $R$ be a $k$-linear category with finitely many objects. Then $\text{Mod}(R)$ is equivalent to the module category of the endomorphism ring of the formal direct sum of the objects of $R$.
You can just verify this directly or, a little more abstractly, observe that the identity morphisms of the objects of $R$ become idempotents in the endomorphism ring, and roughly speaking splitting these idempotents gives us our original objects back.
So, to recap:

*

*Suppose $C$ and $D$ are equivalent groupoids with finitely many objects.

*Then the free $k$-linear categories $k[C]$ and $k[D]$ are equivalent, and hence have equivalent module categories.

*Since $k[C]$ and $k[D]$ have finitely many objects we can replace them with the endomorphism rings of the formal direct sum of all their objects, and the result is two Morita equivalent rings.

