# Logic

## Statements and Quantifiers

### Learning Objectives

After completing this section, you should be able to:
1. Identify logical statements.
2. Represent statements in symbolic form.
3. Negate statements in words.
4. Negate statements symbolically.
5. Translate negations between words and symbols.
6. Express statements with quantifiers of all, some, and none.
7. Negate statements containing quantifiers of all, some, and none.
Have you ever built a club house, tree house, or fort with your friends? If so, you and your friends likely started by gathering some tools and supplies to work with, such as hammers, saws, screwdrivers, wood, nails, and screws. Hopefully, at least one member of your group had some knowledge of how to use the tools correctly and helped to direct the construction project. After all, if your house isn't built on a strong foundation, it will be weak and could possibly fall apart during the next big storm. This same foundation is important in logic.
In this section, we will begin with the parts that make up all logical arguments. The building block of any logical argument is a logical statement, or simply a statement. A logical statement has the form of a complete sentence, and it must make a claim that can be identified as being true or false.
When making arguments, sometimes people make false claims. When evaluating the strength or validity of a logical argument, you must also consider the truth values, or the identification of true or false, of all the statements used to support the argument. While a false statement is still considered a logical statement, a strong logical argument starts with true statements.

### Identifying Logical Statements

An example of logical statement with a false truth value is, “All roses are red.” It is a logical statement because it has the form of a complete sentence and makes a claim that can be determined to be either true or false. It is a false statement because not all roses are red: some roses are red, but there are also roses that are pink, yellow, and white. Requests, questions, or directives may be complete sentences, but they are not logical statements because they cannot be determined to be true or false. For example, suppose someone said to you, “Please, sit down over there.” This request does not make a claim and it cannot be identified as true or false; therefore, it is not a logical statement.

###  Representing Statements in Symbolic Form

When analyzing logical arguments that are made of multiple logical statements, symbolic form is used to reduce the amount of writing involved. Symbolic form also helps visualize the relationship between the statements in a more concise way in order to determine the strength or validity of an argument. Each logical statement is represented symbolically as a single lowercase letter, usually starting with the letter .
To begin, you will practice how to write a single logical statement in symbolic form. This skill will become more useful as you work with compound statements in later sections.

###  Negating Statements

Consider the false statement introduced earlier, “All roses are red.” If someone said to you, “All roses are red,” you might respond with, “Some roses are not red.” You could then strengthen your argument by providing additional statements, such as, “There are also white roses, yellow roses, and pink roses, to name a few.”
The negation of a logical statement has the opposite truth value of the original statement. If the original statement is false, its negation is true, and if the original statement is true, its negation is false. Most logical statements can be negated by simply adding or removing the word not. For example, consider the statement, “Emma Stone has green eyes.” The negation of this statement would be, “Emma Stone does not have green eyes.” The table below gives some other examples.
The way you phrase your argument can impact its success. If someone presents you with a false statement, the ability to rebut that statement with its negation will provide you with the tools necessary to emphasize the correctness of your position.

###  Negating Logical Statements Symbolically

The symbol for negation, or not, in logic is the tilde, ~. So, not  is represented as . To negate a statement symbolically, remove or add a tilde. The negation of not (not ) is . Symbolically, this equation is

###  Translating Negations Between Words and Symbols

In order to analyze logical arguments, it is important to be able to translate between the symbolic and written forms of logical statements.

###  Expressing Statements with Quantifiers of All, Some, or None

A quantifier is a term that expresses a numerical relationship between two sets or categories. For example, all squares are also rectangles, but only some rectangles are squares, and no squares are circles. In this example, all, some, and none are quantifiers. In a logical argument, the logical statements made to support the argument are called premises, and the judgment made based on the premises is called the conclusion. Logical arguments that begin with specific premises and attempt to draw more general conclusions are called inductive arguments.
Consider, for example, a parent walking with their three-year-old child. The child sees a cardinal fly by and points it out. As they continue on their walk, the child notices a robin land on top of a tree and a duck flying across to land on a pond. The child recognizes that cardinals, robins, and ducks are all birds, then excitedly declares, "All birds fly!" The child has just made an inductive argument. They noticed that three different specific types of birds all fly, then synthesized this information to draw the more general conclusion that all birds can fly. In this case, the child's conclusion is false.
The specific premises of the child's argument can be paraphrased by the following statements:
1. Premise: Cardinals are birds that fly.
2. Premise: Robins are birds that fly.
3. Premise: Ducks are birds that fly.
The general conclusion is: “All birds fly!”
All inductive arguments should include at least three specific premises to establish a pattern that supports the general conclusion. To counter the conclusion of an inductive argument, it is necessary to provide a counter example. The parent can tell the child about penguins or emus to explain why that conclusion is false.
On the other hand, it is usually impossible to prove that an inductive argument is true. So, inductive arguments are considered either strong or weak. Deciding whether an inductive argument is strong or weak is highly subjective and often determined by the background knowledge of the person making the judgment. Most hypotheses put forth by scientists using what is called the “scientific method” to conduct experiments are based on inductive reasoning.
In the following example, we will use quantifiers to express the conclusion of a few inductive arguments.

### Negating Statements Containing Quantifiers

Recall that the negation of a statement will have the opposite truth value of the original statement. There are four basic forms that logical statements with quantifiers take on.
1. All  are .
2. Some  are .
3. No  are .
4. Some  are not .
The negation of logical statements that use the quantifiers all, some, or none is a little more complicated than just adding or removing the word not.
For example, consider the logical statement, “All oranges are citrus fruits.” This statement expresses as a subset relationship. The set of oranges is a subset of the set of citrus fruit. This means that there are no oranges that are outside the set of citrus fruit. The negation of this statement would have to break the subset relationship. To do this, you could say, “At least one orange is not a citrus fruit.” Or, more concisely, “Some oranges are not citrus fruit.” It is tempting to say "No oranges are citrus fruit," but that would be incorrect. Such a statement would go beyond breaking the subset relationship, to stating that the two sets have nothing in common. The negation of " is a subset of " would be to state that " is not a subset of ," as depicted by the Venn diagram in .
The statement, “All oranges are citrus fruit,” is true, so its negation, “Some oranges are not citrus fruit,” is false.
Now, consider the statement, “No apples are oranges.” This statement indicates that the set of apples is disjointed from the set of oranges. The negation must state that the two are not disjoint sets, or that the two sets have a least one member in common. Their intersection is not empty. The negation of the statement, “ intersection  is the empty set,” is the statement that "  intersection  is not empty," as depicted in the Venn diagram in .
The negation of the true statement “No apples are oranges,” is the false statement, “Some apples are oranges.”
 summarizes the four different forms of logical statements involving quantifiers and the forms of their associated negations, as well as the meanings of the relationships between the two categories or sets  and .
We covered sets in great detail in Chapter 1. To review, "  is a subset of " means that every member of set  is also a member of set . The intersection of two sets  and  is the set of all elements that they share in common. If  intersection  is the empty set, then sets  and  do not have any elements in common. The two sets do not overlap. They are disjoint.

### Check Your Understanding

### Key Terms

1. logic
2. logical statement
3. truth values
4. symbolic form
5. negation of a logical statement
6. quantifier
7. premises
8. conclusion
9. inductive logical arguments

### Key Concepts

1. Logical statements have the form of a complete sentence and make claims that can be identified as true or false.
2. Logical statements are represented symbolically using a lowercase letter.
3. The negation of a logical statement has the opposite truth value of the original statement.
4. Be able to

### video

1. Logic Part 1A: Logic Statements and Quantifiers


# Logic

## Compound Statements

### Learning Objectives

After completing this section, you should be able to:
1. Translate compound statements into symbolic form.
2. Translate compound statements in symbolic form with parentheses into words.
3.  Apply the dominance of connectives.
Suppose your friend is trying to get a license to drive. In most places, they will need to pass some form of written test proving their knowledge of the laws and rules for driving safely. After passing the written test, your friend must also pass a road test to demonstrate that they can perform the physical task of driving safely within the rules of the law.
Consider the statement: "My friend passed the written test, but they did not pass the road test." This is an example of a compound statement, a statement formed by using a connective to join two independent clauses or logical statements. The statement, “My friend passed the written test,” is an independent clause because it is a complete thought or idea that can stand on its own. The second independent clause in this compound statement is, “My friend did not pass the road test.” The word "but" is the connective used to join these two statements together, forming a compound statement. So, did your friend acquire their driving license?.
This section introduces common logical connectives and their symbols, and allows you to practice translating compound statements between words and symbols. It also explores the order of operations, or dominance of connectives, when a single compound statement uses multiple connectives.

### Common Logical Connectives

Understanding the following logical connectives, along with their properties, symbols, and names, will be key to applying the topics presented in this chapter. The chapter will discuss each connective introduced here in more detail.
The joining of two logical statements with the word "and" or "but" forms a compound statement called a conjunction. In logic, for a conjunction to be true, all the independent logical statements that make it up must be true. The symbol for a conjunction is . Consider the compound statement, “Derek Jeter played professional baseball for the New York Yankees, and he was a shortstop.” If  represents the statement, “Derrick Jeter played professional baseball for the New York Yankees,” and if  represents the statement, “Derrick Jeter was a short stop,” then the conjunction will be written symbolically as
The joining of two logical statements with the word “or” forms a compound statement called a disjunction. Unless otherwise specified, a disjunction is an inclusive or statement, which means the compound statement formed by joining two independent clauses with the word or will be true if a least one of the clauses is true. Consider the compound statement, "The office manager ordered cake for for an employee’s birthday or they ordered ice cream.” This is a disjunction because it combines the independent clause, “The office manager ordered cake for an employee’s birthday,” with the independent clause, “The office manager ordered ice cream,” using the connective, or. This disjunction is true if the office manager ordered only cake, only ice cream, or they ordered both cake and ice cream. Inclusive or means you can have one, or the other, or both!
Joining two logical statements with the word implies, or using the phrase “if first statement, then second statement,” is called a conditional or implication. The clause associated with the "if" statement is also called the hypothesis or antecedent, while the clause following the "then" statement or the word implies is called the conclusion or consequent. The conditional statement is like a one-way contract or promise. The only time the conditional statement is false, is if the hypothesis is true and the conclusion is false. Consider the following conditional statement, “If Pedro does his homework, then he can play video games.” The hypothesis/antecedent is the statement following the word if, which is “Pedro does/did his homework.” The conclusion/consequent is the statement following the word then, which is “Pedro can play his video games.”
Joining two logical statements with the connective phrase “if and only if” is called a biconditional. The connective phrase "if and only if" is represented by the symbol,  In the biconditional statement,   is called the hypothesis or antecedent and  is called the conclusion or consequent. For a biconditional statement to be true, the truth values of  and  must match. They must both be true, or both be false.
The table below lists the most common connectives used in logic, along with their symbolic forms, and the common names used to describe each connective.

###  Translating Compound Statements to Symbolic Form

To translate a compound statement into symbolic form, we take the following steps.
1. Identify and label all independent affirmative logical statements with a lower case letter, such as , , or .
2. Identify and label any negative logical statements with a lowercase letter preceded by the negation symbol, such as , , or .
3. Replace the connective words with the symbols that represent them, such as
Consider the previous example of your friend trying to get their driver’s license. Your friend passed the written test, but they did not pass the road test. Let  represent the statement, “My friend passed the written test.” And, let  represent the statement, “My friend did not pass the road test.” Because the connective but is logically equivalent to the word and, the symbol for but is the same as the symbol for and; replace but with the symbol  The compound statement is symbolically written as: . My friend passed the written test, but they did not pass the road test.

###  Translating Compound Statements in Symbolic Form with Parentheses into Words

When parentheses are written in a logical argument, they group a compound statement together just like when calculating numerical or algebraic expressions. Any statement in parentheses should be treated as a single component of the expression. If multiple parentheses are present, work with the inner most parentheses first.
Consider your friend’s struggles to get their license to drive. Let  represent the statement, “My friend passed the written test,” let  represent the statement, “My friend passed the road test,” and let  represent the statement, “My friend received a driver’s license.” The statement  can be translated into words as follows: the statement  is grouped together to form the hypothesis of the conditional statement and  is the conclusion. The conditional statement has the form “if  then ” Therefore, the written form of this statement is: “If my friend passed the written test and they passed the road test, then my friend received a driver’s license.”
Sometimes a compound statement within parentheses may need to be negated as a group. To accomplish this, add the phrase, “it is not the case that” before the translation of the phrase in parentheses. For example, using , , and  of your friend obtaining a license, let’s translate the statement  into words.
In this case, the hypothesis of the conditional statement is  and the conclusion is  To negate the hypothesis, add the phrase “it is not the case” before translating what is in parentheses. The translation of the hypothesis is the sentence, “It is not the case that my friend passed the written test and they passed the road test,” and the translation of the conclusion is, “My friend did not receive a driver’s license.” So, a translation of the complete conditional statement,  is: “If it is not the case that my friend passed the written test and the road test, then my friend did not receive a driver’s license.”

###  The Dominance of Connectives

The order of operations for working with algebraic and arithmetic expressions provides a set of rules that allow consistent results. For example, if you were presented with the problem , and you were not familiar with the order of operation, you might assume that you calculate the problem from left to right. If you did so, you would add 1 and 3 to get 4, and then multiply this answer by 2 to get 8, resulting in an incorrect answer. Try inputting this expression into a scientific calculator. If you do, the calculator should return a value of 7, not 8.
Scientific Calculator
The order of operations for algebraic and arithmetic operations states that all multiplication must be applied prior to any addition. Parentheses are used to indicate which operation—addition or multiplication—should be done first. Adding parentheses can change and/or clarify the order. The parentheses in the expression  indicate that 3 should be multiplied by 2 to get 6, and then 1 should be added to 6 to get 7:
As with algebraic expressions, there is a set of rules that must be applied to compound logical statements in order to evaluate them with consistent results. This set of rules is called the dominance of connectives. When evaluating compound logical statements, connectives are evaluated from least dominant to most dominant as follows:
1. Parentheses are the least dominant connective. So, any expression inside parentheses must be evaluated first. Add as many parentheses as needed to any statement to specify the order to evaluate each connective.
2. Next, we evaluate negations.
3. Then, we evaluate conjunctions and disjunctions from left to right, because they have equal dominance.
4. After evaluating all conjunctions and disjunctions, we evaluate conditionals.
5. Lastly, we evaluate the most dominant connective, the biconditional. If a statement includes multiple connectives of equal dominance, then we will evaluate them from left to right.
See  for a visual breakdown of the dominance of connectives.
Let’s revisit your friend’s struggles to get their driver’s license. Let  represent the statement, “My friend passed the written test,” let  represent the statement, “My friend passed the road test,” and let  represent the statement, “My friend received a driver’s license.” Let's use the dominance of connectives to determine how the compound statement  should be evaluated.
Step 1: There are no parentheses, which is least dominant of all connectives, so we can skip over that.
Step 2: Because negation is the next least dominant, we should evaluate  first. We could add parentheses to the statement to make it clearer which connecting needs to be evaluated first:  is equivalent to
Step 3: Next, we evaluate the conjunction, .  is equivalent to
Step 4: Finally, we evaluate the conditional,  as this is the most dominant connective in this compound statement.
In the first module of this chapter, we evaluated the truth value of negations. In the following modules, we will discuss how to evaluate conjunctions, disjunctions, conditionals, and biconditionals, and then evaluate compound logical statements using truth tables and our knowledge of the dominance of connectives.

### Check Your Understanding

### Key Terms

1. compound statement
2. connective
3. conjunction
4. disjunction
5. conditional
6. hypothesis
7. conclusion
8. biconditional
9. dominance of connectives

### Key Concepts

1. Logical connectives are used to form compound logical statements by using words such as and, or, and if …, then.
2. A conjunction is a compound logical statement formed by combining two statements with the words “and” or “but.” If the two independent clauses are represented by  and , respectively, then the conjunction is written symbolically as . For the conjunction to be true, both  and  must be true.
3. A disjunction joins two logical statements with the or connective. In, logic or is inclusive. For an or statement to be true at least one statement must be true, but both may also be true.
4. A conditional statement has the form if , then , where  and  are logical statements. The only time the conditional statement is false is when  is true, and  is false.
5. The biconditional statement is formed using the connective  for the biconditional statement to be true, the true values of  and , must match. If  is true then  must be true, if  is false, then  must be false.
6. Translate compound statements between words and symbolic form.

7. The dominance of connectives explains the order in which compound logical statements containing multiple connectives should be interpreted.
8. The dominance of connectives should be applied in the following order

### video

1. Logic Part 1B: Compound Statements, Connectives and Symbols


# Logic

## Constructing Truth Tables

### Learning Objectives

After completing this section, you should be able to:
1. Interpret and apply negations, conjunctions, and disjunctions.
2. Construct a truth table using negations, conjunctions, and disjunctions.
3. Construct a truth table for a compound statement and interpret its validity.
Are you familiar with the Choose Your Own Adventure book series written by Edward Packard? These gamebooks allow the reader to become one of the characters and make decisions that affect what happens next, resulting in different sequences of events in the story and endings based on the choices made. Writing a computer program is a little like what it must be like to write one of these books. The programmer must consider all the possible inputs that a user can put into the program and decide what will happen in each case, then write their program to account for each of these possible outcomes.
A truth table is a graphical tool used to analyze all the possible truth values of the component logical statements to determine the validity of a statement or argument along with all its possible outcomes. The rows of the table correspond to each possible outcome for the given logical statement identified at the top of each column. A single logical statement  has two possible truth values, true or false. In truth tables, a capital T will represent true values, and a capital F will represent false values.
In this section, you will use the knowledge built in Statements and Quantifiers and Compound Statements to analyze arguments and determine their truth value and validity. A logical argument is valid if its conclusion follows from its premises, regardless of whether those premises are true or false. You will then explore the truth tables for negation, conjunction, and disjunction, and use these truth tables to analyze compound logical statements containing these connectives.

### Interpret and Apply Negations, Conjunctions, and Disjunctions

The negation of a statement will have the opposite truth value of the original statement. When  is true,  is false, and when  is false,  is true.
A conjunction is a logical and statement. For a conjunction to be true, both statements that make up the conjunction must be true. If at least one of the statements is false, the and statement is false.
A disjunction is a logical inclusive or statement, which means that a disjunction is true if one or both statements that form it are true. The only way a logical inclusive or statement is false is if both statements that form the disjunction are false.
In the next example, you will apply the dominance of connectives to find the truth values of compound statements containing negations, conjunctions, and disjunctions and use a table to record the results. When constructing a truth table to analyze an argument where you can determine the truth value of each component statement, the strategy is to create a table with two rows.  The first row contains the symbols representing the components that make up the compound statement. The second row contains the truth values of each component below its symbol. Include as many columns as necessary to represent the value of each compound statement. The last column includes the complete compound statement with its truth value below it.

### Construct Truth Tables to Analyze All Possible Outcomes

Recall from Statements and Questions that the negation of a statement will always have the opposite truth value of the original statement; if a statement  is false, then its negation  is true, and if a statement  is true, then its negation  is false. To create a truth table for the negation of statement , add a column with a heading of , and for each row, input the truth value with the opposite value of the value listed in the column for , as depicted in the table below.
Conjunctions and disjunctions are compound statements formed when two logical statements combine with the connectives “and” and “or” respectively.  How does that change the number of possible outcomes and thus determine the number of rows in our truth table? The multiplication principle, also known as the fundamental counting principle, states that the number of ways you can select an item from a group of  items and another item from a group with  items is equal to the product of  and . Because each proposition  and  has two possible outcomes, true or false, the multiplication principle states that there will be  possible outcomes: {TT, TF, FT, FF}.
The tree diagram and table in  demonstrate the four possible outcomes for two propositions  and .
A conjunction is a logical and statement. For a conjunction to be true, both the statements that make up the conjunction must be true. If at least one of the statements is false, the and statement is false.
A disjunction is a logical inclusive or statement. Which means that a disjunction is true if one or both statements that make it are true. The only way a logical inclusive or statement is false is if both statements that make up the disjunction are false.

###  Determine the Validity of a Truth Table for a Compound Statement

A logical statement is valid if it is always true regardless of the truth values of its component parts. To test the validity of a compound statement, construct a truth table to analyze all possible outcomes.  If the last column, representing the complete statement, contains only true values, the statement is valid.

### Check Your Understanding

### Key Terms

1. Truth table
2. Multiplication principle
3. Valid

### Key Concepts

1. Determine the true values of logical statements involving negations, conjunctions, and disjunctions.

2. Know how to construct a truth table involving negations, conjunctions, and disjunctions and apply the dominance of connectives to determine the truth value of a compound logical statement containing, negations, conjunctions, and disjunctions.

3. A logical statement is valid if it is always true. Know how to construct a truth table for a compound statement and use it to determine the validity of compound statements involving negations, conjunctions, and disjunctions.

### Video

1. Logic Part 2: Truth Values of Conjunctions: Is an "AND" statement true or false?
2. Logic Part 3: Truth Values of Disjunctions: Is an "OR" statement true or false?
3. Logic Part 4: Truth Values of Compound Statements with "and", "or", and "not"
4. Logic Part 5: What are truth tables? How do you set them up?
5. Logic Part 6: More on Truth Tables and Setting Up Rows and Column Headings


# Logic

## Truth Tables for the Conditional and Biconditional

### Learning Objectives

After completing this section, you should be able to:
1. Use and apply the conditional to construct a truth table.
2. Use and apply the biconditional to construct a truth table.
3. Use truth tables to determine the validity of conditional and biconditional statements.
Computer languages use if-then or if-then-else statements as decision statements:
1. If the hypothesis is true, then do something.
2. Or, if the hypothesis is true, then do something; else do something else.
For example, the following representation of computer code creates an if-then-else decision statement:
Check value of variable .
If , then print "Hello, World!" else print "Goodbye".
In this imaginary program, the if-then statement evaluates and acts on the value of the variable . For instance, if , the program would consider the statement  as true and “Hello, World!” would appear on the computer screen. If instead, , the program would consider the statement  as false (because 3 is greater than 1), and print “Goodbye” on the screen.
In this section, we will apply similar reasoning without the use of computer programs.

### Use and Apply the Conditional to Construct a Truth Table

A conditional is a logical statement of the form if , then . The conditional statement in logic is a promise or contract. The only time the conditional,  is false is when the contract or promise is broken.
For example, consider the following scenario. A child’s parent says, “If you do your homework, then you can play your video games.” The child really wants to play their video games, so they get started right away, finish within an hour, and then show their parent the completed homework. The parent thanks the child for doing a great job on their homework and allows them to play video games. Both the parent and child are happy. The contract was satisfied; true implies true is true.
Now, suppose the child does not start their homework right away, and then struggles to complete it. They eventually finish and show it to their parent. The parent again thanks the child for completing their homework, but then informs the child that it is too late in the evening to play video games, and that they must begin to get ready for bed. Now, the child is really upset. They held up their part of the contract, but they did not receive the promised reward. The contract was broken; true implies false is false.
So, what happens if the child does not do their homework? In this case, the hypothesis is false. No contract has been entered, therefore, no contract can be broken. If the conclusion is false, the child does not get to play video games and might not be happy, but this outcome is expected because the child did not complete their end of the bargain. They did not complete their homework. False implies false is true. The last option is not as intuitive. If the parent lets the child play video games, even if they did not do their homework, neither parent nor child are going to be upset. False implies true is true.
The truth table for the conditional statement below summarizes these results.

### Use and Apply the Biconditional to Construct a Truth Table

The biconditional, , is a two way contract; it is equivalent to the statement  A biconditional statement,  is true whenever the truth value of the hypothesis matches the truth value of the conclusion, otherwise it is false.
The truth table for the biconditional is summarized below.

### Check Your Understanding

### Key Concepts

1. The conditional statement, if  then , is like a contract. The only time it is false is when the contract has been broken. That is, when  is true, and  is false.

2. The biconditional statement,  if and only if , it true whenever  and  have matching true values, otherwise it is false.

3. Know how to construct truth tables involving conditional and biconditional statements.
4. Use truth tables to analyze conditional and biconditional statements and determine their validity.

### Video

1. Logic Part 8: The Conditional and Tautologies
2. Logic Part 11B Biconditional and Summary of Truth Value Rules in Logic
3. Logic Part 13: Truth Tables to Determine if Argument is Valid or Invalid


# Logic

## Equivalent Statements

### Learning Objectives

After completing this section, you should be able to:
1. Determine whether two statements are logically equivalent using a truth table.
2. Compose the converse, inverse, and contrapositive of a conditional statement
Have you ever had a conversation with or sent a note to someone, only to have them misunderstand what you intended to convey? The way you choose to express your ideas can be as, or even more, important than what you are saying. If your goal is to convince someone that what you are saying is correct, you will not want to alienate them by choosing your words poorly.
Logical arguments can be stated in many different ways that still ultimately result in the same valid conclusion. Part of the art of constructing a persuasive argument is knowing how to arrange the facts and conclusion to elicit the desired response from the intended audience.
In this section, you will learn how to determine whether two statements are logically equivalent using truth tables, and then you will apply this knowledge to compose logically equivalent forms of the conditional statement. Developing this skill will provide the additional skills and knowledge needed to construct well-reasoned, persuasive arguments that can be customized to address specific audiences.

### Determine Logical Equivalence

Two statements,  and , are logically equivalent when  is a valid argument, or when the last column of the truth table consists of only true values. When a logical statement is always true, it is known as a tautology. To determine whether two statements  and  are logically equivalent, construct a truth table for  and determine whether it valid. If the last column is all true, the argument is a tautology, it is valid, and  is logically equivalent to ; otherwise,  is not logically equivalent to .

### Compose the Converse, Inverse, and Contrapositive of a Conditional Statement

The converse, inverse, and contrapositive are variations of the conditional statement,

 The table below shows how these variations are presented symbolically.

### Check Your Understanding

### Key Terms

1. logically equivalent
2. tautology
3. inverse
4. converse
5. contrapositive

### Key Concepts

1. Two statements  and  are logically equivalent if the biconditional statement,  is a valid argument. That is, the last column of the truth table consists of only true values. In other words,  is a tautology. Symbolically,  is logically equivalent to  is written as:
2. A logical statement is a tautology if it is always true.
3. To be valid a local argument must be a tautology. It must always be true.
4. Know the variations of the conditional statement, be able to determine their truth values and compose statements with them.
1. The converse of a conditional statement, if  then , is the statement formed by interchanging the hypothesis and conclusion. It is the statement if  then .
2. The inverse of a conditional statement if formed by negating the hypothesis and the conclusion of the conditional statement.
3. The contrapositive negates and interchanges the hypothesis and the conclusion.

4. The conditional statement is logically equivalent to the contrapositive.
5. The converse is logically equivalent to the inverse.
6. Know how to construct and use truth tables to determine whether statements are logically equivalent.


# Logic

## De Morgan’s Laws

### Learning Objectives

After completing this section, you should be able to:
1. Use De Morgan’s Laws to negate conjunctions and disjunctions.
2. Construct the negation of a conditional statement.
3. Use truth tables to evaluate De Morgan’s Laws.
The contributions to logic made by Augustus De Morgan and George Boole during the 19th century acted as a bridge to the development of computers, which may be the greatest invention of the 20th century. Boolean logic is the basis for computer science and digital electronics, and without it the technological revolution of the late 20th and early 21st centuries—including the creation of computer chips, microprocessors, and the Internet—would not have been possible. Every modern computer language uses Boolean logic statements, which are translated into commands understood by the underlying electronic circuits enabling computers to operate. But how did this logic get its name?

### Negation of Conjunctions and Disjunctions

In Chapter 1,  used a Venn diagram to prove De Morgan’s Law for set complement over union. Because the complement of a set is analogous to negation and union is analogous to an or statement, there are equivalent versions of De Morgan’s Laws for logic.
De Morgan’s Laws allow us to write the negation of conjunctions and disjunctions without using the phrase, “It is not the case that …” to indicate the parentheses. Avoiding this phrase often results in a written or verbal statement that is clearer or easier to understand.

### Negation of a Conditional Statement

The negation of any statement has the opposite truth values of the original statement. The negation of a conditional, , is the conjunction of  and not ,  Consider the truth table below for the negation of the conditional.
The only time the negation of the conditional statement is true is when  is true, and  is false. This means that  is logically equivalent to  as the following truth table demonstrates.
Many of the properties that hold true for number systems and sets also hold true for logical statements. The following table summarizes some of the most useful properties for analyzing and constructing logical arguments. These properties can be verified using a truth table.

###  Evaluating De Morgan’s Laws with Truth Tables

In Chapter 1, you learned that you could prove the validity of De Morgan’s Laws using Venn diagrams. Truth tables can also be used to prove that two statements are logically equivalent. If two statements are logically equivalent, you can use the form of the statement that is clearer or more persuasive when constructing a logical argument.
The next example will prove the validity of one of De Morgan’s Laws using a truth table. The same procedure can be applied to any two logical statement that you believe are equivalent. If the last column of the truth table is a tautology, then the two statements are logically equivalent.

### Check Your Understanding

### Key Terms

1. Boolean logic
2. negation of a conditional

### Key Concepts

1. De Morgan’s Law for the negation of a disjunction states that,  is logically equivalent to
2. De Morgan’s Law The negation of a conjunction states that,
3. Use De Morgan’s Laws to negate conjunctions and disjunctions.
4. The negation of a conditional statement, if  then  is logically equivalent to the statement  and not . Use this property to write the negation of conditional statements.
5. Use truth tables to evaluate De Morgan’s Laws.


# Logic

## Logical Arguments

### Learning Objectives

After completing this section, you should be able to:
1. Apply the law of detachment to determine the conclusion of a pair of statements.
2. Apply the law of denying the consequent to determine the conclusion for pairs of statements.
3. Apply the chain rule to determine valid conclusions for pairs of true statements.
The previous sections of this chapter provide the foundational skills for constructing and analyzing logical arguments. All logical arguments include a set of premises that support a claim or conclusion; but not all logical arguments are valid and sound. A logical argument is valid if its conclusion follows from the premises, and it is sound if it is valid and all of its premises are true. A false or deceptive argument is called a fallacy. Many types of fallacies are so common that they have been named.
This section focuses on the two main forms that logical arguments can take. While inductive arguments attempt to draw a more general conclusion from a pattern of specific premises, deductive arguments attempt to draw specific conclusions from at least one or more general premises. Deductive arguments can be proven to be valid using Venn diagrams or truth tables.
Inductive arguments generally cannot be proven to be true. They are judged as being strong or weak, but, like any opinion, whether you believe an argument is strong or weak often depends on your knowledge of the topic being discussed along with the evidence being provided in the premises. Hasty generalization is the name given to any fallacy that presents a weak inductive argument.

### Law of Detachment

The law of detachment is a valid form of a conditional argument that asserts that if both the conditional, , and the hypothesis, , are true, then the conclusion  must also be true. The law of detachment is also called affirming the hypothesis (or antecedent) and modus ponens. Symbolically, it has the form .
Looking at the truth table for the conditional statement, the only time the conditional is true is when the hypothesis  is also true. The only place this happens is in the first row, where  is also true, confirming that the law of detachment is a valid argument.
Another way to verify that the law of detachment is a valid argument is to construct a truth table for the argument  and verify that it is a tautology.
Venn diagrams may also be used to verify deductive arguments, which include conditional premises. Consider the statement  “If you play guitar, then you are a musician.” The set of guitarists is a subset of the set of musicians,  To verify that an argument is valid using a Venn diagram, draw the Venn diagram representing all the premises in the argument only, as shown in . Then verify if the conclusion is also represented by the Venn diagram of the premises. If it is, the argument is valid. If it is not, the argument is not valid. The set of guitarists is drawn as a subset of the set of musicians to represent the premise,  The  represents the premise:  is true. This completes the drawing of the premises.
Now, examine the Venn diagram to verify if the conclusion is included in the picture. The conclusion is . Because the  is in the set , and  is a subset of ,  is also in ; therefore, the law of detachment is a valid argument.

### Law of Denying the Consequent

Another form of a valid conditional argument is called the law of denying the consequent, or modus tollens. Recall, that the conditional statement, , is logically equivalent to the contrapositive,  So, if the conditional statement is true, then the contrapositive statement is also true. By the law of detachment, if  is also true, then it follows that  must also be true. Symbolically, it has the form .
To verify if the law of denying the consequent is a valid argument, construct a truth table for the argument, , and verify that it is a tautology.
To verify an argument of this form using a Venn diagram, again consider the premise:  “If you play guitar, then you are a musician.” We will change the second premise to  In this case, the  represents the premise,  So, it will be placed inside the universal set of all people, but outside the set of musicians, as depicted in the Venn diagram in .
Because the  is also outside the set of guitarists, the statement  follows from the premises and the argument is valid.

###  Chain Rule for Conditional Arguments

The chain rule for conditional arguments is another form of a valid conditional argument. It is also called hypothetical syllogism or the transitivity of implication. Recall that the conditional statement  can also be read as  implies . This is where the name transitivity of implication comes from. The transitive property for numbers states that, if  and  then it follows that  The chain rule extends this property to conditional statements. If the premises of the argument consist of two conditional statements, with the form “” and “” then it follows that  Symbolically, it has the form .
To verify the chain rule for conditional arguments, construct a truth table for the argument, , and verify that it is a tautology.
To verify an argument of this form using a Venn diagram, again consider the premise  “If you play guitar, then you are a musician,” but change the second premise to  “If you are a musician, then you are an artist.” In this case, the set  of guitarists is a subset of the set  of artists, and it follows that if you are a guitarist, then you are an artist. Therefore, the conclusion  follows from the premises and the chain rule for logical arguments is valid. See .

### Check Your Understanding

### Projects

### Logic Gates

Logic gates are the basis for all digital circuits.
1. Research and document the following terms: logic gate, OR gate, AND gate, and NOT gate.
2. Construct a diagram of a NAND gate, NOR gate, and a XOR gate by using at least two of the following gates: AND, OR, and NOT.
3. Digital electronics use a 1 for true or on, and a 0 for false or off. Create a truth table documenting all possible cases using 0s and 1s for the NAND gate, NOR gate and XOR gate.
4. Use a truth table to explain how XOR is related to the biconditional statement.

### Logical Fallacies

Fallacies are false or deceptive logical arguments.
1. Research and document the structure of five of the following named fallacies: hasty generalization, limited choice, false cause, appeal to popularity, appeal to emotion, appeal to authority, personal attack, gamblers' ruin, slippery slope, and circular reasoning.
2. Create a presentation highlighting one of the five fallacies researched in the previous question. The presentation must include an introductory slide with the title of the fallacy and the form or structure of the argument. The second slide must include an example of this fallacy as used in a commercial, a political cartoon or a current event or new article. The third slide must include an explanation of why the example on slide to is a representative example of the fallacy. The last slide must include citations for any materials used. No textbooks should be used as reference.

### Careers in Logic

Lawyers, mathematicians, and computer programmers are a few of the careers that require knowledge of logic.
1. What career are you interested in? Research how knowledge of logic applies to your chosen field of study. Then, write a cover letter for a position in your field you'd like to apply to. In the cover letter, include how your knowledge of logic qualifies you for the position you are applying for. If you do not think logic is important for your given career choice, find a position where logic is an essential element of the position and complete the project by pretending you are writing a cover letter for that job.

### Key Terms

1. sound
2. fallacy
3. deductive arguments
4. law of detachment
5. law of denying the consequent
6. chain rule for conditional arguments

### Key Concepts

1. A logical argument uses a series of facts or premises to justify a conclusion or claim. It is valid if its conclusion follows from the premises, and it is sound if it is valid, and all of its premises are true.
2. The law of detachment is a valid form of a conditional argument that asserts that if both the conditional,  is true and the hypothesis,  is true, then the conclusion  must also be true.

3. Know how to apply the law of detachment to determine the conclusion of a pair of statements.
4. The law of denying the consequent is a valid form of a conditional argument that asserts that if both the conditional,  is true and the negation of the conclusion,  is true, then the negation of the hypothesis  must also be true.

5. Know how to apply the law of denying the consequent to determine the conclusion for pairs of statements.
6. The chain rule for conditional arguments is a valid form of a conditional argument that asserts that if the premises of the argument have the form,  and , then it follows that

7. Know how to apply the chain rule to determine valid conclusions for pairs of true statements.

### Video

1. Logic Part 14: Common Argument Forms like Modus Ponens and Tollens

### Chapter Review

### Statements and Quantifiers

### Compound Statements

### Constructing Truth Tables

### Truth Tables for the Conditional and Biconditional

### Equivalent Statements

### De Morgan’s Laws

### Logical Arguments

### Chapter Test


# Real Number Systems and Number Theory

## Introduction

Encryption is used to secure online banking, for secure online shopping, and for browsing privately using VPNs (Virtual Private Networks). We need encryption (using prime numbers) for a secure exchange of information. For a prime number to be useful for encryption, though, it has to be large. Encryption uses a composite number that is the product of two very large primes. In order to break the encryption, one must determine the two primes that were used to form the composite number. If the two prime numbers used are sufficiently large, even the fastest computer cannot determine those two prime numbers in a reasonable amount of time. It would take a computer 300 trillion years to crack the current encryption standard.


# Real Number Systems and Number Theory

## Prime and Composite Numbers

After completing this section, you should be able to:
1. Apply divisibility rules.
2. Define and identify numbers that are prime or composite.
3. Find the prime factorization of composite numbers.
4. Find the greatest common divisor.
5. Use the greatest common divisor to solve application problems.
6. Find the least common multiple.
7. Use the least common multiple to solve application problems.
Encryption, which is needed for the secure exchange of information (i.e., online banking or shopping) is based on prime numbers. Encryption uses a composite number that is the product of two very large prime numbers. To break the encryption, the two primes that were used to form the composite number need to be determined. If the two prime numbers used are sufficiently large, even the fastest computer cannot determine those two prime numbers in a reasonable amount of time. It would take a computer 300 trillion years to crack the current encryption standard.

### Applying Divisibility Rules

Before we begin our investigation of divisibility, we need to know some facts about important sets of numbers:
1. The counting numbers are referred to as the natural numbers. This set of numbers, , is denoted with the symbol .
2. Another important set of numbers is the integers. The integers are the natural numbers, along with 0, and the negatives of the natural numbers. This set is often written as . We denote the integers with the symbol ℤ.
3. Notice that ℕ is a proper subset of ℤ, or, ℕ ⊂ ℤ. All the ideas of this section apply to the natural numbers, while only some apply to all the integers.
Divisibility is when the integer  is divisible by , if  can be written as  times another integer. Equivalently, there is no remainder when  is divided by . There are many occasions when separating items into equal groups comes into play to ensure an equal distribution of whole items. For example, Francis, a preschool art teacher, has 15 students in one class. Francis has 225 sheets of construction paper and wants to provide each student with an equal number of pieces. To know if he will use all the construction paper, Francis is really asking if 225 can be evenly divided into 15 groups.
You can quickly check if a number is divisible by 2, 3, 4, 5, 6, 9, 10, and 12. Each has an easy-to-identify feature, or rule, that indicates the divisibility by those numbers, as shown in the following table.

### Prime and Composite Numbers

Sometimes, a natural number has only two unique divisors, 1 and itself. For instance, 7 and 19 are prime. In other words, there is no way to divide a prime number into groups with an equal number of things, unless there is only one group, or those groups have one item per group. Other natural numbers have more than two unique divisors, such as 4, or 26. These numbers are called composite. The number 1 is special; it is neither prime nor composite.
To determine if a number is prime or composite, you have to determine if the number has any divisors other than 1 and itself. The divisibility rules are useful here, and can quickly show you if a number has a divisor on that list.
However, if none of those divide the number, you still have to check all other possible prime divisors. What are the prime numbers that are possibly divisors of the number you are checking? You need only check the prime numbers up to the square root of the number in question. For instance, if you want to know if 2,117 is prime, you need to determine if any primes up to the square root of 2,117 (which is 46.0 when rounded to one decimal place) divide 2,117. If any of those primes are divisors of the number in question, then the number is composite. If none of those primes work, then the number is itself prime.
We can check divisibility with whatever tool we wish. Divisibility rules are quick for some prime divisors (2 and 5 come to mind) but aren't quick for other values (like 11). In place of divisibility rules, we could just use a calculator. If the prime number divides the number evenly (that is, there is no decimal or fractional part), then the number is divisible by that prime.  is a quick list of the prime numbers up to 50. There are 15 prime numbers less than 50.

### Finding the Prime Factorization of Composite Numbers

Before we can start with prime factorization, let’s remind ourselves what it means to factor a number. We factor a number by identifying two (or more) numbers that, when multiplied, result in the original number. For instance, 3 and 24, when multiplied, give 72. So, 72 can be factored into . Notice that we could have factored the 72 differently, say as , or , or even as .
Finding the prime factorization of a composite number means writing the number as the product of all of its prime factors. For example, . Notice that all the numbers being multiplied on the right-hand side are prime numbers. Sometimes prime numbers repeat themselves in the factorization. When prime factors do repeat, we may write the prime factorization using exponents, as in . In that equation, the 2 is raised to the 4th power. The 4 is the exponent, and the 2 is the base. More generally, in the exponent notation , the number represented by  is the base, and the number represented by  is the exponent.
One has to wonder if finding the prime factorization could result in different factorizations. The Fundamental Theorem of Arithmetic tells us that there is only one prime factorization for a given natural number.

### Fundamental Theorem of Arithmetic

Every natural number, other than 1, can be expressed in exactly one way, apart from the arrangement, as a product of primes.
The process of finding the prime factorization of a number is iterative, which means we do a step, then repeat it until we cannot do the step any longer. The step we use is to identify one prime factor of the number, then write the number as the prime factor times another factor. We repeat this step on the other, newly found, factor. This step is repeated until no more primes can be factored from the remaining factor. This is easier to see and explain with an example.

### Factor Trees

A useful tool for helping with prime factorization is a factor tree. To create a factor tree for the natural number  (where  is not 1), perform the following steps:
Step 1: If  is prime, you're done. If  is composite, continue to the next step.
Step 2: Identify two divisors of , call them  and .
Step 3: Write the number  down, and draw two branches extending down (or to the right) of the number .
Step 4: Label the end of one branch , the other as . See .
Step 5: If  and  are prime, the tree is complete. When a number at this step is a prime number, we refer to it as a leaf of the tree diagram.
Step 6: If either  or  are composite, repeat Steps 2 through 4 for  and .
Step 7: The process stops when the leaves are all prime.
Step 8: The prime factorization is then the product of all the leaves.
This is best seen in an example.

### Finding the Greatest Common Divisor

Two numbers often have more than one divisor in common (all pairs of natural numbers have the common divisor 1). When listing the common divisors, it’s often the case that the largest is of interest. This divisor is called the greatest common divisor and is denoted GCD. It is also sometimes referred to as the greatest common factor (GCF).
For instance, 6 is the greatest common divisor of 12 and 18. We can see this by listing all the divisors of each number and, by inspection, select the largest value that shows up in each list.
It is easy to see that 6 is the largest value that appears in both lists.
Listing all the divisors of the numbers in the set will always work, but for some relatively small numbers, the set of all divisors can become pretty big, and finding them all can be a chore. Another approach to finding the greatest common divisor is to use the prime factorization of the numbers. To do so, use the following steps:
Step 1: Find the prime factorization of the numbers.
Step 2: Identify the prime factors that appear in every number’s prime factorization. These are called the common prime factors.
Step 3: Identify the smallest exponent of each prime factor identified in Step 2 in the prime factorizations.
Step 4: Multiply the prime factors identified in Step 2 raised to the powers identified in Step 3. The result is the greatest common divisor.

### Applications of the Greatest Common Divisor

The greatest common divisor has uses that are related to other mathematics (reducing fractions) but also in everyday applications. We’ll look at two such applications, which have very similar underlying structures. In each case, something must divide the groups or measurements equally.

### Finding the Least Common Multiple

The flip side to a divisor of a number is a multiple of a number. For example, 5 is a divisor of 45 and so 45 is a multiple of 5. More generally, if the number  divides the number , then  is a multiple of .
This drives the idea of the least common multiple of a set of numbers. A common multiple of a set of numbers is a multiple of each of those numbers. For instance, 45 is a common multiple of 9 and 5, because 45 is a multiple of 9 (9 divides 45) and 45 is also a multiple of 5 (5 divides 45). The least common multiple (LCM) of a set of number is the smallest positive common multiple of that set of numbers.
There are (at least) three ways to find the LCM of a set of numbers, and we will explore two of them. One way is to create a list of multiples of each number in the set, and then identify the smallest multiple that appears in those lists.
The second method we can use is to find the prime factorizations of the number in the set to build the LCM of the numbers based on the prime divisors of the numbers. The LCM can be built from the prime factorization of the numbers in the set in a similar way as when finding the greatest common divisor. Here are the steps for using the prime factorization process for finding the LCM.
Step 1: Find the prime factorization of each number.
Step 2: Identify each prime that is present in any of the prime factorizations.
Step 3: Identify the largest exponent of each prime identified in Step 2 in the prime factorizations.
Step 4:. Multiply the prime factors identified in Step 2 raised to the powers identified in Step 3.
Using lists for three or more numbers, particularly larger numbers, could take quite a bit of time. Frequently, as in this example, the prime factorization process is much quicker. In practice, you can use either listing or prime factorization to find the LCM.

### Applications of the Least Common Multiple

Some applications of LCM involve events that repeat at fixed intervals, such as visits to a location. Other applications involve getting things to be of equal magnitude when using parts that are different sizes (see , for instance). In each case, we may be looking to determine when two processes “line up.”

### Check Your Understanding

### Key Terms

1. natural numbers
2. factor of a number
3. multiple of a number
4. prime number
5. composite number
6. prime factorization
7. greatest common divisor (GCD)
8. least common multiple (LCM)

### Key Concepts

1. The natural numbers can be categorized as 1, prime numbers, and composite numbers.
2. Prime numbers have as their only factors 1 and themselves.
3. Composite numbers have at least three distinct factors.
4. Composite numbers can be written in their prime factorization form, which is found by repeatedly factoring prime factors from the number.
5. The greatest common divisor (GCD) of a set of numbers is the largest integer that divides all of the numbers in the set. The prime factorizations of the numbers can be used to identify the greatest common divisor.
6. The least common multiple (LCM) of a set of numbers is the smallest integer that is divisible by all of the numbers in the set. The prime factorizations of the numbers can be used to identify the least common multiple.
7. There are various ways that the GCD and LCM are applied.

### Videos

1. Divisibility Rules
2. Illegal Prime Number
3. Using a Factor Tree to Find the Prime Factorization
4. Finding the Prime Factorization of 168
5. Using Desmos to find the GCD
6. Applying the GCD
7. Finding the LCM
8. Using Desmos to find the LCM
9. Application of LCM


# Real Number Systems and Number Theory

## The Integers

After completing this section, you should be able to:
1. Define and identify numbers that are integers.
2. Graph integers on a number line.
3. Compare integers.
4. Compute the absolute value of an integer.
5. Add and subtract integers.
6. Multiply and divide integers.
Positive net wealth is when the total value of a person’s assets, such as their home, their 401(k), their car, and savings account balance, exceed that of their debts, such as car loans, mortgages, or credit card debt. However, when the total value of debt exceeds the total value of assets, then the person has negative net wealth. Expressing the negative net wealth as a negative number allows people to work with the positive net values and negative net values with the same mathematical processes, and in the same applications. This section introduces the integers and operations with integers.

### Defining and Identifying Integers

Extending the counting numbers to include negative numbers and zero forms the integers. Any other number that cannot be written as  is not an integer.

### Graphing Integers on a Number Line

Integers are often imagined as steps along a path. You start at 0, and going to the left is going backward, or in the negative direction, while going to the right is going forward, or in the positive direction. A number line () helps envision the integers. This also means that an integer gives magnitude (size) and direction (positive is to the right, negative is to the left). Graphing an integer on the number line means placing a solid dot at the integer on the number line.

### Comparing Integers

When determining if one quantity or size is larger than another, we know it means there is more of whatever is being discussed. In terms of positive integers, we can envision that larger integers are further to the right on the number line. This idea applies to negative integers also. This means that  when  is to the right of  on the number line. We write . When  is greater than , we can also say that . On the number line,  would be to the left of . We write .
We need to recognize that  means the same thing as . This can be seen on the number line in . On this number line,  is to the right of , so . But this means  is to the left of , so .

### The Absolute Value of an Integer

When talking about graphing integers on the number line, one interpretation suggests it is like walking along a path. Negative is going to the left of 0, and positive going to the right. If you take 30 steps to the right, you are 30 steps away from 0. On the other hand, when you take 30 steps to the left, you are still 30 steps away from 0. So, in a way, even though one is negative and the other positive, these two numbers, 30 and −30, are equal since both are 30 steps away from 0. The absolute value of an integer  is the distance from  to 0, regardless of the direction. The notation for absolute value of the integer  is .
If we think of an integer as both direction and magnitude (size), absolute value is the magnitude part.
Calculating the absolute value of an integer is very straightforward. If the integer is positive, then the absolute value of the integer is just the integer itself. If the integer is negative, then to compute the absolute value of the integer, simply remove the negative sign. Keeping in mind the number line as a path, when you’ve gone 10 steps to the left of 0, you have still taken 10 steps, and the direction does not matter.

### Adding and Subtracting Integers

You may recall having approached adding and subtracting integers using the number line from earlier in your academic life. Adding a positive integer results in moving to the right on the number line. Adding a negative integer results in moving to the left. Subtracting a positive integer results in a move to the left on the number line. But subtracting a negative integer results in a move to the right.
This leads to a few adding and subtracting rules, such as:
Rule 1: Subtracting a negative is the same as adding a positive.
Rule 2: Adding two negative integers always results in a negative integer.
Rule 3: Adding two positive integers always results in a positive integer.
Rule 4: The sign when adding integers with opposite signs is the same as the integer with the larger absolute value.
These rules are good to keep in the back of your mind, as they can serve as a quick error check when you use a calculator.
One use of negative numbers is determining net worth, which is all the weath someone owns less all that someone owes. Sometimes net worth is positive (which is good), and sometimes net worth is negative (which can be stressful).

### Multiplying and Dividing Integers

Similar to addition and subtraction, the signs of the integers impact the results when multiplying and dividing integers. The rules are fairly straightforward, but again rely on the direction on the number line. There are only two rules.
Rule 1: When multiplying or dividing two integers with the same sign, the result is positive.
Rule 2: When multiplying or dividing two integers with opposite signs, the result is negative.
Just as before, these rules can serve as a quick error check when using a calculator.
At the end of a season, a team may wish to buy their coach an end-of season gift. It makes sense to share the cost equally among the members. To do so, the team would need to find the average (or mean) cost per member. The average (or mean) of a set of numbers is the sum of the numbers divided by the number values that are being averaged.

### Check Your Understanding

### Key Terms

1. integer
2. absolute value
3. average of a set of numbers

### Key Concepts

1. A set of numbers that can be built from the natural numbers are the integers, which consist of the natural numbers, zero (0), and the negatives of the natural numbers.
2. Integers are often graphed on a number line, which helps display the relative positions and values of those numbers.
3. The number line can be used to visualize when one integer is larger than or smaller than another integer.
4. Arithmetic operations with integers are similar to the operations with natural numbers, except that the sign (positive or negative) of the numbers will determine the sign (positive or negative) of the result.

### Videos

1. Graphing Integers on the Number Line
2. Comparing Integers Using the Number Line
3. Evaluating the Absolute Value of an Integer


# Real Number Systems and Number Theory

## Order of Operations

After completing this module, you should be able to:
1. Simplify expressions using order of operations.
2. Simplify expressions using order of operations involving grouping symbols.
Calculates else sure someone be rules expect explicit we what that needs to need make, we to that them what be calculate to calculated first.
You probably read that sentence and couldn't make heads or tails of it. Seems like it might concern calculations, but maybe it concerns needs? You may even be attempting to unscramble the sentence as you read it, placing words in the order you might expect them to appear in. The reason that the sentence makes no sense is that the words don't follow the order you expect them to follow. Unscrambled, the sentence was intended to be “To be sure that someone else calculates when we expect them to calculate, we need rules that make explicit what needs to be calculated first.”
Similarly, when working with math expressions and equations, if we don't follow the rules for order of operations, arithmetic expressions make no sense. Just a simple expression would be problematic if we didn't have some rules to tell us what to calculate first. For instance,  can be calculated in many ways. You could get 5,184. Or, you could get 80. Or, 96. The issue is that without following a set of rules for calculation, the same expression will give various results. In case you are curious, using the appropriate order of operations, we find .

### Simplify Expressions Using Order of Operations

The order in which mathematical operations is performed is a convention that makes it easier for anyone to correctly calculate. They follow the acronym EMDAS:
So, what does EMDAS tell us to do? In an equation, moving left to right, we begin by calculating all the exponents first. Once the exponents have been calculated, we again move left to right, calculating the multiplications and divisions, one at a time. Multiplication and division hold the same position in the ordering, so when you encounter one or the other at this step, do it. Once the multiplications and divisions have been calculated, we again move left to right, calculating the additions and subtractions, one at a time. Additions and subtractions hold the same position in the ordering, so when you encounter one or the other at this step, do it. (You may have previously learned the order of operations as PEMDAS, with parentheses first; we will add that aspect later on.) We’ll explore this as we work an example.
Even if the expression being calculated gets more complicated, we perform the operations in the order: EMDAS.

###  Using the Order of Operations Involving Grouping Symbols

We have examined how to use the order of operations, denoted by EMDAS, to correctly calculate expressions. However, there may be expressions where a multiplication should happen before an exponent, or a subtraction before a division. To indicate an operation should be performed out of order, the operation is placed inside parentheses. When parentheses are present, the operations inside the parentheses are performed first. Adding the parentheses to our list, we now have PEMDAS, as shown below.
As said previously, parentheses indicate that some operation or operations will be performed outside the standard order of operation rules. For instance, perhaps you want to multiply 4 and 7 before squaring. To indicate that the multiplication happens before the exponent, the multiplication is placed inside parentheses: .
This means operations inside the parentheses take precedence, or happen before other operations. Now, the first step in calculating arithmetic expressions using the order of operations is to perform operations inside parentheses first. Inside the parentheses, you follow the order of operation rules EMDAS.
Be aware that there can be more than one set of parentheses, and parentheses within parentheses. When one set of parentheses is inside another set, do the innermost set first, and then work outward.

### Check Your Understanding

### Key Terms

1. order of operations
2. PEMDAS

### Key Concepts

1. Establishing shared rules on which arithmetic operations are calculated first is necessary. Without them, different people may find different values for the same expression.
2. The highest precedence is with expressions in parentheses. This allows parts of an expression to be calculated in an order different than the basic order of operations.
3. The lowest precedence is addition and subtraction, as they are the basis for all other calculations.
4. Multiplication and division have precedence over addition and subtraction, as they are representations of repeated addition or subtraction.
5. Exponents have precedence over multiplication and division, as they represent repeated multiplication and division.

### Videos

1. Order of Operations 1
2. Order of Operations 2
3. Order of Operations 3
4. Order of Operations 4


# Real Number Systems and Number Theory

## Rational Numbers

### Learning Objectives

After completing this section, you should be able to:
1. Define and identify numbers that are rational.
2. Simplify rational numbers and express in lowest terms.
3. Add and subtract rational numbers.
4. Convert between improper fractions and mixed numbers.
5. Convert rational numbers between decimal and fraction form.
6. Multiply and divide rational numbers.
7. Apply the order of operations to rational numbers to simplify expressions.
8. Apply density property of rational numbers.
9. Solve problems involving rational numbers.
10. Use fractions to convert between units.
11. Define and apply percent.
12. Solve problems using percent.
We are often presented with percentages or fractions to explain how much of a population has a certain feature. For example, the 6-year graduation rate of college students at public institutions is 57.6%, or 72/125. That fraction may be unsettling. But without the context, the percentage is hard to judge. So how does that compare to private institutions? There, the 6-year graduation rate is 65.4%, or 327/500. Comparing the percentages is straightforward, but the fractions are harder to interpret due to different denominators. For more context, historical data could be found. One study reported that the 6-year graduation rate in 1995 was 56.4%. Comparing that historical number to the recent 6-year graduation rate at public institutions of 57.6% shows that there hasn't been much change in that rate.

### Defining and Identifying Numbers That Are Rational

A rational number (called rational since it is a ratio) is just a fraction where the numerator is an integer and the denominator is a non-zero integer. As simple as that is, they can be represented in many ways. It should be noted here that any integer is a rational number. An integer, , written as a fraction of two integers is .
In its most basic representation, a rational number is an integer divided by a non-zero integer, such as . Fractions may be used to represent parts of a whole. The denominator is the total number of parts to the object, and the numerator is how many of those parts are being used or selected. So, if a pizza is cut into 8 equal pieces, each piece is  of the pizza. If you take three slices, you have  of the pizza (). Similarly, if in a group of 20 people, 5 are wearing hats, then  of the people are wearing hats ().
Another representation of rational numbers is as a mixed number, such as  (). This represents a whole number (2 in this case), plus a fraction (the ).
Rational numbers may also be expressed in decimal form; for instance, as 1.34. When 1.34 is written, the decimal part, 0.34, represents the fraction , and the number 1.34 is equal to . However, not all decimal representations are rational numbers.
A number written in decimal form where there is a last decimal digit (after a given decimal digit, all following decimal digits are 0) is a terminating decimal, as in 1.34 above. Alternately, any decimal numeral that, after a finite number of decimal digits, has digits equal to 0 for all digits following the last non-zero digit.
All numbers that can be expressed as a terminating decimal are rational. This comes from what the decimal represents. The decimal part is the fraction of the decimal part divided by the appropriate power of 10. That power of 10 is the number of decimal digits present, as for 0.34, with two decimal digits, being equal to .
Another form that is a rational number is a decimal that repeats a pattern, such as 67.1313… When a rational number is expressed in decimal form and the decimal is a repeated pattern, we use special notation to designate the part that repeats. For example, if we have the repeating decimal 4.3636…, we write this as . The bar over the 36 indicates that the 36 repeats forever.
If the decimal representation of a number does not terminate or form a repeating decimal, that number is not a rational number.
One class of numbers that is not rational is the square roots of integers or rational numbers that are not perfect squares, such as  and . More generally, the number  is the square root of the number  if . The notation for this is , where the symbol  is the square root sign. An integer perfect square is any integer that can be written as the square of another integer. A rational perfect square is any rational number that can be written as a fraction of two integers that are perfect squares.
Sometimes you may be able to identify a perfect square from memory. Another process that may be used is to factor the number into the product of an integer with itself. Or a calculator (such as Desmos) may be used to find the square root of the number. If the calculator yields an integer, the original number was a perfect square.

### Simplifying Rational Numbers and Expressing in Lowest Terms

A rational number is one way to express the division of two integers. As such, there may be multiple ways to express the same value with different rational numbers. For instance,  and  are the same value. If we enter them into a calculator, they both equal 0.8. Another way to understand this is to consider what it looks like in a figure when two fractions are equal.
In , we see that  of the rectangle and  of the rectangle are equal areas.
They are the same proportion of the area of the rectangle. The left rectangle has 5 pieces, three of which are shaded. The right rectangle has 15 pieces, 9 of which are shaded. Each of the pieces of the left rectangle was divided equally into three pieces. This was a multiplication. The numerator describing the left rectangle was 3 but it becomes , or 9, as each piece was divided into three. Similarly, the denominator describing the left rectangle was 5, but became , or 15, as each piece was divided into 3. The fractions  and  are equivalent because they represent the same portion (often loosely referred to as equal).
This understanding of equivalent fractions is very useful for conceptualization, but it isn’t practical, in general, for determining when two fractions are equivalent. Generally, to determine if the two fractions  and  are equivalent, we check to see that . If those two products are equal, then the fractions are equal also.
That  indicates the fractions  and  are equivalent is due to some algebra. One property of natural numbers, integers, and rational numbers (also irrational numbers) is that for any three numbers  and  with , if , then . In other words, when two numbers are equal, then dividing both numbers by the same non-zero number, the two newly obtained numbers are also equal. We can apply that to  and , to show that  and  are equivalent if .
If , and , we can divide both sides by and obtain the following: . We can divide out the  on the right-hand side of the equation, resulting in . Similarly, we can divide both sides of the equation by  and obtain the following: . We can divide out  the on the left-hand side of the equation, resulting in . So, the rational numbers  and  are equivalent when .
Recall that a common divisor or common factor of a set of integers is one that divides all the numbers of the set of numbers being considered. In a fraction, when the numerator and denominator have a common divisor, that common divisor can be divided out. This is often called canceling the common factors or, more colloquially, as canceling.
To show this, consider the fraction . The numerator and denominator have the common factor 3. We can rewrite the fraction as . The common divisor 3 is then divided out, or canceled, and we can write the fraction as . The 3s have been crossed out to indicate they have been divided out. The process of dividing out two factors is also referred to as reducing the fraction.
If the numerator and denominator have no common positive divisors other than 1, then the rational number is in lowest terms.
The process of dividing out common divisors of the numerator and denominator of a fraction is called reducing the fraction.
One way to reduce a fraction to lowest terms is to determine the GCD of the numerator and denominator and divide out the GCD. Another way is to divide out common divisors until the numerator and denominator have no more common factors.

### Adding and Subtracting Rational Numbers

Adding or subtracting rational numbers can be done with a calculator, which often returns a decimal representation, or by finding a common denominator for the rational numbers being added or subtracted.
Performing addition and subtraction without a calculator may be more involved. When the two rational numbers have a common denominator, then adding or subtracting the two numbers is straightforward. Add or subtract the numerators, and then place that value in the numerator and the common denominator in the denominator. Symbolically, we write this as . This can be seen in the , which shows .
It is customary to then write the result in lowest terms.
When the rational numbers do not have common denominators, then we have to transform the rational numbers so that they do have common denominators. The common denominator that reduces work later in the problem is the LCM of the numerator and denominator. When adding or subtracting the rational numbers  and , we perform the following steps.
Step 1: Find .
Step 2: Calculate  and .
Step 3: Multiply the numerator and denominator of  by , yielding .
Step 4: Multiply the numerator and denominator of  by , yielding .
Step 5: Add or subtract the rational numbers from Steps 3 and 4, since they now have the common denominators.
You should be aware that the common denominator is . For the first denominator, we have , since we multiply and divide  by the same number. For the same reason, .

### Converting Between Improper Fractions and Mixed Numbers

One way to visualize a fraction is as parts of a whole, as in  of a pizza. But when the numerator is larger than the denominator, as in , then the idea of parts of a whole seems not to make sense. Such a fraction is an improper fraction. That kind of fraction could be written as an integer plus a fraction, which is a mixed number. The fraction  rewritten as a mixed number would be . Arithmetically,  is equivalent to , which is read as “one and 11 twelfths.”
Improper fractions can be rewritten as mixed numbers using division and remainders. To find the mixed number representation of an improper fraction, divide the numerator by the denominator. The quotient is the integer part, and the remainder becomes the numerator of the remaining fraction.
Similarly, we can convert a mixed number into an improper fraction. To do so, first convert the whole number part to a fraction by writing the whole number as itself divided by 1, and then add the two fractions.
Alternately, we can multiply the whole number part and the denominator of the fractional part. Next, add that product to the numerator. Finally, express the number as that product divided by the denominator.

### Converting Rational Numbers Between Decimal and Fraction Forms

Understanding what decimals represent is needed before addressing conversions between the fractional form of a number and its decimal form, or writing a number in decimal notation. The decimal number 4.557 is equal to . The decimal portion, .557, is 557 divided by 1,000. To write any decimal portion of a number expressed as a terminating decimal, divide the decimal number by 10 raised to the power equal to the number of decimal digits. Since there were three decimal digits in 4.557, we divided 557 by .
Decimal representations may be very long. It is convenient to round off the decimal form of the number to a certain number of decimal digits. To round off the decimal form of a number to  (decimal) digits, examine the ()st decimal digit. If that digit is 0, 1, 2, 3, or 4, the number is rounded off by writing the number to the th decimal digit and no further. If the ()st decimal digit is 5, 6, 7, 8, or 9, the number is rounded off by writing the number to the th digit, then replacing the th digit by one more than the th digit.
To convert a rational number in fraction form to decimal form, use your calculator to perform the division.
Converting a terminating decimal to the fractional form may be done in the following way:
Step 1: Count the number of digits in the decimal part of the number, labeled .
Step 2: Raise 10 to the th power.
Step 3: Rewrite the number without the decimal.
Step 4: The fractional form is the number from Step 3 divided by the result from Step 2.
This process works due to what decimals represent and how we work with mixed numbers. For example, we could convert the number 7.4536 to fractional from. The decimal part of the number, the .4536 part of 7.4536, has four digits. By the definition of decimal notation, the decimal portion represents . The decimal number 7.4536 is equal to the improper fraction . Adding those to fractions yields .
The process is different when converting from the decimal form of a rational number into fraction form when the decimal form is a repeating decimal. This process is not covered in this text.

### Multiplying and Dividing Rational Numbers

Multiplying rational numbers is less complicated than adding or subtracting rational numbers, as there is no need to find common denominators. To multiply rational numbers, multiply the numerators, then multiply the denominators, and write the numerator product divided by the denominator product. Symbolically, . As always, rational numbers should be reduced to lowest terms.
As with multiplication, division of rational numbers can be done using a calculator.
Before discussing division of fractions without a calculator, we should look at the reciprocal of a number. The reciprocal of a number is 1 divided by the number. For a fraction, the reciprocal is the fraction formed by switching the numerator and denominator. For the fraction , the reciprocal is . An important feature for a number and its reciprocal is that their product is 1.
When dividing two fractions by hand, find the reciprocal of the divisor (the number that is being divided into the other number). Next, replace the divisor by its reciprocal and change the division into multiplication. Then, perform the multiplication. Symbolically,. As before, reduce to lowest terms.

### Applying the Order of Operations to Simplify Expressions

The order of operations for rational numbers is the same as for integers, as discussed in Order of Operations. The order of operations makes it easier for anyone to correctly calculate and represent. The order follows the well-known acronym PEMDAS:
The first step in calculating using the order of operations is to perform operations inside the parentheses. Moving down the list, next perform all exponent operations moving from left to right. Next (left to right once more), perform all multiplications and divisions. Finally, perform the additions and subtractions.

### Applying the Density Property of Rational Numbers

Between any two rational numbers, there is another rational number. This is called the density property of the rational numbers.
Finding a rational number between any two rational numbers is very straightforward.
Step 1: Add the two rational numbers.
Step 2: Divide that result by 2.
The result is always a rational number. This follows what we know about rational numbers. If two fractions are added, then the result is a fraction. Also, when a fraction is divided by a fraction (and 2 is a fraction), then we get another fraction. This two-step process will give a rational number, provided the first two numbers were rational.

### Solving Problems Involving Rational Numbers

Rational numbers are used in many situations, sometimes to express a portion of a whole, other times as an expression of a ratio between two quantities. For the sciences, converting between units is done using rational numbers, as when converting between gallons and cubic inches. In chemistry, mixing a solution with a given concentration of a chemical per unit volume can be solved with rational numbers. In demographics, rational numbers are used to describe the distribution of the population. In dietetics, rational numbers are used to express the appropriate amount of a given ingredient to include in a recipe. As discussed, the application of rational numbers crosses many disciplines.

### Using Fractions to Convert Between Units

A common application of fractions is called unit conversion, or converting units, which is the process of changing from the units used in making a measurement to different units of measurement.
For instance, 1 inch is (approximately) equal to 2.54 cm. To convert between units, the two equivalent values are made into a fraction. To convert from the first type of unit to the second type, the fraction has the second unit as the numerator, and the first unit as the denominator.
From the inches and centimeters example, to change from inches to centimeters, we use the fraction . If, on the other hand, we wanted to convert from centimeters to inches, we’d use the fraction . This fraction is multiplied by the number of units of the type you are converting from, which means the units of the denominator are the same as the units being multiplied.

### Defining and Applying Percent

A percent is a specific rational number and is literally per 100.  percent, denoted %, is the fraction .
You should notice that you can simply move the decimal two places to the left without using the fractional definition of percent.
Percent is used to indicate a fraction of a total. If we want to find 30% of 90, we would perform a multiplication, with 30% written in either decimal form or fractional form. The 90 is the total, 30 is the percentage, and 27 (which is
    ) is the percentage of the total.
In the previous situation, we knew the total and we found the percentage of the total. It may be that we know the percentage of the total, and we know the percent, but we don't know the total. To find the total if we know the percentage the percentage of the total, use the following formula.
The percentage can be found if the total and the percentage of the total is known. If you know the total, and the percentage of the total, first divide the part by the total. Move the decimal two places to the right and append the symbol %. The percentage may be found using the following formula.

### Solve Problems Using Percent

In the media, in research, and in casual conversation percentages are used frequently to express proportions. Understanding how to use percent is vital to consuming media and understanding numbers. Solving problems using percentages comes down to identifying which of the three components of a percentage you are given, the total, the percentage, or the percentage of the total. If you have two of those components, you can find the third using the methods outlined previously.

### Check Your Understanding

### Key Terms

1. density property of rational numbers
2. improper fraction
3. lowest terms
4. mixed number
5. rational number
6. repeating decimal
7. terminating decimal

### Key Concepts

1. Rational numbers are fractions of integers, and can always be written as an integer divided by an integer.
2. The numerator and denominator of a fraction may have common factors. In such cases, the fraction can be reduced by canceling common factors. When the numerator and denominator of a fraction have no common factors, the fraction is said to be reduced.
3. An improper fraction is one with a numerator larger than the denominator. Such a fraction can be rewritten as an integer plus a proper fraction. This is called a mixed number.
4. Using division and remainder, an improper fraction may be written as a mixed number.
5. A mixed number can be converted to an improper fraction by reversing the process for changing an improper fraction to a mixed number.
6. The arithmetic operations or addition, subtraction, multiplication and division can all be performed on rational numbers.
7. Addition and subtraction of rational numbers can be performed after a common denominator has been identified, and the fractions have been converted to forms having the common denominator.
8. Multiplication and division of rational numbers can be performed without regard to common denominators.
9. Between any two rational numbers, there is always another rational number. This is the density property of the rational numbers.

### Formulas

1.
2.
3.

### Videos

1. Introduction to Fractions
2. Equivalent Fractions
3. Reducing Fractions to Lowest Terms
4. Using Desmos to Reduce a Fraction
5. Adding and Subtracting Fractions with Different Denominators
6. Converting an Improper Fraction to a Mixed Number Using Desmos
7. Multiplying Fractions
8. Dividing Fractions
9. Order of Operations Using Fractions
10. Finding a Fraction of a Total
11. Converting Units