Representations of the direct product of matrix algebras