We've updated our
Privacy Policy effective December 15. Please read our updated Privacy Policy and tap

学習ガイド > Mathematics for the Liberal Arts

Truth Tables

Learning Outcomes

  • Combine sets using Boolean logic, using proper notations
  • Use statements and conditionals to write and interpret expressions
  • Use a truth table to interpret complex statements or conditionals
  • Write truth tables given a logical implication, and it’s related statements – converse, inverse, and contrapositive
  • Determine whether two statements are logically equivalent
  • Use DeMorgan’s laws to define logical equivalences of a statement
Because complex Boolean statements can get tricky to think about, we can create a truth table to break the complex statement into simple statements, and determine whether they are true or false. A table will help keep track of all the truth values of the simple statements that make up a complex statement, leading to an analysis of the full statement.

Truth Table

A table showing what the resulting truth value of a complex statement is for all the possible truth values for the simple statements.

Example

Suppose you’re picking out a new couch, and your significant other says “get a sectional or something with a chaise.” Construct a truth table that describes the elements of the conditions of this statement and whether the conditions are met.

Answer: This is a complex statement made of two simpler conditions: “is a sectional,” and “has a chaise.” For simplicity, let’s use S to designate “is a sectional,” and C to designate “has a chaise.” The condition S is true if the couch is a sectional. A truth table for this would look like this:

S C S or C
T T T
T F T
F T T
F F F
In the table, T is used for true, and F for false. In the first row, if S is true and C is also true, then the complex statement “S or C” is true. This would be a sectional that also has a chaise, which meets our desire. Remember also that or in logic is not exclusive; if the couch has both features, it does meet the condition.

Some symbols that are commonly used for and, or, and not make using a truth table easier.

Symbols

The symbol [latex]\wedge[/latex] is used for and: A and B is notated [latex]A\wedge{B}[/latex]. The symbol [latex]\vee[/latex] is used for or: A or B is notated [latex]A\vee{B}[/latex] The symbol [latex]\sim[/latex] is used for not: not A is notated [latex]\sim{A}[/latex]
You can remember the first two symbols by relating them to the shapes for the union and intersection. [latex]A\wedge{B}[/latex] would be the elements that exist in both sets, in [latex]A\cap{B}[/latex]. Likewise, [latex]A\vee{B}[/latex] would be the elements that exist in either set, in [latex]A\cup{B}[/latex]. In the previous example, the truth table was really just summarizing what we already know about how the or statement work. The truth tables for the basic and, or, and not statements are shown below.

Basic Truth Tables

A B [latex]A\wedge{B}[/latex]
T T T
T F F
F T F
F F F
A B [latex]A\vee{B}[/latex]
T T T
T F T
F T T
F F F
A [latex]\sim{A}[/latex]
T F
F T
Truth tables really become useful when analyzing more complex Boolean statements.

Example

Create a truth table for the statement [latex]A\wedge\sim\left(B\vee{C}\right)[/latex]

Answer: It helps to work from the inside out when creating truth tables, and create tables for intermediate operations. We start by listing all the possible truth value combinations for A, B, and C. Notice how the first column contains 4 Ts followed by 4 Fs, the second column contains 2 Ts, 2 Fs, then repeats, and the last column alternates. This pattern ensures that all combinations are considered. Along with those initial values, we’ll list the truth values for the innermost expression, [latex]B\vee{C}[/latex].

A B C BC
T T T T
T T F T
T F T T
T F F F
F T T T
F T F T
F F T T
F F F F
Next we can find the negation of [latex]B\vee{C}[/latex], working off the [latex]B\vee{C}[/latex] column we just created.
A B C [latex]B\vee{C}[/latex] [latex]\sim\left(B\vee{C}\right)[/latex]
T T T T F
T T F T F
T F T T F
T F F F T
F T T T F
F T F T F
F F T T F
F F F F T
Finally, we find the values of A and [latex]\sim\left(B\vee{C}\right)[/latex]
A B C [latex]B\vee{C}[/latex] [latex]\sim\left(B\vee{C}\right)[/latex] [latex]A\wedge\sim\left(B{\vee}C\right)[/latex]
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
It turns out that this complex expression is only true in one case: if A is true, B is false, and C is false.

When we discussed conditions earlier, we discussed the type where we take an action based on the value of the condition. We are now going to talk about a more general version of a conditional, sometimes called an implication.

Implications

Implications are logical conditional sentences stating that a statement p, called the antecedent, implies a consequence q. Implications are commonly written as [latex]p\rightarrow{q}[/latex]
Implications are similar to the conditional statements we looked at earlier; [latex]p\rightarrow{q}[/latex] is typically written as “if p then q,” or “p therefore q.” The difference between implications and conditionals is that conditionals we discussed earlier suggest an action—if the condition is true, then we take some action as a result. Implications are a logical statement that suggest that the consequence must logically follow if the antecedent is true.

Example

The English statement “If it is raining, then there are clouds is the sky” is a logical implication. Is this a valid argument, why or why not?

Answer: It is a valid argument because if the antecedent “it is raining” is true, then the consequence “there are clouds in the sky” must also be true.

Notice that the statement tells us nothing of what to expect if it is not raining. If the antecedent is false, then the implication becomes irrelevant.

Example

A friend tells you that “if you upload that picture to Facebook, you’ll lose your job.” Describe the possible outcomes related to this statement, and determine whether your friend's statement is invalid.

Answer: There are four possible outcomes:

  1. You upload the picture and keep your job.
  2. You upload the picture and lose your job.
  3. You don’t upload the picture and keep your job.
  4. You don’t upload the picture and lose your job.
There is only one possible case where your friend was lying—the first option where you upload the picture and keep your job. In the last two cases, your friend didn’t say anything about what would happen if you didn’t upload the picture, so you can’t conclude their statement is invalid, even if you didn’t upload the picture and still lost your job.

In traditional logic, an implication is considered valid (true) as long as there are no cases in which the antecedent is true and the consequence is false. It is important to keep in mind that symbolic logic cannot capture all the intricacies of the English language.

Truth Values for Implications

p q pq
T T T
T F F
F T T
F F T

Example

Construct a truth table for the statement [latex]\left(m\wedge\sim{p}\right)\rightarrow{r}[/latex]

Answer: We start by constructing a truth table for the antecedent.

m p [latex]\sim{p}[/latex] [latex]m\wedge\sim{p}[/latex]
T T F F
T F T T
F T F F
F F T F
Now we can build the truth table for the implication
m p [latex]\sim{p}[/latex] [latex]m\wedge\sim{p}[/latex] r [latex]\left(m\wedge\sim{p}\right)\rightarrow{r}[/latex]
T T F F T T
T F T T T T
F T F F T T
F F T F T T
T T F F F T
T F T T F F
F T F F F T
F F T F F T
In this case, when m is true, p is false, and r is false, then the antecedent [latex]m\wedge\sim{p}[/latex] will be true but the consequence false, resulting in a invalid implication; every other case gives a valid implication.

For any implication, there are three related statements, the converse, the inverse, and the contrapositive.

Related Statements

The original implication is “if p then q”: [latex]p\rightarrow{q}[/latex] The converse is “if q then p”: [latex]q\rightarrow{p}[/latex] The inverse is “if not p then not q”: [latex]\sim{p}\rightarrow\sim{q}[/latex] The contrapositive is “if not q then not p”: [latex]\sim{q}\rightarrow{p}[/latex]

Example

Consider again the valid implication “If it is raining, then there are clouds in the sky.” Write the related converse, inverse, and contrapositive statements.

Answer: The converse would be “If there are clouds in the sky, it is raining.” This is certainly not always true. The inverse would be “If it is not raining, then there are not clouds in the sky.” Likewise, this is not always true. The contrapositive would be “If there are not clouds in the sky, then it is not raining.” This statement is valid, and is equivalent to the original implication.

Looking at truth tables, we can see that the original conditional and the contrapositive are logically equivalent, and that the converse and inverse are logically equivalent.
Implication Converse Inverse Contrapositive
p q [latex]p\rightarrow{q}[/latex] [latex]q{\rightarrow}p[/latex] [latex]\sim{p}\rightarrow\sim{q}[/latex] [latex]\sim{q}\rightarrow\sim{p}[/latex]
T T T T T T
T F F T T F
F T T F F T
F F T T T T

Equivalence

A conditional statement and its contrapositive are logically equivalent. The converse and inverse of a statement are logically equivalent.

Licenses & Attributions

CC licensed content, Original

CC licensed content, Shared previously

  • Question ID 25472, 25467. Authored by: Shahbazian,Roy. License: CC BY: Attribution. License terms: IMathAS Community License CC-BY + GPL.
  • Question ID 25595, 25597. Authored by: Lippman, David. License: CC BY: Attribution. License terms: IMathAS Community License CC-BY + GPL.