row scalar product with row difference