Scalar Product Formula