3.2 Logical connectives and the ‘not’ operator

We can construct new sentences of English by connecting two sentences in various ways. For example, consider the following two sentences.

  • PP:

    ‘I will go to class today.’

  • QQ:

    ‘I will go to class tomorrow.’

We can connect these to make a new sentence in several ways.

  • PP and QQ:

    ‘I will go to class today and I will go to class tomorrow.’

  • PP or QQ:

    ‘I will go to class today or I will go to class tomorrow.’

  • If PP then QQ:

    If I [will] go to class today then I will go to class tomorrow.’

We can also express the negation of a sentence by adding the word ‘not’.

  • not PP:

    ‘I will not go to class today.’

Then we can connect these sentences to construct even more complex ones.

  • not PP and QQ:

    ‘I will not go to class today and I will go to class tomorrow.’

  • PP or not QQ:

    I will go to class today or I will not go to class tomorrow.’

  • If not PP then QQ:

    If I don’t go to class today then I will go to class tomorrow.’

We will now think about what it means for statements constructed like this to be true.

3.2.1 Negation (not)

Let’s introduce new labels for two statements.

  • AA:

    ‘I will go to class today.’

  • BB:

    ‘I will not go to class today.’

When we have two statements related like this, we say that BB is the negation of AA. Also, AA is the negation of BB or, in other words, ‘not(not AA)’ is the same as AA.

Observe that the statement

  • CC:

    ‘I will go to class tomorrow.’

is not the negation of the statement

  • AA:

    ‘I will go to class today.’

The truth of statements AA and CC are independent; they could both be true, both be false, or one could be true and the other false.

Given any statement PP, we label its negation as ‘not PP’. An Euler diagram representing the statements PP and ‘not PP’ is shown in Figure 3.3.

PPnot PP

Figure 3.3: An Euler diagram showing PP and ‘not PP

The area outside the shape labelled PP (but inside the rectangle) represents the statement ‘not PP’. Since we put a dot inside PP to mean than PP is true, placing a dot anywhere outside PP means that ‘not PP’ is true. Hence when PP is false, ‘not PP’ is true and when PP is true, ‘not PP’ is false.

PPnot PP

Figure 3.4: PP is false so ‘not PP’ is true

3.2.2 Conjunction (and)

Given statements PP and QQ, the statement ‘PP and QQ’ is called their conjunction.

For example, given statements

  • AA:

    ‘I will go to class today.’

  • CC:

    ‘I will go to class tomorrow.’

their conjunction is

  • AA and CC:

    ‘I will go to class today and I will go to class tomorrow.’

The Euler diagram representing the statement ‘PP and QQ’ is shown in Figure 3.5.

PPQQPP and QQ

Figure 3.5: Euler diagram showing PP, QQ and ‘PP and QQ

The shaded intersection of PP and QQ represents the statement ‘PP and QQ’. A dot being inside the shape labelled ‘PP and QQ’ means it must be inside PP and inside QQ. In other words, the statement ‘PP and QQ’ is true precisely when PP is true and QQ is true. Otherwise ‘PP and QQ’ is false.

Exercise 3.1.

For each of the following statements, determine and explain whether the statement is true or false.

  1. (a)

    55 is even and 3-3 is even.

  2. (b)

    1616 is even and 1313 is odd.

  3. (c)

    8-8 is odd and 99 is odd.

  • Solution.

    1. (a)

      Since ‘55 is even’ is false , the statement ‘55 is even and 3-3 is even’ is false. Note that ‘3-3 is even’ is also false but this doesn’t matter: we already know that ‘55 is even and 3-3 is even’ is false because ‘55 is even’ is false.

    2. (b)

      Since ‘1616 is even’ is true and ‘1313 is odd’ is true, the statement ‘1616 is even and 1313 is odd’ is true.

    3. (c)

      Since ‘8-8 is odd‘ is false and ‘99 is odd‘ is true, the statement ‘8-8 is odd and 99 is odd’ is false.

3.2.3 Disjunction (or)

Given statements PP and QQ, the statement ‘PP or QQ’ is called their disjunction.

For example, given statements

  • AA:

    ‘I will go to class today.’

  • CC:

    ‘I will go to class tomorrow.’

their disjunction is

  • AA or CC:

    ‘I will go to class today or I will go to class tomorrow.’

You might interpret statement ‘AA or CC’ as meaning I will go to class either today or tomorrow, but not both. It is often the case in English that the word ‘or’ is meant to be interpreted in this exclusive way. In mathematics, a disjunction like ‘AA or CC’ is always inclusive unless stated otherwise. So, in this case, ’AA or CC’ includes the scenario where I will go to class both today and tomorrow.

The Euler diagram representing the statement ‘PP or QQ’ is shown in Figure 3.6.

PPQQPP or QQ
Figure 3.6: Euler diagram showing PP, QQ and ‘PP or QQ

The shaded union of PP and QQ represents the statement ‘PP or QQ’. A dot being inside the shape labelled ‘PP or QQ’ means it must be inside PP or QQ or both. In other words, the statement ‘PP or QQ’ is true when PP is true or QQ is true (or both). Otherwise ‘PP or QQ’ is false.

Exercise 3.2.

For each of the following statements, determine and explain whether the statement is true or false.

  1. (a)

    55 is even or 3-3 is even.

  2. (b)

    1616 is even or 1313 is odd.

  3. (c)

    8-8 is odd or 99 is odd.

  • Solution.

    1. (a)

      Since ‘55 is even’ is false and ‘3-3 is even’ is false, the statement ‘55 is even or 3-3 is even’ is false.

    2. (b)

      Since ‘1616 is even’ is true and ‘1313 is odd’ is true, the statement ‘1616 is even or 1313 is odd’ is true. (Remember that ‘or’ is always inclusive.)

    3. (c)

      Since ‘8-8 is odd‘ is false and ‘99 is odd‘ is true, the statement ‘8-8 is odd or 99 is odd’ is true.

3.2.4 Conditional (If … then …)

Consider the following two statements.

  1. ‘If today is Saturday, then I will not go to class today.’

  2. ‘For any two real numbers xx and yy, if x=yx=y then x2=y2x^{2}=y^{2}.’

These are called conditional statements. In general, given statements PP and QQ, the statement ‘If PP then QQ’ is called a conditional statement.

Note that, in English, there are different ways of expressing the same conditional statement. For example, the following statements mean the same thing.

  1. ‘If today is Saturday, then I will not go to class today.’

  2. ‘I will not go to class today if today is Saturday.’

  3. ‘I will not go to class on Saturdays.’

When making conditional statements, it is conventional to stick to the form ‘If PP then QQ’ rather than ‘QQ if PP22 2 However, see Section 3.2.5 for an example of when the phrasing ‘QQ if PP’ is commonly used. or any other phrasing. This helps to make such statements clear. Mathematicians often write PQP\Rightarrow Q to mean ‘If PP then QQ’. This can also be read as ‘PP implies QQ’.

Warning: do not misuse the ‘\Rightarrow’ symbol. It only ever belongs between two statements. Phrases such as ‘3x+2x5x3x+2x\Rightarrow 5x’, literally ‘if 3x+2x3x+2x then 5x5x’, are meaningless.

The conditional statement ‘If PP then QQ’ asserts that if PP is true then QQ is also true. The Euler diagram representing a conditional statement looks as shown in Figure 3.7.

PPQQ

Figure 3.7: Euler diagram showing ‘If PP then QQ

We can use the diagram to draw the following conclusions.

  • If PP is true then QQ must also be true; if we put a dot inside PP then it is guaranteed to be inside QQ. [Thus the diagram does indeed capture the intended meaning of ‘If PP then QQ’.]

  • If QQ is false then PP must also be false; we cannot put a dot outside QQ but inside PP. [This observation is crucial to the ideas of proving the contrapositive of a statement (Section 4.4) and proof by contradiction (Section 4.5).]

  • Statement PP being false tells us nothing about the truth of QQ; a dot placed outside PP could be either inside or outside QQ.

Given the statement ‘If PP then QQ’, we can say that PP is a sufficient condition for QQ because knowing that PP is true is sufficient to ensure that QQ is true. Similarly, QQ can be said to be a necessary condition for PP because, for PP to be true, it is necessary that QQ is true. We will not use these terms again in this companion, but you should be aware of them in case you see them used elsewhere.

Note that, in this companion, we will not discuss precisely what it means for the entire statement ‘If PP then QQ’ to be true or false. Rather, we are thinking of ‘If PP then QQ’ as expressing a relationship between statements PP and QQ, and discussing what this means about the truth of PP and QQ.33 3 For completeness, you should be aware that logicians consider the statement ‘If PP then QQ’ to be equivalent to ‘not PP or QQ’. This means, in particular, that ‘If PP then QQ’ is considered to be true when PP is false and QQ is true, and also when PP and QQ are both false! These facts are not particularly useful when doing mathematics since we are usually more concerned with the truth of statements PP and QQ themselves.

Many of the statements we considered in Chapter 2 can be thought of as conditional statements. For example, Claim 2.8 (‘For all positive real numbers xx, x2+xx^{2}+x is positive’) could instead be written as ‘If xx is a positive real number then x2+xx^{2}+x is positive’.

The point here is that you already know how you can prove a conditional statement ‘If PP then QQ’: you can start by assuming PP is true then show that QQ follows as a logical certainty using a chain of deductive reasoning.

Example 3.3.

Suppose xx and yy are any two real numbers. We shall prove the statement: ‘if x=yx=y then x2=y2x^{2}=y^{2}.’

Suppose that xx and yy are two real numbers and that x=yx=y.

  • Multiplying both sides of the equation x=yx=y by xx gives x2=xyx^{2}=xy.

  • Multiplying both sides of the equation x=yx=y by yy gives xy=y2xy=y^{2}.

Since x2x^{2} and y2y^{2} both equal xyxy, they must be the same, that is x2=y2x^{2}=y^{2}.

The converse of a conditional statement

When we form the conjunction or disjunction of two statements PP and QQ, the order in which we do so does not matter. For example, the following statements mean exactly the same thing.

  • AA and CC:

    ‘I will go to class today and I will go to class tomorrow.’

  • CC and AA:

    ‘I will go to class tomorrow and I will go to class today.’

However, the order of statements in a conditional statement does matter. Given statements PP and QQ, the converse of the statement ‘If PP then QQ’ is the statement ‘If QQ then PP.’

Given a conditional statement ‘If PP then QQ’ (or ‘PQP\Rightarrow Q’), we cannot assume that the converse ‘If QQ then PP’ (or ‘QPQ\Rightarrow P’) also holds. This can be illustrated by considering our familiar example.

  • DD:

    ‘If today is Saturday, then I will not go to class today.’

  • EE:

    ‘If I will not go to class today, then today is Saturday.’

Statement EE is the converse of DD. Statement EE means that the only day I do not go to class is a Saturday. This is false, even though DD is true.

On the other hand, the converse of a conditional statement may also be true.

  • FF:

    ‘If I am in Edinburgh then I am in the capital of Scotland.’

  • GG:

    ‘If I am in the capital of Scotland then I am in Edinburgh.’

This time statements FF and its converse GG are both true.

The truth of a conditional statement guarantees nothing about the truth of its converse. Assuming that the converse of a true statement is true is a very common error, so be careful not to do it!

Example 3.4.

Consider the statement from Claim 2.8 phrased as a conditional statement: ‘Let xx be a real number. If xx is positive then x2+xx^{2}+x is positive.’ We proved this statement in Example 2.20.

The converse of the statement is ‘If x2+xx^{2}+x is positive then xx is positive.’ This is false. For example, let x=2x=-2. Then x2+x=(2)2+(2)=42=2x^{2}+x=(-2)^{2}+(-2)=4-2=2 which is positive but x=2x=-2 is not positive.

Example 3.5 (The Pythagorean theorem).

Suppose we have a triangle with sides of length aa, bb, and cc. If the angle between sides aa and bb is a right angle then a2+b2=c2a^{2}+b^{2}=c^{2}. (You probably know this result already, perhaps phrased differently.) A proof is presented in Theorem 4.14.

In fact, the converse of this statement is also true. Suppose we have a triangle with sides of length aa, bb, and cc. If a2+b2=c2a^{2}+b^{2}=c^{2} then the angle between sides aa and bb is a right angle. A proof is presented in Theorem 4.15.

3.2.5 Equivalence (If and only if)

Recall from Section 3.2.4 the statements FF and its converse GG.

  • FF:

    ‘If I am in Edinburgh then I am in the capital of Scotland.’

  • GG:

    ‘If I am in the capital of Scotland then I am in Edinburgh.’

Two statements PP and QQ are said to be (logically) equivalent when PQP\Rightarrow Q and QPQ\Rightarrow P. In this case, we may write ‘PQP\Leftrightarrow Q’ or ‘QQ if and only if PP44 4 Mathematicians sometimes write ‘iff’ as a shorthand for ‘if and only if’..

So statements FF and GG above assert that

  • HH:

    ‘I am in Edinburgh.’ and

  • II:

    ‘I am in the capital of Scotland.’

are logically equivalent, and in place of FF and GG we can write:

  • ‘I am in the capital of Scotland if and only if I am in Edinburgh.’

Note that PP and QQ are reversed in ‘PQP\Leftrightarrow Q’ compared with ‘QQ if and only if PP’. This is not a typo. Recall from Section 3.2.4 that ‘PQP\Rightarrow Q’ means ‘If PP then QQ’ or, alternatively ‘QQ if PP’. So the ‘if’ part of ‘QQ if and only if PP’ corresponds to the statement ‘PQP\Rightarrow Q’.

The Euler diagram representing a logical equivalence is shown in Figure 3.8.

PPQQ

Figure 3.8: Euler diagram showing ‘PQP\Leftrightarrow Q’ (‘QQ if and only if PP’)

The shapes for statements PP and QQ coincide; any dot placed on the diagram will be either inside both PP and QQ or outside both PP and QQ.

Example 3.6.

Consider the statement: ‘For any positive real numbers xx and yy, x2=y2x^{2}=y^{2} if and only if x=yx=y.’

Let’s introduce labels:

  • JJ:

    x=yx=y

  • KK:

    x2=y2x^{2}=y^{2}

So the statement under consideration is saying that, assuming xx and yy are positive real numbers, JKJ\Leftrightarrow K. Proving JKJ\Leftrightarrow K means proving that JKJ\Rightarrow K and KJK\Rightarrow J.

We already proved JKJ\Rightarrow K for any two real numbers xx and yy in Example 3.3 and so the same proof holds assuming xx and yy are both positive.

To prove that KJK\Rightarrow J, we can proceed as follows. Suppose x2=y2x^{2}=y^{2},

x2\displaystyle\qquad x^{2} =y2\displaystyle=y^{2}
\displaystyle\Leftrightarrow x2\displaystyle\sqrt{x^{2}} =y2\displaystyle=\sqrt{y^{2}} (taking square roots on both sides)
\displaystyle\Leftrightarrow x\displaystyle x =y\displaystyle=y (since xx and yy are both positive).

Since we have proved JKJ\Rightarrow K and KJK\Rightarrow J, we have proved JKJ\Leftrightarrow K.

It is likely that in the past you will have seen and written many line-by-line deductions like the one above without the ‘\Leftrightarrow’ symbol between statements. For example, instead of the above, you may have written:

x2\displaystyle\qquad x^{2} =y2\displaystyle=y^{2}
x2\displaystyle\sqrt{x^{2}} =y2\displaystyle=\sqrt{y^{2}} (taking square roots on both sides)
x\displaystyle x =y\displaystyle=y (since xx and yy are both positive).

You should always include the correct logical connectives in your line-by-line reasoning. Doing so makes your argument clearer and can help prevent errors in reasoning.

For instance, note that the statement ‘KJK\Rightarrow J’ is not true if xx or yy were allowed to be negative. For example, let x=3x=-3 and y=3y=3 so that x2=y2x^{2}=y^{2}. This does not imply that x=yx=y.

So where does the argument above go wrong if xx or yy can be negative? It’s the following step:

x2\displaystyle\qquad\sqrt{x^{2}} =y2\displaystyle=\sqrt{y^{2}} (taking square roots on both sides)
\displaystyle\Leftrightarrow x\displaystyle x =y.\displaystyle=y.

(You can see this is false by putting x=3x=-3 and y=3y=3.) For completeness, observe that the following chain of reasoning is correct for any real numbers xx and yy:

x2\displaystyle\qquad x^{2} =y2\displaystyle=y^{2}
\displaystyle\Leftrightarrow x2\displaystyle\sqrt{x^{2}} =y2\displaystyle=\sqrt{y^{2}} (taking square roots on both sides)
\displaystyle\Leftarrow x\displaystyle x =y.\displaystyle=y.

But this does not allow us to conclude that x=yx=y in the case where xx or yy could be negative.