Implemented the naive implementation of matrix multiplication