Knaph

If, by Table11 of 242 min read

If and Only If

A hall light has one switch. When the switch is up, the light is on. When the switch is down, the light is off. The light and the switch always agree. Is there a sign for "always agree"?

Two arrows in one

Key: P = The light is on. Q = The switch is up. The light is on if the switch is up: Q → P. The light is on only if the switch is up: P → Q.

Say both at once and you get the sign ↔. P ↔ Q reads "P if and only if Q". It is a short way to write (P → Q) ∧ (Q → P).

Two hall light panels. In the first the switch is up and the light is on. In the second the switch is down and the light is off. A double arrow joins the letters P and Q.

The table

Build it column by column. First P → Q. Then Q → P. Then join them with and.

PQP → QQ → PP ↔ Q
TTTTT
TFFTF
FTTFF
FFTTT

P ↔ Q is true when P and Q have the same value: both true or both false. It is false when they differ.

A truth table with columns P, Q, P arrow Q, Q arrow P and P double arrow Q. In the last column the first and last rows are circled in amber with a green T. The middle two rows have a red F.

Where we use it

Definitions use if and only if. "A number is even if and only if it divides by 2 with nothing left over." Both arrows hold, so the two sides always match.

Level 2 gave it a longer name: needed and enough. The if part is enough, and the then part is needed, both at once.

Careful

P ↔ Q does not say that P and Q are true. It says they match. If both are false, P ↔ Q is still true.

Try it at home

  1. Find a switch at home and the thing it controls. Write P and Q in a key.
  2. Try every row: switch up or down, light on or off. Which rows could really happen?
  3. Write the claim with ↔ and say it aloud.
  4. Find a word with a strict definition, and say it with "if and only if".

Words to know

  • ↔ - the sign for if and only if: true when both sides have the same value
  • biconditional - the logicians' name for a claim with ↔
  • same value - both true, or both false

Big idea

P ↔ Q is (P → Q) ∧ (Q → P). It is true when P and Q have the same value, and false when they differ.

Test your understanding

Sign in to test your understanding of this lesson and track your progress.