toroidal matrix