If and Only If

Two implications claimed in one sentence.

Two conditionals in one sentence

"P if and only if Q" states two conditionals at once, one running in each direction. "P if Q" is if Q then P. "P only if Q" is if P then Q. Together they say that P and Q are true in exactly the same cases.

It is written P ⇔ Q, and it means (P ⇒ Q) and (Q ⇒ P). The table works it out from its two directions.

case 1case 2case 3case 4PTTFFQTFTFP ⇒ QTFTTQ ⇒ PTTFTP ⇔ QTFFT

P ⇔ Q is true when both directions are true: in case 1, where P and Q are both true, and in case 4, where both are false. Case 2 breaks the forward direction and case 3 the backward one.

A proof has two parts

To prove P ⇔ Q, prove P ⇒ Q, the forward direction, and Q ⇒ P, the backward direction. Each needs its own argument. Proving one and leaving out the other leaves the claim unproved, and the missing direction is often the one that fails.

Each direction can be proved in whatever way works: directly, or by proving its contrapositive.

n is even if and only if n² is even

Forward: if n is even, then n² is even. Write n = 2k, where k is a whole number. Then n² = 4k² = 2(2k²), which is 2 times a whole number, so n² is even. One line of algebra settles this direction.

Backward: if n² is even, then n is even. Knowing that n² is even says nothing directly about n, so there is little to work with. Prove the contrapositive instead: if n is odd, then n² is odd. Write n = 2k + 1. Then n² = 4k² + 4k + 1 = 2(2k² + 2k) + 1, which is one more than an even number, so it is odd. The contrapositive is equivalent to the backward direction, so that direction is proved.

Both directions hold, so n is even if and only if n² is even.

When one direction fails

"n is a multiple of 4 if and only if n is even" is false. Its forward direction, if n is a multiple of 4 then n is even, is true. Its backward direction, if n is even then n is a multiple of 4, fails at n = 6, which is even and not a multiple of 4. One false direction makes the whole statement false, so the single number 6 settles it.

Numbers that satisfy both sides, such as 4 and 8, agree with the claim and cannot settle it.

Utop twopromotedABCD

The four teams of the league below, by initial: A finished first and was promoted, B second and not promoted, C third and promoted, D fourth and not promoted. "Promoted if and only if in the top two" needs both outer parts of the circles to be empty. B breaks "if a team is in the top two, it is promoted", and C breaks "if a team is promoted, it was in the top two".

The usual mistakes

Proving one direction. Showing that every even n has an even square proves only the forward half of "n is even if and only if n² is even".

Testing with numbers that satisfy both sides. 4 and 8 are multiples of 4 and are even, so they cannot show that the backward direction fails; 6 can.

Reading "P if and only if Q" as a claim that P and Q are true. It claims only that they are true together or false together.

Promotion from a league

In the application below, a league promotes a team if and only if it finishes in the top two. One team breaks each direction of the rule, and when the rule is cut down to a single "if", only one of them still breaks it.

Worked example: Promotion from a League If and Only If a Team Finishes in the Top Two

Question A football league's rule says: "A team is promoted if and only if it finishes in the top two." At the end of the season Ashford finishes in position 1 and is promoted. Brampton finishes in position 2 and is not promoted, because its stadium fails an inspection. Carlton finishes in position 3 and is promoted after a playoff. Dunmore finishes in position 4 and is not promoted. (a) Write the rule as two conditional statements, and say which team's result breaks each one. (b) The next season the rule is changed to "A team is promoted if it finishes in the top two." If the same four results happened again, which of them would break the new rule?

  1. 1.Let P be "the team is promoted" and Q be "the team finishes in the top two". "P if Q" is the conditional: if a team finishes in the top two, it is promoted. "P only if Q" is the conditional: if a team is promoted, it finished in the top two.

    If: top two, then promotedOnly if: promoted, then top twoPlaceTeamPromotedBreaks1Ashfordyes2Bramptonno3Carltonyes4Dunmoreno
    If: top two, then promotedOnly if: promoted, then top twoPlaceTeamPromotedBreaks1Ashfordyes2Bramptonno3Carltonyes4Dunmoreno
    "If" is one conditional, and "only if" is the other, running the other way.
  2. 2.Ashford finished in the top two and was promoted, so both parts of each conditional are true for Ashford. Dunmore was outside the top two and was not promoted, so the hypothesis of each conditional is false and neither makes a claim about Dunmore.

    If: top two, then promotedOnly if: promoted, then top twoPlaceTeamPromotedBreaks1Ashfordyesnone2Bramptonno3Carltonyes4Dunmorenonone
    If: top two, then promotedOnly if: promoted, then top twoPlaceTeamPromotedBreaks1Ashfordyesnone2Bramptonno3Carltonyes4Dunmorenonone
    Ashford keeps both. Neither conditional makes a claim about Dunmore.
  3. 3.Brampton finished in the top two and was not promoted: the hypothesis of the first conditional is true and its conclusion false, so Brampton breaks it. Carlton was promoted from position 3: the hypothesis of the second is true and its conclusion false, so Carlton breaks it.

    If: top two, then promotedOnly if: promoted, then top twoPlaceTeamPromotedBreaks1Ashfordyesnone2Bramptonnoif3Carltonyesonly if4Dunmorenonone
    If: top two, then promotedOnly if: promoted, then top twoPlaceTeamPromotedBreaks1Ashfordyesnone2Bramptonnoif3Carltonyesonly if4Dunmorenonone
    Brampton breaks the "if" part, and Carlton breaks the "only if" part.
  4. 4.(a) "If a team finishes in the top two, it is promoted" is broken by Brampton. "If a team is promoted, it finished in the top two" is broken by Carlton.

    If: top two, then promotedOnly if: promoted, then top twoPlaceTeamPromotedBreaks1Ashfordyesnone2Bramptonnoif3Carltonyesonly if4Dunmorenonone
    If: top two, then promotedOnly if: promoted, then top twoPlaceTeamPromotedBreaks1Ashfordyesnone2Bramptonnoif3Carltonyesonly if4Dunmorenonone
    (a) Brampton breaks the first conditional, and Carlton breaks the second.
  5. 5.(b) The new rule keeps only the first conditional. Brampton still breaks it. For Carlton the hypothesis "finishes in the top two" is false, so the new rule makes no claim about Carlton. Only Brampton's result breaks the new rule.

    If: top two, then promotedOnly if: promoted, then top twoPlaceTeamPromotedBreaks1Ashfordyesnone2Bramptonnoif3Carltonyesonly if4DunmorenononeNew rule, the "if" part only: broken by Brampton
    If: top two, then promotedOnly if: promoted, then top twoPlaceTeamPromotedBreaks1Ashfordyesnone2Bramptonnoif3Carltonyesonly if4DunmorenononeNew rule, the "if" part only: broken byBrampton
    (b) Only the first conditional is left, and only Brampton breaks it.

Answer: (a) "If a team finishes in the top two, it is promoted", broken by Brampton (position 2, not promoted); "if a team is promoted, it finished in the top two", broken by Carlton (position 3, promoted). (b) Only Brampton's result: 1 of the four.

Common mistakes

  • Saying Carlton's promotion keeps the rule because the rule only promises promotion to the top two. "Only if" is the half that forbids promotion from outside the top two, and Carlton breaks it.
  • Saying the new rule is also broken by Carlton. The one-way rule says what happens to teams in the top two and nothing about a team in position 3, and a conditional whose hypothesis is false cannot be broken.

More mathematical statements problems, worked step by step →

Practice If and Only If in the app