matmult function

inner product for matrices and vectors