matmultacomp function

inner product for datasets with a vector space structure