  We develop the theory of ``branch algebras'', which are infinite-dimensional
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, for every field k we construct a k-algebra K which (1) is
finitely generated and infinite-dimensional, but has only finite-dimensional
quotients;
  (2) has a subalgebra of finite codimension, isomorphic to $M_2(K)$;
  (3) is prime;
  (4) has quadratic growth, and therefore Gelfand-Kirillov dimension 2;
  (5) is recursively presented;
  (6) satisfies no identity;
  (7) contains a transcendental, invertible element;
  (8) is semiprimitive if k has characteristic $\neq2$;
  (9) is graded if k has characteristic 2;
  (10) is primitive if k is a non-algebraic extension of GF(2);
  (11) is graded nil and Jacobson radical if k is an algebraic extension of
GF(2).
