Add the dot product function.