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).
The table
Build it column by column. First P → Q. Then Q → P. Then join them with and.
| P | Q | P → Q | Q → P | P ↔ Q |
|---|---|---|---|---|
| T | T | T | T | T |
| T | F | F | T | F |
| F | T | T | F | F |
| F | F | T | T | T |
P ↔ Q is true when P and Q have the same value: both true or both false. It is false when they differ.
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
- Find a switch at home and the thing it controls. Write P and Q in a key.
- Try every row: switch up or down, light on or off. Which rows could really happen?
- Write the claim with ↔ and say it aloud.
- 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.