Efficient Algorithm for Multi-Dimensional Matrix Multiplication Operations Representation