Skip to main content
Mathematics LibreTexts

2.1: Introduction to Formal Logic

  • Page ID
    92953
  • \( \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}}} \)

    In our everyday life we constantly evaluate statements as being true or false. The truth of these statements help us determine whether arguments used to persuade us to vote a certain way or to buy a certain product are valid or invalid. We should always create our arguments as persuasively and logically as we can. All this we do using informal (intuitive) and formal logical thinking. We are surrounded and guided by apps and algorithms written by use of formal logic as any programming code is an exercise in use of formal logic. Having a well-developed intuition and an ability to apply formal logical analysis to an argument are equally important for a fulfilling successful life.

    Logic

    Logic is the study of reasoning.

    This chapter will look at the foundations of formal logic and apply them to determine whether an argument is valid and sound. This section, in particular, will examine statements and logical connectors that are the building blocks of arguments. Just as arithmetic operates with numbers and set theory operates with sets, formal logic operates with statements.

    Statements

    A statement is a declarative sentence that can be objectively determined to be either true or false but not both at the same time.

    A simple statement conveys only one idea. A compound statement conveys two or more ideas. Phrases, questions, and commands can never be statements in logic because it would be impossible to determine whether the ideas are true or false.

    Example 1

    Determine whether the following are statements. For each statement, say whether it is simple or compound and whether it is true or false.

    1. PGCC is a four-year college.
    2. Show me the money.
    3. The Mississippi River flows into the Gulf of Mexico.
    4. I like ice cream and I like cookies.
    5. If \(m = 6\), then \(2m = 12\).
    6. \(9+6=16\)
    7. Where are you going?

    Solution

    1. This is a statement because its truth value can be determined. It is false that PGCC is a four-year college. The statement expresses only one idea so this is a simple statement that is false.
    2. This is not a statement. Rather, this is a command which has no truth value that can be determined.
    3. This is a statement because its truth value can be determined. It is true that the Mississippi River flows in the Gulf of Mexico. The statement expresses only one idea so this is a simple statement that is true.
    4. This is a statement because its truth value can be determined -- although its truth value depends on the person referred to by "I." The statement express two ideas so this is a compound statement.
    5. This is a statement because its truth value can be determined. By multiplying both sides of the equation \(m=6\) by \(2\), we see that \(2m=12\) regardless of the value of \(m\). There are two ideas expressed in the statement (the if part and the then part), so this is a compound statement that is true.
    6. This is a statement because its truth value can be determined. It is false that that \(9+6=16\). The statement expresses only one idea so this is a simple statement that is false.
    7. This is not a statement. Questions are never statements because a truth value cannot be determined.

    Statements may be negated or combined with connector words like "and", "or", "if", and "then." Let’s take a closer look at how negations and logical connectors are used with simple statements to create more complex statements. In the definitions that follow, we assume that \(p\) and \(q\) represent two simple statements.

    One way to change a statement is to use its negation, or opposite meaning. We often use the word "not" to negate a statement.

    Negation: \(\sim\)

    If \(p\) is a statement, the negation of \(p\) is another statement that is exactly the opposite of \(p\). The symbol for negation is \(\sim\).

    The negation of a statement \(p\) is notated \(\sim p\) and means "not \(p\)."

    A statement \(p\) and its negation \(\sim p\) will always have opposite truth values. That is, if statement \(p\) is true, then \(\sim p\) is false. If statement \(p\) is false, then \(\sim p\) is true. It is impossible to have a situation in which a statement and its negation will have the same truth value.

    Example 2

    Write the negation of each statement in words.

    1. I am reading a math book.
    2. Math is fun!
    3. The sky is not green.
    4. Cars have wheels.

    Solution

    1. I am not reading a math book.
    2. Math is not fun!
    3. The sky is green. (or, The sky is not not green.)
    4. Cars do not have wheels.

    It is possible to use more than one negation in a statement. If you’ve ever said something like, “I can’t not go,” you are really saying you must go. It’s a lot like multiplying two negative numbers which gives a positive result.

    In the media and in ballot measures we often see multiple negations, and it can be confusing to figure out what a statement means.

    Example 3

    Read the statement to determine the result of the voting measure.

    This voting measure repeals the ban on plastic bags.

    Solution

    The measure enables plastic bag usage. The ban stopped plastic bag usage, so to repeal the ban would allow it again. This statement has a double negation and is also not very good for the environment.

    Try it Now 1

    Write the negation of each statement in words.

    1. I like getting up early in the morning.
    2. I will not go to work.
    3. Tom is unable to attend class.
    Answer
    1. I do not like getting up early in the morning.
    2. I will go to work.
    3. Tom is able to attend class. (or, Tom is not unable to attend class.)

    When we use the word "and" between two statements, it connects them to create a new statement that is compound. For example, if you said, “When you go to the store, please get eggs and cereal,” you would be expecting both items. For an and statement to be true, the connected statements must both be true. If even one statement is false (for instance, you get eggs but not cereal), the entire connected and statement is false.

    When two statements are connected with the word "and," this new compound statement is called a conjunction.

    Conjunction: \(\wedge\)

    If \(p\) and \(q\) are statements, their conjunction is the statement "\(p\) and \(q\)." The symbol for the conjunction of two statements is \(\wedge\).

    The conjunction of statement \(p\) and statement \(q\) is notated \(p \wedge q\).

    For any statement of the form \(p \wedge q\) to be true, both statement \(p\) and statement \(q\) must be true.

    Example 4

    Let \(p\) be the statement "I have a penny" and \(q\) be the statement "I have a dime."

    \(p \wedge q\) is the compound statement "I have a penny and I have a dime."

    Example 5

    Determine the truth value of each conjunction.

    1. Annapolis is in Maryland and Baltimore is in Virginia.
    2. 7 is an odd number and 10 is an even number.

    Solution

    1. \(p\) is the statement "Annapolis is in Maryland," which is true, while \(q\) is the statement "Baltimore is in Virginia," which is false. Because only one statement is true and the other statement is false, the truth value of this conjunction is false.
    2. \(p\) is the statement "7 is an odd number," which is true, while \(q\) is the statement "10 is an even number," which is true. Because both statements are true, the truth value of this conjunction is true.

    The word "or" between two statements similarly connects the statements to create a new statement that is compound. In this case, if you said, “Please get eggs or cereal,” you would be expecting one or the other (but probably not both). For an or statement to be true, at least one of the statements must be true. That is, an or statement is true when one or both statements are true.

    It should be pointed out that in the English language we often mean for or to be exclusive: one or the other, but not both. In math, however, or is usually inclusive: one or the other, or both.

    When two statements are connected with the word "or" this new compound statement is called a disjunction.

    Disjunction: \(\vee\)

    If \(p\) and \(q\) are statements, their disjunction is the statement "\(p\) or \(q\)." The symbol for the disjunction of two statements is \(\vee\).

    The disjunction of statement \(p\) and statement \(q\) is notated \(p \vee q\).

    For any statement of the form \(p \vee q\) to be true, at least one of statement \(p\) and statement \(q\) must be true. The only time when a disjunction is false is when both of its statements are false.

    Example 6

    Let \(p\) be the statement "Today is Tuesday" and \(q\) be the statement "\(1+1=2\)."

    \(p \vee q\) is the compound statement "Today is Tuesday or \(1+1=2\)."

     

    Example 7

    Determine the truth value of each disjunction.

    1. Annapolis is in Maryland or Baltimore is in Virginia.
    2. 7 is an odd number or 10 is an even number.
    3. There are 60 stars on the United States flag or a banana is red.

    Solution

    1. \(p\) is the statement "Annapolis is in Maryland," which is true, while \(q\) is the statement "Baltimore is in Virginia," which is false. Because at least one statement is true, the truth value of this disjunction is true.
    2. \(p\) is the statement "7 is an odd number," which is true, while \(q\) is the statement "10 is an even number," which is true. Because at least one statement is true (both are true!), the truth value of this disjunction is true.
    3. \(p\) is the statement "There are 60 stars on the United States flag," which is false, while \(q\) is the statement "A banana is red," which is also false. Because neither statement is true, the truth value of this disjunction is false.

    Try it Now 2

    Consider these simple statements:

    \(p\): \(5\) is an odd number. \(q\): \(6+4=12\)

    Translate these symbolic statements to words and tell whether the resulting statement is true or false.

    1. \(\sim p\)
    2. \(\sim q\)
    3. \(p \wedge q\)
    4. \(p \vee q\)
    Answer
    1. \(5\) is not an odd number. False.
    2. \(6+4 \neq12\). True.
    3. \(5\) is an odd number and \(6+4=12\). False.
    4. \(5\) is an odd number or \(6+4=12\). True.

    We often want to be able to conditionally do something. That is, we want to be able to say "If this thing is true, then do X." It's like when we leave our house in the morning -- "If it's cold outside, then I will wear a coat."

    A conditional statement connects two statements using if ... then.

    Another example of a conditional statement is “If it is raining, then we’ll go to the mall.” The statement “If it is raining,” may be either true or false for any given day. If the condition is true, then we will follow the course of action and go to the mall. If the condition is false though, we haven’t said anything about what we will or won’t do. Truth values of conditional statements will be discussed in a later section.

    Conditional: \(\rightarrow\)

    A conditional statement is a compound statement of the form "If \(p\), then \(q\)." Often, we say this as "\(p\) implies \(q\)." The symbol used to indicate a conditional statement is \(\rightarrow\).

    Statement \(p\) is the "if part" and is called the antecedent. Statement \(q\) is the "then part" and is called the consequent.

    The conditional statement "If \(p\), then \(q\)" is notated \(p \rightarrow q\).

     

    Example 8

    Let \(p\) be the statement "You are hungry" and \(q\) be the statement "You are cranky."

    In this case \(p \rightarrow q\) is the compound statement "If you are hungry, then you are cranky."

    Here, "You are hungry" is the antecedent, and "You are cranky" is the consequent. When the condition of a person being hungry has been met, it implies that the person will be be cranky.

    Example 9

    Let \(p\) be the statement "It rains" and \(q\) be the statement "The game is cancelled."

    Write each statement using correct symbols.

    1. If it rains, then the game is cancelled.
    2. If the game is not cancelled, then it doesn't rain.
    3. The game is cancelled if it rains.
    4. It is not the case that if it rains, then the game is cancelled.

    Solution

    1. The antecedent is "It rains" because this statement is the if part of the conditional. The consequent is "The game is cancelled" because this statement is the then part of the conditional. In symbols, the conditional statement is \(p \rightarrow q\).
    2. The antecedent is "The game is not cancelled" because this statement is the if part of the conditional. This is the negation of statement \(q\). The consequent is "It doesn't rain" because this statement is the then part of the conditional. This is the negation of statement \(p\). In symbols, the conditional statement is \(\sim q \rightarrow \; \sim p\).
    3. This statement is the same as the statement in part a with the if and then parts written in different orders. The antecedent is "It rains" because this statement is the if part of the conditional. The consequent is "The game is cancelled" because this statement is the then part of the conditional. In symbols, the conditional statement is \(p \rightarrow q\).
    4. Note that in this case it is the entire “if…then” statement that is being negated, rather than just one or both of its components. This statement is the negation of the conditional statement in part a. In symbols, this is written \(\sim(p \rightarrow q\)).

    As noted above for a conditional statement involving two statements, there are two roles: one statement is the antecedent and one statement is the consequent. In general, the antecedent and the consequent cannot be interchanged. To illustrate why this is true, consider these two conditional statements:

    • Conditional 1: If today is Saturday, then it is the weekend.
    • Conditional 2: If it is the weekend, then today is Saturday.

    Conditional 1 is always a true statement. However, Conditional 2 may or may not be true because today may be Sunday. Interchanging the if part and the then part makes a big difference in whether the resulting conditional statement is true or not. 'Today is Saturday" implies "It is the weekend," but "It is the weekend" does not imply "It is Saturday."

    As we just saw, \(p \rightarrow q\) does not always mean that \(q \rightarrow p\). However, in certain instances it may happen that both \(p \rightarrow q\) and \(q \rightarrow p\). To illustrate this with an example, consider the statements "Today is January 1" and "Today is New Year’s Day." If we form conditional statements, we have

    • Conditional 1: If today is January 1, then today is New Year's Day.
    • Conditional 2: If today is New Year's Day, then today is January 1.

    It is possible to interchange the simple statements in the if and then parts because each simple statement implies the other simple statement. This type of powerful situation is represented using a biconditional statement.

    When two statements form a biconditional in this way, we can express this more compactly using the phrase "...if and only if...". For the previous example, we could write "Today is January 1 if and only if today is New Year's Day." A double-headed arrow \(\leftrightarrow\) is used to indicate a biconditional statement instead of the one-headed arrow \(\rightarrow\) used for a conditional statement.

     

    Biconditional: \(\leftrightarrow\)

    A biconditional statement is a statement of the form "\(p\) if and only if \(q\)." It is a conjunction of the two conditional statements "If \(p\), then \(q\)" and "If \(q\), then \(p\)." The symbol used to indicate a biconditional statement is \(\leftrightarrow\).

    The biconditional statement "\(p\) if and only \(q\)" is notated \(p \leftrightarrow q\).

    Example 10

    \(p\) is the statement "I eat" and \(q\) is the statement "I am hungry."

    In this case \(p \leftrightarrow q\) is the compound statement "I eat if and only if I am hungry."

    Here, "I eat if and only if I am hungry" is a short way of saying both "If I eat, then I am hungry" and "If I am hungry, then I eat."

    Example 11

    Consider these simple statements:

    \(p\): The sun is shining. \(q\): It is raining. \(r\): The grass is green.

    Translate these statements to symbolic form using \(p\), \(q\), \(r\), \(\sim\), \(\rightarrow\), and \(\leftrightarrow\).

    1. It is not raining.
    2. If it is raining, then the sun is not shining.
    3. It is raining and the grass is green.
    4. It is false that the sun is shining or it is raining.
    5. The grass is green, if it is raining and the sun is shining.
    6. The sun is shining or it is raining.
    7. The grass is green if and only if it is raining.

    Solution

    1. \(\sim q\). This is the negation of statement \(q\).
    2. \(q \rightarrow \; \sim p\). This is a conditional statement where statement \(q\) is the antecedent and the negation of statement \(p\) is the consequent.
    3. \(q \wedge p\). This is a conjunction with statement \(q\) and statement \(r\).
    4. \(\sim (p \vee q)\). This is the negation of the disjunction of statement \(p\) and statement \(q\).
    5. \((q \wedge p) \rightarrow r\). This is a conditional statement where the antecedent is the conjunction of statement \(q\) and statement \(p\) and the consequent is statement \(r\). We must use grouping symbols to show the antecedent is itself a compound statement.
    6. \(p \vee q\). This is a disjunction with statement \(p\) and statement \(q\).
    7. \(r \leftrightarrow q\). This is a biconditional using statement \(r\) and statement \(q\).

    Try it Now 3

    Consider these simple statements:

    \(p\): Tom plays hard. \(q\): Tom is a guitar player. \(r\): Tom's commute to work is long. \(s\): Tom gets bored in the car.

    Translate these statements to symbolic form using \(p\), \(q\), \(r\), \(s\), \(\sim\), \(\rightarrow\), and \(\leftrightarrow\).

    1. Tom plays hard or Tom is a guitar player.
    2. Tom's commute to work is not long.
    3. It is false that Tom's commute is long and Tom gets bored in the car.
    4. If Tom's commute to work is long, then Tom gets bored in the car.
    5. If Tom gets bored in the car and the commute to work is long, then Tom does not play hard.
    6. Tom is not a guitar player if and only Tom does not play hard.
    Answer
    1. \(p \vee q\)
    2. \(\sim r\)
    3. \(\sim (r \wedge s)\)
    4. \(r \rightarrow s\)
    5. \((s \wedge r) \rightarrow \; \sim p\)
    6. \(\sim q \leftrightarrow \; \sim p\)

    Example 12

    Consider these simple statements:

    \(a\): Roses are red. \(b\): The sky is blue. \(c\): Turtles are green.

    Translate these symbolic statements to words.

    1. \(a \wedge b\)
    2. \(\sim c \vee b\)
    3. \(\sim (c \vee b)\)
    4. \(a \wedge (b \vee c)\)
    5. \(b \rightarrow \; \sim c\)
    6. \(\sim b \rightarrow (\sim a \; \wedge \sim c)\)
    7. \(a \leftrightarrow \; \sim b\)

    Solution

    1. Roses are red and the sky is blue.
    2. Turtles are not green or the sky is blue.
    3. It is false that turtles are green or the sky is blue.
    4. Roses are red, and the sky is blue or turtles are green.
    5. If the sky is blue, then turtles are not green.
    6. If the the sky is not blue, then roses are not red and turtles are not green.
    7. Roses are red if and only if the sky is not blue.

    Try it Now 4

    Consider these simple statements:

    \(p\): I go to class every day. \(q\): I do my homework. \(r\): I get a good grade in this class.

    Translate these symbolic statements to words.

    1. \(p \wedge q\)
    2. \(q \; \vee \sim r\)
    3. \(\sim (p \vee r)\)
    4. \(\sim q \rightarrow \; \sim r\)
    5. \(p \leftrightarrow r\)
    Answer
    1. I go to class everyday and I do my homework.
    2. I do my homework or I do not get a good grade in this class.
    3. It is false that I go to class every day or I get a good grade in this class.
    4. If I don't do my homework, then I don't get a good grade in this class.
    5. I go to class every day if and only if I get a good grade in this class.

    This page titled 2.1: Introduction to Formal Logic is shared under a CC BY-SA license and was authored, remixed, and/or curated by David Lippman (The OpenTextBookStore) .

    • Was this article helpful?