define subtraction and dot product