use matrix-multiply for all matrix types