Skip to main content

Section 1.2 Conditional Statements

Subsection 1.2.1 What is a Conditional Statement

One of the most important types of statements in mathematics is the conditional statements or, more colloquially, if-then statement. These statements are of the form "if P then Q". We call P the condition and Q the conclusion of the conditional statement, or simply the if-part and then-part. We want to know when these statements are true or false, so let’s explore this now:

Checkpoint 1.2.1.

Your professor tells you "if you get 100 percent on the next midterm then I will give you a dollar". In which of the following four situations is the professor lying to you (remember, we say a statement is false if it is indeed a lie):
  1. You get 100 percent, and your professor does give you a dollar
  2. You get 100 percent, and your professor does not give you a dollar
  3. You do not get 100 percent, and your professor does give you a dollar
  4. You do not get 100 percent, and your professor does not give you a dollar
Solution.
The only situation where your professor is lying to you is in situation 2. Situation 1 is obviously true, and the statement does not really apply to situations 3 and 4 as the if-part isn’t satisfied. We call the statement vacuously true in these two situations.
Of course, there is nothing special about the meaning of the if-part and then-part in the previous example. In general we can say that an if-then statement is false when the if-part is true and the then-part is false, and it is true otherwise. Now we can construct a truth table for "if P then Q":
Truth Table for "if P then Q"
Figure 1.2.2. Truth Table for "if P then Q"

Subsection 1.2.2 Justifying Conditional Statements

In math, we’re more concerned with if-then statements where both the if-part and then-part are open sentences with variables. For example "if \(n\) is an odd integer then \(n^2\) is also odd." In these cases, there’s an assumed universal quantifier before these: "for all integers \(n\) if \(n\) is odd then \(n^2\) is odd." We don’t usually write the quantifier, but it’s there in the background. Since it’s a universally quantified statement, we want it to be true for all inputs into our variables.
Remembering that an if-then statement is only false when the if-part is true and the then-part is false, an if-then statement like the one above is true exactly when there are no inputs that make the if-part true and the then-part false.
To prove an if-then statement is true, we need to show that the "dreaded case", where the if-part is true and the then-part is false, never happens. There are three main ways to do this:
  1. Assume the if-part is true, and show that the then part *must* be true. Thus the "dreaded case" is impossible. This is called a direct proof.
  2. Assume the then-part is false, and show that the if-part *must* be false. Thus the "dreaded case" is impossible.
  3. Assume that there is an input that gives the "dreaded case" (where the if-part is true and the then-part is false) and show that some sort of contradiction arises where mathematics "breaks".
We will mainly focus on direct proofs in this book, though there are a few times where we will see a proof of another type. When we come across those, we will remind everyone of the logic behind those types of proofs.
Figure 1.2.3. Supplementary video: conditional statements

Notes for Additional Understanding.

We will mainly focus on direct proofs, though there will be times when we look at the other two types. We will revisit the logic behind those two types when the need arises.
Let’s look at some examples of direct proofs.

Checkpoint 1.2.4.

Show that the following statements are true using direct proofs:
  1. if \(n\) is an even integer then \(n^2\) is even
  2. if \(a\) and \(b\) are odd integers then \(a+b\) is even
  3. The sum of any six consecutive integers is always odd. (hint: can you reword this as an if-then statement?)
Solution 1.
We need to:
  1. assume that \(n\) is even and
  2. show that \(n^2\) must be even.
So let’s assume that \(n\) is even. This means that \(n=2k\) for some integer \(k\text{.}\) We need to show that \(n^2\) is even, thus \(n^2 = 2( \quad )\) where the expression in the brackets must be an integer. Now that we have our set-up, we can prove this result. Consider \(n^2\text{.}\) By our assumption:
\begin{equation*} n^2=(2k)^2 = (2k)(2k) \end{equation*}
We know how we need the expression to look algebraically ( as \(2( \quad )\)), so we use our creativity to get there:
\begin{equation*} (2k)(2k) = 2(2k^2) \end{equation*}
Since \(2k^2\) is an integer, we are done. We have shown that we can always express \(n^2\) in the form of an even integer, and this is what we wanted to prove.
Solution 2.
We need to:
  1. Assume that \(a\) and \(b\) are odd and
  2. Show that \(a+b\) must be even.
So let’s write our assumption in terms of the algebraic definition of what it means for a number to be odd. So let \(a=2r+1\) and \(b=2s+1\) for some integers \(r,s\text{.}\)
Caution!!
CAUTION!! A very common mistake that students make is to use the same variable for the integers in the two above expressions (e.g. \(a=2r+1\) and \(b=2r+1\) for some integer \(r\)). Note that this would mean that \(a\) and \(b\) would be the same number (depending on the choice of \(r\)). We want \(a\) and \(b\) to be possibly different numbers, so we need two different variables to be able to express this.
We need to show that \(a+b=2( \quad )\) where the bracket is some integer. Now that we have our set-up we can prove the result.
Consider \(a+b\text{.}\) By our assumption,
\begin{equation*} a+b=(2r+1)+(2s+1)\text{.} \end{equation*}
We know how we need the expression to look, so we can use our creativity to get there:
\begin{equation*} (2r+1) +(2s+1) = 2r+2s+2 = 2(r+s+2) \end{equation*}
Since the expression in the brackets is the sum of integers, the bracket simplifies to an integer. So we’ve written \(a+b\) in the form we like and we are done.
Solution 3.
As the hint says, it might be easiest to reword this as an if-then statement first. One way to do this is
If \(a,b,c,d,e,f\) are consecutive integers, then \(a+b+c+d+e+f\) is odd.
Now that we have a conditional statement we need to:
  1. Assume our integers are consecutive and
  2. Show their sum is odd
So let’s write our assumption algebraically: Since the variables are just names for our numbers, let’s let \(a\) be the smallest integer, \(b\) be the next smallest, and so on. Since they’re all consecutive:
\begin{equation*} b = a+1 \end{equation*}
\begin{equation*} c=b+1=(a+1)+1=a+2 \end{equation*}
and similarly
\begin{equation*} d = a+3 \end{equation*}
\begin{equation*} e=a+4 \end{equation*}
and
\begin{equation*} f=a+5. \end{equation*}
Now we need to show that we can always write \(a+b+c+d+e+f = 2( \quad)+1\) where the bracket is some integer. Let’s try to use our creativity to get there:
Consider \(a+b+c+d+e+f\text{.}\) Using our assumption and noting the form we want to get, we can do the following:
\begin{equation*} a+b+c+d+e+f=a+(a+1)+(a+2)+(a+3)+(a+4)+(a+5) = 6a+15 \end{equation*}
We know we want the expression to be of the form \(a+b+c+d+e+f = 2( \quad)+1\) so we can "pull out" a 1, and hopefully what is left will have a common factor of 2 so we can factor it out:
\begin{equation*} 6a+15=(6a+14)+1 = 2(3a+7)+1 \end{equation*}
Since the expression in brackets is integers multiplied and added together, it is an integer, and thus the sum is odd. We have finished our proof.

Subsection 1.2.3 Why Proofs Are Important

A good question that you have probably thought about is "why do we even need to prove results like in the previous section?" and "If I show a few examples is that enough to prove a result?" Let’s explore these ideas:

Example 1.2.5.

Is the conditional statement "if \(n\) is a whole number then \(n^2+n+11\) is a prime number" always true? Remember, a prime number is a number divisible by exactly two numbers, 1 and itself.
Solution.
It is not! However, it may take a while to find a counterexample. If we let \(n=1,2, \dots, 9\) we find that \(n^2+n+11\) is indeed prime. For example, if \(n=6\) then \(6^2+6+11=53\) and you can check that 53 is a prime number. However, when \(n=10\text{,}\) we have that \(10^2+10+11=121\) and \(121=11 \times 11,\) so \(11\) is not a prime number.
The moral of the story here is that just doing a bunch of examples isn’t enough to guarantee a statement is always true. It’s possible that you haven’t found a case where the result doesn’t hold though a case does indeed exist.
Additionally, proofs can give you more information about *why* a result is true. If you study the structure of a proof, in many cases it can give you insight into the precise reasons why a result holds. We’ll explore this idea in many proofs to come!

Subsection 1.2.4 Counterexamples

When we were learning about conditional statements, we discussed when conditional statements were false. Remember, these are false exactly when the if-part true and the then-part is false.

Definition 1.2.6.

We call an object that makes the if-part true and the then-part false a counterexample to the conditional statement.
Whenever we can find a counterexample, we know that the conditional statement is a false one.

Example 1.2.7.

The statement "if \(n\) and \(m\) are odd counting numbers then \(n \times m\) is even" is a false conditional statement since it has the counterexample \(n=3\) and \(m=5\text{.}\) Here, the if-part is true (both 3 and 5 are odd numbers) but the then-part is false (\(3 \times 5 =15\) is not an even number). Note that this is only one of many (in fact infinitely many counterexamples).
The statement "if \(x\) is an integer (positive or negative counting number, or zero) then \(x^2-1\) is non-negative" is a false conditional statement. Here, \(x=0\) is a counterexample since \(x\) is an integer (if-part true) but \(0^2-1=-1\) (then-part false). Note that this is the only counterexample for this conditional statement.
Even though the first example has infinitely many counterexamples and the second only has one, they are still both considered false in the same way, and that way is "not always true". There is no "degree of falseness".

Notes for Additional Understanding.

In the case where a conditional statement is true for some, but not all, elements in the domain of the statement, it’s possible to reword the statement to limit the domain so that it is now true. For example, we can change the second example above to "If \(x\) is a non-zero integer then \(x^2-1\) is non-negative" to make a true conditional statement.

Checkpoint 1.2.8.

Find a counterexample for each of the following false conditional statements:
  1. If \(P\) is a Canadian provincial capital then it is the city that has the largest population in the province.
  2. If \(a,b,c,d,e\) are consecutive counting numbers, then their sum is odd.
  3. If \(P\) is a polygon with four sides then all angles inside \(P\) are less than 180 degrees.
Solution 1.
As of 2022, the counterexamples are Fredericton (Moncton and Saint John are larger), Quebec City (Montreal [among others] is larger), Regina (Saskatoon is larger), Edmonton (Calgary is larger), and British Columbia (Vancouver [among others] is larger).
Solution 2.
There are infinitely many sets of 5 consecutive numbers where the sum is even. In fact, any whose smallest number is even will have an even sum (can you prove this?).
Solution 3.
One such counterexample is a chevron, where there is one internal angle greater than 180 degrees.

Example 1.2.9.

A usual rule in most Canadian provinces is "If you are drinking alcohol then you must be at least 19 years old". Which of the following people may be violating this rule?
  1. A 20 year old
  2. A person drinking a beer
  3. A person drinking water
  4. A 16 year old
Intuitively, most people know that you would need to check the person drinking beer, and the 16 year old. The person drinking a beer may be under 19, and the 16 year old may be drinking alcohol. Let’s analyze this using the idea of a counterexample:
  1. The 20 year old satisfies the condition "then-part true". Since the only time a conditional statement is false is when the "if-part" is true and the "then-part" false, this can never be a counterexample.
  2. The person drinking a beer satisfies the condition "if-part true". If they also satisfy "then-part false" (so they are under 19 years old) then they would be a counterexample to the rule. You would check this person.
  3. The person drinking water satisfies "if-part false". Just like with 1, there is no possibility that they can be a counterexample.
  4. The 16 year old satisfies "then part false". If they are also drinking (the "if-part" true) then they are a counterexample. You would check this person.
Even though this was an easy question when you’re familiar with the context, many people find reasoning like this *very* challenging to do. Try the next exercise using the same technique as the previous example.

Checkpoint 1.2.10.

Each of the following cards have a letter on one side and a number on the other. Here is a rule: β€œif a card has a D on one side, then it has a 3 on the other”. Your task is to select all those cards, but only those cards, which you would have to turn over in order to find out whether the rule is true or false. Which cards would you select? Try your best to explain your reasoning.
Wason Selection Task Cards
Solution.
Just like the previous example, we need to check situations when either:
  1. The "if-part" is true: if the then-part is false we have a counterexample, and
  2. The "then-part" is false: if the if-part is true we have a counterexample.
The cards that satisfy this are the D (the-if part is true) to see if there is a 3 on the other side, and the 9 (the then-part is false) to see if there is not a D on the other side.
Note the A and the 3 can not be counterexamples. There is no way for the if-part to be true and the then-part to be false.

Subsection 1.2.5 The Relationship Between Conditional and Existential Statements

If you think about it, conditional statements with a variable are actually universally quantified statements! There is an implied quantifier hidden in the conditional statement itself. For example, the conditional statement (with the domain of all animals )"if \(c\) is a cat then \(c\) is a mammal" is interpreted to mean "for all animals, if \(c\) is a cat then \(c\) is a mammal".
We can view this as logically equivalent to the statement "all cats are mammals" (again with the domain of all animals), and we can see the link from the Venn diagram of the statement to all true possibilities for the conditional statement:
Note that the three distinct areas in that diagram represent one of the true possibilities of the conditional statement. The area that does *not* appear is the "dreaded row;" when the if-part is true and the then-part is false. This illustrates that there are no counterexamples for conditional statements that are always true.

Checkpoint 1.2.11.

Reword each conditional statement as a universally quantified statement. Then draw a Venn diagram representing each conditional statement as a universally quantified statement, identify each of the regions, and give an example of an element in each region:
  1. If \(x\) is a whole number with a ones-digit of 0 then \(x\) is divisible by 5. (domain: all whole numbers)
  2. If \(\frac{a}{b}\) is a fraction with the numerator \(a=1\) then \(\frac{a}{b}\) cannot be reduced (i.e. is already in least terms as there is no common factor of \(a\) and \(b\)) (domain: all fractions with counting number numerators and denominators)
  3. If \(n\) is a number whose English name has four letters, then \(n\) is odd or less than eight. (domain: all counting numbers). Make this diagram with three circles: all numbers with four letter in their name, all numbers less than eight, and all odd numbers.
Solution 1.
Reworded: "All whole numbers with a ones-digit of 0 are divisible by 5"
Regions:
  1. Numbers with 0 as the ones digit and divisible by 5: if-part true and then-part true (ex 10)
  2. Numbers with a digit other than 0 as the ones digit and divisible by 5: if-part false and then-part true (ex 35)
  3. Numbers with a digit other than 0 as the ones digit and not divisible by 5: if-part false and then-part false (ex 27)
Solution 2.
Reworded: All fractions \(\frac{a}{b}\) with the numerator \(a=1\) cannot be reduced.
Diagram:
Regions:
  1. Fractions of the form \(\frac{1}{b}\) in lowest terms: if-part true and then-part true (ex \(\frac{1}{8}\))
  2. Fractions not of the form \(\frac{1}{b}\) in lowest terms: if-part false and then-part true (ex \(\frac{3}{5}\))
  3. Fractions not of the form \(\frac{1}{b}\) and not in lowest terms: if-part false and then-part false (ex \(\frac{4}{8}\))
Solution 3.
Reworded: All numbers with English names consisting of four letters is odd or less than eight.
Diagram (this one is a little more complicated!):
Note that the three main regions can be broken down into subregions:
  1. Numbers with English names consisting of four letters that are odd or less than eight: if-part true and then-part true
    1. odd and not less than eight (ex 9)
    2. not odd and less than eight (ex 4)
    3. both odd and less than eight (ex 5)
  2. Numbers with English names not consisting of four letters that are odd or less than eight: if-part false and then-part true
    1. odd and not less than eight (ex 11)
    2. not odd and less than eight (ex 6)
    3. both odd and less than eight (ex 3)
  3. Numbers with English names not consisting of four letters that are not odd and not less than eight: if-part false and then-part false (ex: 12)

Subsection 1.2.6 Other Forms of Conditional Statements

There are some important related statements to a conditional statement "if P then Q" (for example, if I walk to work then I wear a jacket ). These are the converse where we flip the order of P and Q: if Q then P (if I wear a jacket then I walk to work). The inverse is when we negate both P and Q: if (not P) then (not Q) (if I do not walk to work then I do not wear a jacket). The contrapositive is where we both reverse the order and negate both parts: if (not Q) then (not P): (if I do not wear a jacket then I do not walk to work).
Let’s formalize these as a definition:

Definition 1.2.12.

Let S="if P then Q" be a conditional statement for some P and Q. Then the conditional statement "if Q then P is the converse" of S, the conditional statement "if (not P) then (not Q)" is the inverse of S, and the conditional statement "if (not Q) then (not P)" is the contrapositive of S.
We can show that the contrapositive is logically equivalent to the original statement. Let’s do it using a truth table:
You can see that no matter what the truth values for P and Q, the truth value of the original statement "if P then Q" and the contrapositive statement "If (not Q) then (not P)" agree. So, if we want, we can reword a conditional statement to its contrapositive.
Also, note that the contrapositive of the contrapositive is the original statement; the statements get negated again to bring them back to their original truth values, and the if-part and then-part get swapped back as well.

Checkpoint 1.2.13.

Show that the converse and inverse of a conditional statement are logically equivalent.
Solution.
You can see that no matter what the truth values for P and Q, the truth value of the converse statement "if Q then P" and the inverse statement "If (not P) then (not Q)" agree.

Example 1.2.14.

Write the converse, inverse, and contrapositive of the following statements. Determine the truth value of each conditional statement:
  1. If T is a polygon with three sides, then T is a triangle.
  2. If L is a whole number with a ones-digit of 2 or 4, then L is even.
Solution 1.
Original: If T is a polygon with three sides, then T is a triangle. (T)
Converse: If T is a triangle then it is a polygon with three sides (T)
Inverse: If T is a polygon with more than three sides then T is not a triangle (T)
Contrapositive: If T is not a triangle then T is a polygon with more than three sides (T)
Solution 2.
Note that the if-part of this statement is a compound, so we have to be careful negating it. If we let A = "have a ones digit of 2" and B = "have a ones digit of 4", we can either say "has a ones digit other than 2 or 4" [not (A or B)] or we can say "does not have a ones digit of 2 and does not have a ones digit of 4" [(not A) and (not B)]. We will use the first, but the second is equally correct.
  1. Original: If L a whole number with a ones-digit of 2 or 4, then L is even. (T)
  2. Converse: If L is an even whole number then its ones-digit is 2 or 4 (F; counterexample 12)
  3. Inverse: If L is an whole number with a ones-digit other than 2 or 4 then it is odd. (F; counterexample 12)
  4. Contrapositive: If L is an odd whole number, then its ones digit is something other than 2 or 4. (T)

Subsection 1.2.7 Biconditional Sentences

Look at the previous examples in ExampleΒ 1.2.14. Notice in the first example, the original statement and its converse were true (and, it follows that the inverse and contrapositive are true too!). However, in the second, only the original statement was true. Let’s view these as Venn diagrams:
In the second example, we know there are numbers with ones-digit that aren’t 2 or 4 that are still even, so we can think of numbers that do have a ones-digit of 2 or 4 as only a part (later we’ll call it a subset) of the even numbers. For example, 10 is a counterexample to "If Q then P" for this example.
Looking at the first example, we want both Venn diagrams to be true. The only way for this to be possible is if both circles are actually the same circle! That’s because the two ideas of polygons with three sides and triangles are really the same thing.
Biconditional Venn Diagram for Triangles and Three Sided Polygons
These situations are very special, and we can think of one part as just a "rewording" of the idea of the other part. Formally, we call statements where both the original statement and its converse are true biconditional statements and we write it as "P if and only if Q", which means "(if P then Q) *and* (if Q then P)".
Let’s look a a truth table of the biconditional statement:
Here you can see that the biconditional statement is true exactly when its truth values match. So it can never be the case that one of P or Q is true and the other false. This idea will inform how we go about proving biconditional statements.

Checkpoint 1.2.15.

Which of the following statements can be expressed as true biconditional statements? If so, reword the conditional as a biconditional, and if not, give a counterexample to show why not.
  1. If \(n\) is an even whole number then \(n^2\) is also an even whole number.
  2. (Let \(a,b\) be integers). If both \(a\) and \(b\) are positive, then \(a+b\) is positive.
Solution 1.
This can be a true biconditional statement. We can say: a whole number \(n\) is even if and only if \(n^2\) is even.
Solution 2.
This can not be a true biconditional statement. The converse "if \(a+b\) is positive then \(a\) and \(b\) are positive" has counterexamples. One is when \(a=3\) and \(b=-1\text{.}\)
When we want to prove the biconditional statement "P if and only if Q", we do it in two proofs: first, we prove "if P then Q"; second, we prove "if Q then P". Note that sometimes it’s easier to use a logically equivalent form to prove a results (e.g. you can prove the inverse instead of the converse since they are logically equivalent).

Example 1.2.16.

Prove " a whole number \(n\) is even if and only if \(n^2\) is even."
Solution.
Let’s do "if \(n\) is even then \(n^2\) is even" first. Then we’ll find that it’s easier to prove the inverse statement "if \(n\) is odd then \(n^2\) is odd" than the converse.
  1. Let \(n\) be even. Then \(n=2k\) for some whole number \(k\text{.}\) We want to show that \(n^2 = 2(\text{integer})\) which would show that it is always even when \(n\) is even. Consider
    \begin{equation*} n^2 = (2k)^2 = 4k^2 = 2(2k^2). \end{equation*}
    Since \(2k^2\) is a whole number, we have written \(n^2\) as an even whole number.
  2. Let \(n\) be odd. Then \(n=2k+1\) for some whole number \(k\text{.}\) We want to show that \(n^2 = 2(\text{integer})+1\) which would show that it is always odd when \(n\) is odd. Consider
    \begin{equation*} n^2 = (2k+1)^2 = (2k+1)(2k+1) = 4k^2+4k+1 = 2(2k^2+2k)+1. \end{equation*}
    Since \(2k^2+2k\) is a whole number, we have written \(n^2\) as an odd whole number.
Since we showed that both the original statement and its inverse are true, we have showed the biconditional statement is true.