We develop the theory of “branch algebras”, which are infinitedimensional associative algebras that are isomorphic, up to taking subrings of finite codimension, to a matrix ring over themselves. The main examples come from groups acting on trees. In particular, we construct an algebra over the field of two elements, that is finitely generated, prime, infinite-dimensional but with all proper quo...