Added an implementation for the product of matrix.