MISSION · Data and probability

Truth Tables

Every possible case in a grid, so nothing can hide

Explorer level
Grades 9-11
Quest time
6 minutes
Mission skill
Building a truth table and using it to test whether two statements are equivalent

LEVEL 1 · EXPLORE

Make the idea move

Change the controls and watch what happens. Follow your curiosity and see what you notice.

Loading the activity…

LEVEL 2 · LEARN

Unlock the explanation

Open the chapters in any order. Try the examples as you go.

The idea in one sentence

A truth table lists every combination of true and false the parts could take, so a claim about all cases can be settled by looking rather than by arguing.

The three basic operators

With one statement \(P\) there are two cases. With two statements there are four, and every table is built on those four rows.

NOT (\(\lnot P\)) flips the value. If \(P\) is true, \(\lnot P\) is false.

AND (\(P \land Q\)) needs both. It is true in one row out of four.

OR (\(P \lor Q\)) needs at least one. It is true in three rows out of four — this is the inclusive “or”, which counts the both-true row as true, unlike everyday English.

\(P\) \(Q\) \(P \land Q\) \(P \lor Q\)
T T T T
T F F T
F T F T
F F F F

The left two columns are always written in that order — it is a systematic count, not a preference, and keeping to it means two tables can be compared row by row.

Three statements need \(2^3 = 8\) rows, four need 16. The number of rows doubles with each new letter.

The conditional is the strange one

“If \(P\) then \(Q\)”, written \(P \to Q\), is false in exactly one row: when \(P\) is true and \(Q\) is false.

\(P\) \(Q\) \(P \to Q\)
T T T
T F F
F T T
F F T

The last two rows surprise everyone. If I say “if it rains, I will take an umbrella” and it does not rain, I have not broken my promise whatever I do with the umbrella. A conditional only makes a claim about what happens when its condition holds; when the condition fails, nothing was promised and the statement stands.

A conditional with a false condition is called vacuously true. “Every unicorn in this room is purple” is true, because there are no unicorns to check.

Testing equivalence

Two statements are logically equivalent when their columns match in every row. This is what truth tables are really for.

Take \(P \to Q\) against its contrapositive \(\lnot Q \to \lnot P\):

\(P\) \(Q\) \(P \to Q\) \(\lnot Q \to \lnot P\)
T T T T
T F F F
F T T T
F F T T

Identical columns, so the two are equivalent — which is the licence for proof by contrapositive, demonstrated rather than asserted.

Try the converse \(Q \to P\) the same way and the columns differ in two rows, which is precisely why assuming the converse is a fallacy.

De Morgan’s laws

Two equivalences worth knowing, both checkable in four rows:

\(\lnot(P \land Q) \equiv \lnot P \lor \lnot Q\) \(\lnot(P \lor Q) \equiv \lnot P \land \lnot Q\)

Negating flips the operator. “Not both” means “at least one is not”; “neither” means “not this and not that”.

In plain terms: the opposite of “it is raining and cold” is not “it is dry and warm” — it is “either it is not raining, or it is not cold”. Getting this wrong is the most common negation error there is, and it matters in set language, in database queries, and in every if statement ever written.

Common mix-ups

  • Reading OR as exclusive. \(P \lor Q\) is true when both are.
  • Expecting \(P \to Q\) to be false when \(P\) is false. It is vacuously true.
  • Missing rows. \(n\) letters need \(2^n\) rows, listed systematically.
  • Negating an AND into an AND. De Morgan flips the operator.
  • Confusing equivalence with implication. Equivalent means the columns match in every row, not just the ones where both are true.

Check yourself

Out of the four rows for \(P\) and \(Q\): in how many is \(P \land Q\) true, in how many is \(P \lor Q\) true, and in how many is \(P \to Q\) false?

AND needs both, so 1 row. OR needs at least one, so 3 rows. And the conditional fails only when \(P\) is true while \(Q\) is false — 1 row.

LEVEL 3 · REFLECT

Add this quest to your trail

When you feel ready, mark this idea as explored. You can always come back and try it again.

EXPLORER STRATEGIES

More ways to see it

Loading shared methods…
Share how you learned it