Binary constraint, in mathematical optimization, is a constraint that involves exactly two variables.