Implement matrix multiplication