Propositional form X is the contrary of propositional form Y (i.e., X and Y are contraries [of one another]) iff (1) it is impossible for both X and Y to be true and (2) it is possible for both X and Y to be false.
Example from everyday life: ‘Only Muslims go to heaven’ is the contrary of ‘Only Christians go to heaven’ (from Peter Singer)
Example from categorical logic: ‘All S are P’ is the contrary of ‘No S are P’ (iff at least one S exists)
Example from propositional logic: ‘p • q’ is the contrary of ‘p • ~q’
Example from predicate logic: ‘(x)Øx’ is the contrary of ‘(x)~Øx’ (iff at least one object exists)