matrixvector working