Implement vector-matrix, matrix-vector and matrix-matrix multiplication.