Skip to main content
Logo image

Math in Society, 2nd Edition: Tools for decision making

Section 1.7 Truth Tables

Note: This section covers truth tables as an extension of Logic in Everyday Life. You may need to read that section first if you haven’t already.
Figure 1.7.1. Alternative Video Lesson

Subsection 1.7.1 Basic Truth Tables

In logic we can use a truth table to analyze a complex statement by summarizing all the possibilities and their truth values (true or false). To do this, we break the statement down to its smallest elements, the propositions. Then we can see the outcome of the complex statement for all possible combinations of true and false for the propositions.
For example, let’s work with two propositions:
  • R: You paid your rent this month.
  • E: You paid your electric bill this month.
We will use these two propositions to demonstrate the truth tables for not, and, and or.
To set up a truth table, we list all the possible truth value combinations in a systematic way. The standard way of doing this is to make the first column half true, then half false, then cut the pattern in half with each succeeding column. For two propositions, the first two columns are shown to the right.
R E R and E
T T
T F
F T
F F
The four possible combinations are
  • Row 1: You have paid your rent and electric bill
  • Row 2: You have paid your rent but not your electric bill
  • Row 3: You have not paid your rent but you have paid your electric bill
  • Row 4: You haven’t paid either your rent or electric bill (yet).
Once we fill in the starting columns, we add additional columns for the more complex statements. We can add as many columns as needed. Below are the basic truth tables for not, and, and or.

Basic Truth Tables.

Not: In the not R column, the truth value is the opposite of the value for R. For example, if R is true (you paid your rent) then not R (you did not pay your rent) is false.
R not R
T F
F T
And: In the R and E column, you must have paid both your rent and electric bill. Otherwise R and E is false.
R E R and E
T T T
T F F
F T F
F F F
Or: In the R or E column, you must have paid either your rent or electric bill, or both (inclusive or). Otherwise R or E is false.
R E R or E
T T T
T F T
F T T
F F F

Subsection 1.7.2 Conditional Truth Tables

To understand the truth table values for a conditional statement it is really helpful to look at it in context. We used this example in Logic in Everyday Life, and we’ll summarize it again here. Let’s say a friend tells you, “If you post that photo to social media, you’ll lose your job.” Under what conditions can you say that your friend was wrong?
There are four possible outcomes:
  1. You post the photo and lose your job
  2. You post the photo and don’t lose your job
  3. You don’t post the photo and lose your job
  4. You don’t post the photo and don’t lose your job
The only case where you can say your friend was wrong is the second case, in which you post the photo but still keep your job.
Your friend didn’t say anything about what would happen if you didn’t post the photo, so you can’t say the last two statements are wrong. Even if you didn’t post the photo and lost your job anyway, your friend never said that you were guaranteed to keep your job if you didn’t post it.
The four cases above correspond to the four rows of the truth table. For this truth table we will use P for “posting the photo,” and L for “losing your job.”
If, then: In the If P, then L column, the only outcome that is false is if you post the photo and don’t lose your job. Otherwise If P, then L is true.
P L If P, then L
T T T
T F F
F T T
F F T
If the hypothesis (the “if” part) is false, we cannot say that the statement is a lie, so the result of the third and fourth rows is true. Notice that we are using a double negation in this explanation.
We are using the words and, or, not and if then in this book, but if you look up other resources on truth tables you are likely to see these symbols.

Symbols used in other resources.

\(A \text{ and } B\) is written \(A \land B\)
\(A \text{ or } B\) is written \(A \lor B\)
\(\text{not } A\) may be written as ~\(A\) or \(\lnot A\)
\(\text{If } A\text{, then } B\) is written \(A\rightarrow B\)

Subsection 1.7.3 Truth Tables for Complex Statements

Truth tables really become useful when we analyze more complex statements. In this case we will have several columns. It helps to work from the inside out and create a column in the table for each intermediate statement.

Example 1.7.2.

Create a truth table for the statement A or not B
Solution.
When we create the truth table, we start with columns for the propositions, A and B. Then we add a column for not B because that is part of the final statement. Our last column is the final statement A or not B.
A B not B A or not B
T T
T F
F T
F F
To complete the third column, not B, we take the opposite of the B column. Then to complete the fourth column, we only look at the A and the not B columns and compare them using or.
A B not B A or not B
T T F T
T F T T
F T F F
F F T T

Subsection 1.7.4 Truth Tables with Three Propositions

To create a truth table with three propositions we need eight rows for all the possible combinations. We will first determine the columns we need to get to our final statement. Then we will fill in the first three columns using the same methodology as before. Start with half true, half false, then cut the pattern in half each time.

Example 1.7.3.

Create a truth table for the statement A and not (B or C)
Solution.
First let’s figure out the columns we will need. We have A, B, C, then we need the statement in the parentheses, (B or C). Then we need the negation of that column, not (B or C). Then we conclude with our final statement, A and not (B or C).
Here is the initial table:
A B C B or C not (B or C) A and not (B or C)
T T T
T T F
T F T
T F F
F T T
F T F
F F T
F F F
Now we complete the columns one at a time. We use the B column and C column to complete B or C,. Then not (B or C) is the opposite of that column. For the final column we only need to look at the first and fifth columns, shaded in blue, with and. Here is the completed table.
A B C B or C not (B or C) A and not (B or C)
T T T T F F
T T F T F F
T F T T F F
T F F F T T
F T T T F F
F T F T F F
F F T T F F
F F F F T F
For this statement A must be true and neither B or C can be true, so it is only true in the fourth row. For an example of this statement, let’s define these propositions in the context of professional baseball:
Let A = Anaheim wins, B = Baltimore wins, C = Cleveland wins.
Suppose that Anaheim will make the playoffs if: (1) Anaheim wins, and (2) neither Baltimore nor Cleveland wins. TFF is the only scenario in which Anaheim will make the playoffs.

Example 1.7.4.

Construct a truth table for the statement if m and not p, then r.
Solution.
First, it may help to add parentheses to help you clarify the order. Our statement could also be written, if (m and not p), then r. To build this table, we will build the statement in parentheses and then repeat the r column after it. It’s easier to read the conditional statement from left to right. Here are the columns for the table:
m p r not p m and not p r If (m and not p), then r
T T T
T T F
T F T
T F F
F T T
F T F
F F T
F F F
For the fourth column, we take the opposite of p. Then we use the first and fourth columns to complete m and not p. With the r column repeated we can use columns five and six to complete our conditional statement. Here is the completed table:
m p r not p m and not p r If (m and not p), then r
T T T F F T T
T T F F F F T
T F T T T T T
T F F T T F F
F T T F F T T
F T F F F F T
F F T T F T T
F F F T F F T
When m is true, p is false, and r is false—the fourth row of the table—then the hypothesis m and not p will be true, but the conclusion is false, resulting in an invalid conditional statement; every other case gives a true result.
If you want a real-life situation that could be modeled by if m and not p, then r, consider this:
Let m = we order meatballs, p = we order pasta, and r = Ruba is happy.
The statement if m and not p, then r is, “if we order meatballs and don’t order pasta, then Ruba is happy”. If m is true (we order meatballs), p is false (we don’t order pasta), and r is false (Ruba is not happy), then the statement is false, because we satisfied the premise, but Ruba did not satisfy the conclusion.

Exercises 1.7.5 Exercises

1.

Translate each statement from symbolic notation into English sentences. Let A represent “Elvis is alive” and let K represent “Elvis is the King”.
  1. Not A
  2. A or K
  3. Not A and K
  4. If K, then not A

2.

Translate each statement from symbolic notation into English sentences. Let A represent “It rains in Oregon” and let B represent “I own an umbrella”.
  1. Not B
  2. A and not B
  3. If A, then B
  4. If not B, then A

3.

Translate each statement from English sentences into symbolic notation. Let A represent “I will protest” and let B represent “There is injustice.”
  1. There is injustice and I will protest.
  2. If there is injustice, then I will protest.
  3. I will protest if there is injustice.
  4. If there is not injustice, then I will not protest.

4.

Translate each statement from English sentences into symbolic notation. Let A represent “It’s time to eat” and let B represent “I am hungry.”
  1. It’s time to eat and I’m not hungry.
  2. It’s not time to eat.
  3. If it’s time to eat, then I’m hungry.
  4. If I’m not hungry then it’s not time to eat.

Exercise Group.

Complete the truth table for each statement and write the meaning of each statement in the third column.
5.
Let A be: I live in Oregon.
Let B be: I go to Portland Community College
A B A and B
T
T
F
F
6.
Let A be: I am a psychology major
Let B be: I’m planning to transfer to Portland State
A B A or B
T
T
F
F

Exercise Group.

Complete the truth table for each statement.
7.
A and not B
A B Not B A and not B
T
T
F
F
8.
Not (not A or B)
A B Not A Not A or B Not (not A or B)
T
T
F
F
9.
Not (A and B and C)
A B C A and B and C Not (A and B and C)
T
T
T
T
F
F
F
F
10.
Not A or (not B and C)
A B C Not A Not B Not B and C Not A or (Not B and C)
T
T
T
T
F
F
F
F

Exercise Group.

Create a complete truth table for each statement.
11.
Not(A and B) or C
12.
(A or B) and (A or C)
13.
If (A and B), then C
14.
If (A or B), then not C
15.
If (A and C), then not A
16.
If (B or C), then (A and B)