Implemented matrix multiplication.