associativity law for scalar product