Basic implementation of matrix multiplication.