More formally, for a mix of molecules of A and B, then the interactions between unlike neighbors (U AB) and like neighbors U AA and U BB must be of the same average strength, i.e., 2 U AB = U AA + U BB and the longer-range interactions must be nil (or at least indistinguishable). If the molecular forces are the same between AA, AB and BB, i.e., U AB = U AA = U BB, then the solution is automatically ideal.