Update matmul.cpp - dot product doesn't work for rectangular matrices

The assertion 'mat.size = size' is too strict, as it does not allow the dot product of rectangular matrices e.g. rows and column vectors.