Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools

How to Prove Two Formulas Are Equivalent with a Truth Table

Two formulas are logically equivalent when they have the same value in every row. Put both on one truth table with the same letters and the same row order, then compare the two final columns.

Recognize the task

The question asks "show that A≡BA \equiv B", "are these logically equivalent", or "does this rewrite keep the meaning": ¬(P∧Q)\neg(P \land Q) and ¬P∨¬Q\neg P \lor \neg Q, P→QP \to Q and ¬Q→¬P\neg Q \to \neg P, (P→Q)→R(P \to Q) \to R and P→(Q→R)P \to (Q \to R). Test: at most three letters in total; with more, prefer proving it with the laws.
Logical equivalence is defined in the equivalences lesson and tied to the biconditional in biconditionals and logical equivalence.

Two ways to do it

Compare the two columnsusual
A≡B  ⟺  A and B agree in every rowA \equiv B \iff A \text{ and } B \text{ agree in every row}
Tabulate both formulas side by side and compare them row by row.
Test the biconditionalone column
A≡B  ⟺  A↔B is a tautologyA \equiv B \iff A \leftrightarrow B \text{ is a tautology}
Build one column for A↔BA \leftrightarrow B and use checking for a tautology.

Steps

StepOn ¬(P∧Q)\neg(P \land Q) and ¬P∨¬Q\neg P \lor \neg Q
1Collect the letters of both formulas. Use every letter that appears in either formula, even if one side lacks it. That fixes nn and the 2n2^n rows.PP and QQ: 4 rows
2Tabulate the first formula. Fill its columns as in building a truth table.P∧QP \land Q: T, F, F, F; ¬(P∧Q)\neg(P \land Q): F, T, T, T
3Tabulate the second formula in the same rows. Keep the same row order, or the comparison means nothing.¬P\neg P: F, F, T, T; ¬Q\neg Q: F, T, F, T; ¬P∨¬Q\neg P \lor \neg Q: F, T, T, T
4Compare the final columns. Same value in every row: equivalent. One row that differs: not equivalent, and that row is the counterexample. Here the match is De Morgan's law.F, T, T, T both times: equivalent

Worked examples

Example 1 · the contrapositive

equivalent
P→QP \to Q: T, F, T, T
F only at P=TP = T, Q=FQ = F
¬Q→¬P\neg Q \to \neg P: T, F, T, T
F only at Q=FQ = F, P=TP = T
P→Q≡¬Q→¬PP \to Q \equiv \neg Q \to \neg P
the columns match

Example 2 · the converse

not equivalent
P→QP \to Q: T, F, T, T
F only at P=TP = T, Q=FQ = F
Q→PQ \to P: T, T, F, T
F only at Q=TQ = T, P=FP = F
not equivalent: rows (T,F)(T, F) and (F,T)(F, T) differ
one differing row is enough

Example 3 · grouping of arrows

3 letters
(P→Q)→R(P \to Q) \to R: T, F, T, T, T, F, T, F
P→QP \to Q is F only in rows 3, 4
P→(Q→R)P \to (Q \to R): T, F, T, T, T, T, T, T
T in every row with P=FP = F
not equivalent: row P=FP = F, Q=TQ = T, R=FR = F
F against T there
Check any pair in the equivalence validator, which compares the two columns for you.

See it happen

Each formula picks out the set of rows where it is true. Two formulas are equivalent when they pick out exactly the same set. That is why the comparison must cover every row: the sets could agree on most rows and still differ on one. In the Venn diagram and truth table tool the rows become regions, and equivalent formulas shade the same regions.

Common mistakes

Checking only the easy rows

✗ at P=Q=TP = Q = T and P=Q=FP = Q = F both P→QP \to Q and Q→PQ \to P are T, so they are equivalent
✓ the rows (T,F)(T, F) and (F,T)(F, T) differ, so they are not equivalent

Giving each side its own letters

✗ P∧(Q∨¬Q)P \land (Q \lor \neg Q) gets 4 rows, PP gets 2, and the rows are matched by position
✓ give both sides the 4 rows of PP and QQ: T, T, F, F twice, so they are equivalent

Taking a one-way implication for an equivalence

✗ P→(P∨Q)P \to (P \lor Q) is a tautology, so P≡P∨QP \equiv P \lor Q
✓ the columns T, T, F, F and T, T, T, F differ at P=FP = F, Q=TQ = T