# 6.2: Truth Tables- Conjunction (and), Disjunction (or), Negation (not)

$$\newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}}$$

$$\newcommand{\id}{\mathrm{id}}$$ $$\newcommand{\Span}{\mathrm{span}}$$

( \newcommand{\kernel}{\mathrm{null}\,}\) $$\newcommand{\range}{\mathrm{range}\,}$$

$$\newcommand{\RealPart}{\mathrm{Re}}$$ $$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$

$$\newcommand{\Argument}{\mathrm{Arg}}$$ $$\newcommand{\norm}[1]{\| #1 \|}$$

$$\newcommand{\inner}[2]{\langle #1, #2 \rangle}$$

$$\newcommand{\Span}{\mathrm{span}}$$

$$\newcommand{\id}{\mathrm{id}}$$

$$\newcommand{\Span}{\mathrm{span}}$$

$$\newcommand{\kernel}{\mathrm{null}\,}$$

$$\newcommand{\range}{\mathrm{range}\,}$$

$$\newcommand{\RealPart}{\mathrm{Re}}$$

$$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$

$$\newcommand{\Argument}{\mathrm{Arg}}$$

$$\newcommand{\norm}[1]{\| #1 \|}$$

$$\newcommand{\inner}[2]{\langle #1, #2 \rangle}$$

$$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\AA}{\unicode[.8,0]{x212B}}$$

$$\newcommand{\vectorA}[1]{\vec{#1}} % arrow$$

$$\newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow$$

$$\newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vectorC}[1]{\textbf{#1}}$$

$$\newcommand{\vectorD}[1]{\overrightarrow{#1}}$$

$$\newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}}$$

$$\newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}}$$

$$\newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}}$$

$$\newcommand{\avec}{\mathbf a}$$ $$\newcommand{\bvec}{\mathbf b}$$ $$\newcommand{\cvec}{\mathbf c}$$ $$\newcommand{\dvec}{\mathbf d}$$ $$\newcommand{\dtil}{\widetilde{\mathbf d}}$$ $$\newcommand{\evec}{\mathbf e}$$ $$\newcommand{\fvec}{\mathbf f}$$ $$\newcommand{\nvec}{\mathbf n}$$ $$\newcommand{\pvec}{\mathbf p}$$ $$\newcommand{\qvec}{\mathbf q}$$ $$\newcommand{\svec}{\mathbf s}$$ $$\newcommand{\tvec}{\mathbf t}$$ $$\newcommand{\uvec}{\mathbf u}$$ $$\newcommand{\vvec}{\mathbf v}$$ $$\newcommand{\wvec}{\mathbf w}$$ $$\newcommand{\xvec}{\mathbf x}$$ $$\newcommand{\yvec}{\mathbf y}$$ $$\newcommand{\zvec}{\mathbf z}$$ $$\newcommand{\rvec}{\mathbf r}$$ $$\newcommand{\mvec}{\mathbf m}$$ $$\newcommand{\zerovec}{\mathbf 0}$$ $$\newcommand{\onevec}{\mathbf 1}$$ $$\newcommand{\real}{\mathbb R}$$ $$\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}$$ $$\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}$$ $$\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}$$ $$\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}$$ $$\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}$$ $$\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}$$ $$\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}$$ $$\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}$$ $$\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}$$ $$\newcommand{\laspan}[1]{\text{Span}\{#1\}}$$ $$\newcommand{\bcal}{\cal B}$$ $$\newcommand{\ccal}{\cal C}$$ $$\newcommand{\scal}{\cal S}$$ $$\newcommand{\wcal}{\cal W}$$ $$\newcommand{\ecal}{\cal E}$$ $$\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}$$ $$\newcommand{\gray}[1]{\color{gray}{#1}}$$ $$\newcommand{\lgray}[1]{\color{lightgray}{#1}}$$ $$\newcommand{\rank}{\operatorname{rank}}$$ $$\newcommand{\row}{\text{Row}}$$ $$\newcommand{\col}{\text{Col}}$$ $$\renewcommand{\row}{\text{Row}}$$ $$\newcommand{\nul}{\text{Nul}}$$ $$\newcommand{\var}{\text{Var}}$$ $$\newcommand{\corr}{\text{corr}}$$ $$\newcommand{\len}[1]{\left|#1\right|}$$ $$\newcommand{\bbar}{\overline{\bvec}}$$ $$\newcommand{\bhat}{\widehat{\bvec}}$$ $$\newcommand{\bperp}{\bvec^\perp}$$ $$\newcommand{\xhat}{\widehat{\xvec}}$$ $$\newcommand{\vhat}{\widehat{\vvec}}$$ $$\newcommand{\uhat}{\widehat{\uvec}}$$ $$\newcommand{\what}{\widehat{\wvec}}$$ $$\newcommand{\Sighat}{\widehat{\Sigma}}$$ $$\newcommand{\lt}{<}$$ $$\newcommand{\gt}{>}$$ $$\newcommand{\amp}{&}$$ $$\definecolor{fillinmathshade}{gray}{0.9}$$

Because complex statements can get tricky to think about, we can create a truth table to keep track of what truth values for the simple statements make the complex statement true and false.

## 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 1

Suppose you’re picking out a new couch, and your significant other says “get a sectional or something with a chaise”.

This is a complex statement made of two simpler conditions: “is a sectional”, and “has a chaise”. For simplicity, let’s use p to designate “is a sectional”, and q to designate “has a chaise”.

A truth table for this situation would look like this:

$$\begin{array}{|c|c|c|} \hline p & q & p \text { or } q \\ \hline \mathrm{T} & \mathrm{T} & \mathrm{T} \\ \hline \mathrm{T} & \mathrm{F} & \mathrm{T} \\ \hline \mathrm{F} & \mathrm{T} & \mathrm{T} \\ \hline \mathrm{F} & \mathrm{F} & \mathrm{F} \\ \hline \end{array}$$

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

In the previous example about the couch, 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

Negation - Expresses "not" which means the opposite truth value.

$$\begin{array}{|c|c|} \hline p & \sim p \\ \hline \mathrm{T} & \mathrm{F} \\ \hline \mathrm{F} & \mathrm{T} \\ \hline \end{array}$$

Conjunction - Expresses "and" which means both p and q must be true.

$$\begin{array}{|c|c|c|} \hline p & q & p \wedge q \\ \hline \mathrm{T} & \mathrm{T} & \mathrm{T} \\ \hline \mathrm{T} & \mathrm{F} & \mathrm{F} \\ \hline \mathrm{F} & \mathrm{T} & \mathrm{F} \\ \hline \mathrm{F} & \mathrm{F} & \mathrm{F} \\ \hline \end{array}$$

Disjunction - Expresses "or" which means either p or q can be true or both.

$$\begin{array}{|c|c|c|} \hline p & q & p \vee q \\ \hline \mathrm{T} & \mathrm{T} & \mathrm{T} \\ \hline \mathrm{T} & \mathrm{F} & \mathrm{T} \\ \hline \mathrm{F} & \mathrm{T} & \mathrm{T} \\ \hline \mathrm{F} & \mathrm{F} & \mathrm{F} \\ \hline \end{array}$$

Truth tables really become useful when we analyze more complex statements.

## Example 2

Create a truth table for the statement $$p \vee \sim q$$

Solution

When we create the truth table, we need to list all the possible truth value combinations for $$p$$ and $$q$$. Notice how the first column contains 2 Ts followed by $$2 ~\mathrm{Fs}$$, and the second column alternates $$\mathrm{T}, \mathrm{F}, \mathrm{T}$$, F. This pattern ensures that all 4 combinations are considered.

$$\begin{array}{|c|c|} \hline p & q \\ \hline \mathrm{T} & \mathrm{T} \\ \hline \mathrm{T} & \mathrm{F} \\ \hline \mathrm{F} & \mathrm{T} \\ \hline \mathrm{F} & \mathrm{F} \\ \hline \end{array}$$

After creating columns with those initial values, we create a third column for the expression $$\sim q$$. Now we will temporarily ignore the column for $$p$$ and write the truth values for $$\sim q$$

$$\begin{array}{|c|c|c|} \hline p & q & \sim q \\ \hline \mathrm{T} & \mathrm{T} & \mathrm{F} \\ \hline \mathrm{T} & \mathrm{F} & \mathrm{T} \\ \hline \mathrm{F} & \mathrm{T} & \mathrm{F} \\ \hline \mathrm{F} & \mathrm{F} & \mathrm{T} \\ \hline \end{array}$$

Next we can find the truth values of $$p \vee \sim q,$$ using the first and third columns.

$$\begin{array}{|c|c|c|c|} \hline p & q & \sim q & p \vee \sim q \\ \hline \mathrm{T} & \mathrm{T} & \mathrm{F} & \mathrm{T} \\ \hline \mathrm{T} & \mathrm{F} & \mathrm{T} & \mathrm{T} \\ \hline \mathrm{F} & \mathrm{T} & \mathrm{F} & \mathrm{F} \\ \hline \mathrm{F} & \mathrm{F} & \mathrm{T} & \mathrm{T} \\ \hline \end{array}$$

The truth table shows that $$p \vee \sim q$$ is true in three cases and false in one case. If you're wondering what the point of this is, suppose it is the last day of the baseball season and two teams, who are not playing each other, are competing for the final playoff spot. Anaheim will make the playoffs if it wins its game or if Boston does not win its game. (Anaheim owns the tie-breaker; if both teams win, or if both teams lose, then Anaheim gets the playoff spot.) If $$p=$$ Anaheim wins its game and $$q=$$ Boston wins its game, then $$p \vee$$ $$\sim q$$ represents the situation "Anaheim wins its game or Boston does not win its game". The truth table shows us the different scenarios related to Anaheim making the playoffs. In the first row, Anaheim wins its game and Boston wins its game, so it is true that Anaheim makes the playoffs. In the second row, Anaheim wins and Boston does not win, so it is true that Anaheim makes the playoffs. In the third row, Anaheim does not win its game and Boston wins its game, so it is false that Anaheim makes the playoffs. In the fourth row, Anaheim does not win and Boston does not win, so it is true that Anaheim makes the playoffs.

## Try it Now 1

Create a truth table for this statement: $$\sim p \wedge q$$

$$\begin{array}{|c|c|c|c|} \hline p & q & \sim p & \sim p \wedge q \\ \hline \mathrm{T} & \mathrm{T} & \mathrm{F} & \mathrm{F} \\ \hline \mathrm{T} & \mathrm{F} & \mathrm{F} & \mathrm{F} \\ \hline \mathrm{F} & \mathrm{T} & \mathrm{T} & \mathrm{T} \\ \hline \mathrm{F} & \mathrm{F} & \mathrm{T} & \mathrm{F} \\ \hline \end{array}$$

## Example 3

Create a truth table for the statement $$p \wedge \sim(q \vee r)$$

Solution

It helps to work from the inside out when creating a truth table, and to create columns in the table for intermediate operations. We start by listing all the possible truth value combinations for $$p, q,$$ and $$r .$$ Notice how the first column contains 4 Ts followed by $$4 \mathrm{Fs}$$, the second column contains $$2 \mathrm{Ts}, 2 \mathrm{Fs}$$, then repeats, and the last column alternates $$\mathrm{T}, \mathrm{F}, \mathrm{T}, \mathrm{F} \ldots$$ This pattern ensures that all 8 combinations are considered. After creating columns with those initial values, we create a fourth column for the innermost expression, $$q \vee r .$$ Now we will temporarily ignore the column for $$p$$ and focus on $$q$$ and $$r$$, writing the truth values for $$q \vee r$$

$$\begin{array}{|c|c|c|} \hline p & q & r \\ \hline \mathrm{T} & \mathrm{T} & \mathrm{T} \\ \hline \mathrm{T} & \mathrm{T} & \mathrm{F} \\ \hline \mathrm{T} & \mathrm{F} & \mathrm{T} \\ \hline \mathrm{T} & \mathrm{F} & \mathrm{F} \\ \hline \mathrm{F} & \mathrm{T} & \mathrm{T} \\ \hline \mathrm{F} & \mathrm{T} & \mathrm{F} \\ \hline \mathrm{F} & \mathrm{F} & \mathrm{T} \\ \hline \mathrm{F} & \mathrm{F} & \mathrm{F} \\ \hline \end{array}$$

$$\begin{array}{|c|c|c|c|} \hline p & q & r & q \vee r \\ \hline \mathrm{T} & \mathrm{T} & \mathrm{T} & \mathrm{T} \\ \hline \mathrm{T} & \mathrm{T} & \mathrm{F} & \mathrm{T} \\ \hline \mathrm{T} & \mathrm{F} & \mathrm{T} & \mathrm{T} \\ \hline \mathrm{T} & \mathrm{F} & \mathrm{F} & \mathrm{F} \\ \hline \mathrm{F} & \mathrm{T} & \mathrm{T} & \mathrm{T} \\ \hline \mathrm{F} & \mathrm{T} & \mathrm{F} & \mathrm{T} \\ \hline \mathrm{F} & \mathrm{F} & \mathrm{T} & \mathrm{T} \\ \hline \mathrm{F} & \mathrm{F} & \mathrm{F} & \mathrm{F} \\ \hline \end{array}$$

Next we can find the negation of $$q \vee r$$, working off the $$q \vee r$$ Column we just created. (Ignore the first three columns and simply negate the values in the $$q \vee r$$ column.)

$$\begin{array}{|c|c|c|c|c|} \hline p & q & r & q \vee r & \sim(q \vee r) \\ \hline \mathrm{T} & \mathrm{T} & \mathrm{T} & \mathrm{T} & \mathrm{F} \\ \hline \mathrm{T} & \mathrm{T} & \mathrm{F} & \mathrm{T} & \mathrm{F} \\ \hline \mathrm{T} & \mathrm{F} & \mathrm{T} & \mathrm{T} & \mathrm{F} \\ \hline \mathrm{T} & \mathrm{F} & \mathrm{F} & \mathrm{F} & \mathrm{T} \\ \hline \mathrm{F} & \mathrm{T} & \mathrm{T} & \mathrm{T} & \mathrm{F} \\ \hline \mathrm{F} & \mathrm{T} & \mathrm{F} & \mathrm{T} & \mathrm{F} \\ \hline \mathrm{F} & \mathrm{F} & \mathrm{T} & \mathrm{T} & \mathrm{F} \\ \hline \mathrm{F} & \mathrm{F} & \mathrm{F} & \mathrm{F} & \mathrm{T} \\ \hline \end{array}$$

Finally, we find the values of $$p$$ and $$\sim(q \vee r)$$. (Ignore the second, third, and fourth columns.)

$$\begin{array}{|c|c|c|c|c|c|} \hline p & q & r & q \vee r & \sim (q \vee r) & p \wedge \sim (q \vee r \text { ) } \\ \hline \text { T } & \text { T } & \text { T } & \text { T } & \text { F } & \text { F } \\ \hline \text { T } & \text { T } & \text { F } & \text { T } & \text { F } & \text { F } \\ \hline \text { T } & \text { F } & \text { T } & \text { T } & \text { F } & \text { F } \\ \hline \text { T } & \text { F } & \text { F } & \text { F } & \text { T } & \text { T } \\ \hline \text { F } & \text { T } & \text { T } & \text { T } & \text { F } & \text { F } \\ \hline \text { F } & \text { T } & \text { F } & \text { T } & \text { F } & \text { F } \\ \hline \text { F } & \text { F } & \text { T } & \text { T } & \text { F } & \text { F } \\ \hline \text { F } & \text { F } & \text { F } & \text { F } & \text { T } & \text { F } \\ \hline \end{array}$$

It turns out that this complex expression is true in only one case: when $$p$$ is true, $$q$$ is false, and $$r$$ is false. To illustrate this situation, suppose that Anaheim will make the playoffs if: (1) Anaheim wins, and (2) neither Boston nor Cleveland wins. TFF is the only scenario in which Anaheim will make the playoffs.

## Try it Now 2

Create a truth table for this statement: $$(\sim p \wedge q) \vee \sim q$$

$$\begin{array}{|c|c|c|c|c|c|} \hline p & q & \sim p & \sim p \wedge q & \sim q & (\sim p \wedge q) \vee \sim q \\ \hline \mathrm{T} & \mathrm{T} & \mathrm{F} & \mathrm{F} & \mathrm{F} & \mathrm{F} \\ \hline \mathrm{T} & \mathrm{F} & \mathrm{F} & \mathrm{F} & \mathrm{T} & \mathrm{T} \\ \hline \mathrm{F} & \mathrm{T} & \mathrm{T} & \mathrm{T} & \mathrm{F} & \mathrm{T} \\ \hline \mathrm{F} & \mathrm{F} & \mathrm{T} & \mathrm{F} & \mathrm{T} & \mathrm{T} \\ \hline \end{array}$$

You have probably noticed that different truth tables have different numbers of rows, depending on how many variables (or simple statements) that we have. When there is only one simple statement (such as our truth table for negation), we have two rows, one for true and another for false. When we have two simple statements, $$p$$ and $$q$$, there are four rows in the truth table. For Example 3, we had three simple statements, $$p$$, $$q$$ and $$r$$, with eight rows in the truth table. So for each new simple statement, the number of rows doubles. This pattern continues, so we can generalize it as follows.

##### Definition: The Number of Lines in a Truth Table

A statement with $$k$$ variables - or simple statements - will have a truth table with $$2^k$$ rows.

## Logically Equivalent

Two statements are logically equivalent if they have the same simple statements and when their truth tables are computed, the final columns in the tables are identical.

## DeMorgan's Laws

The negation of a conjunction is logically equivalent to the disjunction of the negation of the statements making up the conjunction. To negate an “and” statement, negate each part and change the “and” to “or”.

$$\sim(p \wedge q)$$ is logically equivalent to $$\sim p \vee \sim q$$

The negation of a disjunction is logically equivalent to the conjunction of the negation of the statements making up the disjunction. To negate an “or” statement, negate each part and change the “or” to “and”.

$$\sim(p \vee q)$$ is logically equivalent to $$\sim p \wedge \sim q$$

## Example 4

For Valentine’s Day, you did not get your sweetie flowers or candy: Which of the following statements is logically equivalent?

1. You did not get them flowers or did not get them candy.
2. You did not get them flowers and did not get them candy.
3. You got them flowers or got them candy.

Solution

1. This statement does not go far enough; it leaves open the possibility that you got them one of the two things.
2. This statement is equivalent to the original; $$\sim (f \vee c)$$ is equivalent to $$\sim f \wedge \sim c$$
3. This statement says that you got them something, but we know that you did not.

## Try it Now 3

To serve as the President of the US, a person must have been born in the US, must be at least 35 years old, and must have lived in the US for at least 14 years. What minimum set of conditions would disqualify someone from serving as President?