The sum, the difference and the product of two rational numbers are rational, and so is the quotient when the divisor is not 0. This lesson proves these facts from the formulas for quotients of integers, computes with rational numbers written as fractions, mixed numbers and decimals together, follows the order of operations, and explains why a decimal on a calculator may only approximate a rational number that fraction arithmetic gives exactly.
Closed under the four operations
This lesson relies on the lessons What a rational number is and Rational numbers on the number line, on the arithmetic of fractions (Fractions 3.3, 4.1, 4.5), and above all on Arithmetic with signed fractions, which proved the formulas for sums, differences, products and quotients with integer numerators and positive denominators. It also uses Decimals 1.2 and 3.1–3.3, and the order of operations of Integers 3.5.
Rational numbers are added, subtracted, multiplied and divided exactly as fractions are.[1] The formulas hold with any nonzero denominators, positive or negative:
For integers a, b, c and d with b ≠ 0 and d ≠ 0,
ab + cd = a × d + b × cb × d,
ab − cd = a × d − b × cb × d,
ab × cd = a × cb × d,
and, if c ≠ 0, ab ÷ cd = a × db × c.
Let x = ab and y = cd. By the definition of the quotient (lesson Negative fractions), x × b = a and y × d = c. Let N = b × d, which is not 0 because a product of nonzero integers is not 0 (|b × d| = |b| × |d|, Integers 3.3). The laws of multiplication of the lesson Arithmetic with signed fractions (the commutative, associative and distributive laws) give
(x + y) × N = (x × b) × d + (y × d) × b = a × d + c × b, and (x × y) × N = (x × b) × (y × d) = a × c.
By the Theorem on dividing signed fractions (lesson Negative fractions), exactly one number gives a × d + b × c when multiplied by N, namely their quotient; so x + y = a × d + b × cb × d, and in the same way x × y = a × cb × d. For the difference, x − y = x + (−y), and −y = −cd (lesson 1.2), so the sum formula gives the numerator a × d + b × (−c) = a × d − b × c.
For the quotient, let c ≠ 0. Then y ≠ 0 and b × c ≠ 0. Let q = a × db × c, so that q × (b × c) = a × d. By the laws of multiplication, (q × y) × N = (q × b) × (y × d) = (q × b) × c = q × (b × c) = a × d, and also x × N = (x × b) × d = a × d. Two numbers that give the same product with N ≠ 0 are equal, by the same Theorem; so q × y = x, which says that q = x ÷ y.
These are the rules for combining fractions,[2] now without any condition on the signs. The lesson Arithmetic with signed fractions proved them for positive denominators. The results need not be in lowest terms,[3] so an answer is usually simplified at the end (lesson 1.1).
If x and y are rational numbers, then x + y, x − y and x × y are rational numbers, and if y ≠ 0, so is x ÷ y.
Write x = ab and y = cd with integers, b ≠ 0 and d ≠ 0. In the four formulas the numerators a × d + b × c, a × d − b × c, a × c and a × d are integers, because sums, differences and products of integers are integers (the unit Integers). The denominator b × d is not 0. If y ≠ 0, then c ≠ 0, since cd = 0 only when c = 0; so b × c ≠ 0 too. Each result is therefore a quotient of integers with a nonzero denominator: a rational number.
Rosen proves the case of the sum in exactly this way, with the common denominator q × u,[4] and leaves the product as an exercise.[5] For quotients of integers, the Common Core standards state that every quotient of integers with a non-zero divisor is a rational number.[6]
A collection of numbers is closed under an operation if the operation, applied to any two numbers of the collection (for which it is defined), always gives a number of the collection.[7]
So ℚ is closed under addition, subtraction, multiplication, and division by numbers other than 0. Bolzano’s theory of the rational numbers was in fact a theory of collections of numbers closed under the four operations.[8] The table compares ℚ with ℕ and ℤ: the natural numbers are not closed under subtraction (Integers 2.4), and the integers are not closed under division (Integers 3.4). Division by 0 is excluded everywhere: it is undefined (Division 1.3).
| Always inside? | + | − | × | ÷ (not by 0) |
|---|---|---|---|---|
| ℕ | yes | no: 2 − 5 = −3 | yes | no: 2 ÷ 5 = 25 |
| ℤ | yes | yes | yes | no: (−2) ÷ 5 = −25 |
| ℚ | yes | yes | yes | yes |
The laws that these operations obey, such as the commutative, associative and distributive laws, are collected in the next lesson, Properties of rational arithmetic (lesson 1.4 of this unit).
Compute 5−6 + 74.
- With a = 5, b = −6, c = 7, d = 4: 5 × 4 + (−6) × 7(−6) × 4 = 20 − 42−24 = −22−24.
- Two negative signs: −22−24 = 2224 = 1112.
Answer: 1112. Check with positive denominators: −1012 + 2112 = 1112.
Compute () × 9−14 and () ÷ 9−14.
- Product: (−7) × 93 × (−14) = −63−42 = 6342 = 32 (dividing by 21).
- Quotient: (−7) × (−14)3 × 9 = 9827, already in lowest terms (98 = 2 × 7 × 7 and 27 = 3 × 3 × 3).
Answer: 32 and 9827. Check the quotient: 9827 × 9−14 = 882−378 = , since 882 = 7 × 126 and 378 = 3 × 126.
- For every rational x = ab, x − x = 0, a rational number: the difference formula gives a × b − b × ab × b = 0b × b.
- 0 ÷ () = 0 × 91 × (−2) = 0.
- () ÷ 0 is undefined: the formula would need b × c = 9 × 0 = 0 as a denominator.
- 1 ÷ 3 = 13 is not an integer, though 1 and 3 are; it is rational.
Answer: 0, 0, undefined, and a rational number that is not an integer.
Someone computes () + 12 as −3 + 14 + 2 = −26 = .
- Denominators are not added. By the formula: (−3) × 2 + 4 × 14 × 2 = −6 + 48 = −28 = .
- Check with decimals: −0.75 + 0.5 = −0.25.
Answer: , not .
Fractions and decimals together
A calculation may contain both fractions and decimals. To add a fraction and a decimal, either the fraction is converted to a decimal or the decimal to a fraction.[9] Every terminating decimal is a fraction with denominator 10, 100, 1,000, … (Decimals 1.2), but a fraction is a terminating decimal only when its denominator in lowest terms has no prime factor other than 2 and 5 (Decimals 3.2). So:
- when every number involved is a terminating decimal, either way gives the exact value;
- when some fraction has a repeating decimal, such as 23, convert the decimals to fractions; a rounded decimal would change the value.
Compute 0.35 + ().
- With decimals: 38 = 0.375, so 0.35 + (−0.375) = −(0.375 − 0.35) = −0.025.
- With fractions: 0.35 = 720; 720 − 38 = 1440 − 1540 = −140.
Answer: −0.025 = −140. Both numbers are terminating decimals, so both ways are exact.
Compute 23 − 0.25.
- 23 = 0. never ends, so convert the decimal: 0.25 = 14.
- 23 − 14 = 812 − 312 = 512.
Answer: 512 = 0.41. Using 0.67 for 23 would give 0.42, which is not the value.
Compute −1.6 × 512 and ÷ (−0.75).
- −1.6 = −1610 = −85, and −85 × 512 = −4060 = −23.
- = 94 (lesson Mixed numbers) and −0.75 = −34; 94 ÷ −34 = 9 × 44 × (−3) = 36−12 = −3.
Answer: and −3. The first has no terminating decimal, so the fraction is the exact answer.
Someone computes 0. + (−0.5) as 0.333 − 0.5 = −0.167 and calls it exact.
- 0. = 39 = 13 (lesson Repeating decimals), and −0.5 = −12.
- 13 − 12 = 26 − 36 = = −0.1.
Answer: . The value −0.167 is close to it, but it is a different number: −0.167 = −1671000.
The order of operations
Expressions with rational numbers follow the order of operations of the unit Order of Operations (The order of operations as a convention) and of Integers 3.5: first simplify inside the parentheses or other grouping symbols, the innermost first;[10] then perform all multiplication and division from left to right;[11] then all addition and subtraction from left to right.[12] The same order applies to decimals,[13] and to fractions and decimals mixed. A fraction bar is a grouping symbol: the numerator and the denominator of a complex fraction are simplified first, then divided (lesson Complex fractions).[14]
Evaluate 0.5 − 34 × ().
- The multiplication first: 34 × () = −612 = .
- Then 0.5 − () = 12 + 12 = 1.
Answer: 1. Working from left to right would give (0.5 − 0.75) × () = () × () = 16, a different number.
Evaluate (−1.2 + 13) ÷ 25.
- Inside the parentheses: −1.2 = −65, and −65 + 13 = −18 + 515 = −1315.
- Then −1315 ÷ 25 = (−13) × 515 × 2 = −6530 = −136.
Answer: = −.
Simplify .
- Numerator: 34 − 24 = 14. Denominator: 26 − 36 = .
- Divide: 14 ÷ () = 1 × 64 × (−1) = 6−4 = .
Answer: . The denominator is not 0, so the division is defined.
Someone evaluates −2.4 ÷ 35 × 14 by doing the multiplication first: 35 × 14 = 320, then −2.4 ÷ 320 = −16.
- Multiplication and division have equal rank and go from left to right.
- −2.4 = −125, and −125 ÷ 35 = (−12) × 55 × 3 = −4.
- Then (−4) × 14 = −1.
Answer: −1, not −16.
Exact answers
- Round
- 1
- Score
- 0
- Streak
- 0
Find the exact value. Type it as a fraction, an integer, a mixed number, or a decimal if the decimal ends (a minus sign may be typed as -).
Exact values and decimal approximations
A calculator shows a decimal with a fixed number of places. For many rational numbers no such decimal is equal to the number.
Let pq be a rational number in lowest terms with q > 0, and suppose q has a prime factor other than 2 and 5. Then no decimal with finitely many places is equal to pq.
A decimal with k places is ND, with D the 1 followed by k zeros (Decimals 1.2), and its opposite is −ND. By the Proposition of Decimals 1.2, the lowest-terms denominator of such a number has no prime factor other than 2 and 5. Two equal rational numbers have the same name in lowest terms (lesson 1.1), so their denominators would agree, and q does have another prime factor.
The fraction 13 can be approximated by 0.3, better by 0.33, better still by 0.333, but by the Theorem, since 3 is a prime other than 2 and 5, no matter how many digits are written down the result is never exactly 13; the lesson Repeating decimals showed it for 0.333. A decimal on a screen is then a different rational number, close to the value. How close is known: the decimal obtained by cutting off the long division after k places is less than one unit of the k-th place below the value (lesson Fractions to decimals), and rounding to k places errs by at most half a unit (lesson Rounding decimals). Fraction arithmetic, in contrast, gives the value itself. Programs that must be exact work in the same way: the fractions module of the programming language Python provides rational number arithmetic,[15] and keeps each number as a numerator and a positive denominator in lowest terms.[16]
- 23 = 0. rounds to 0.667 at three places (lesson Rounding decimals), and 0.667 = 6671000.
- 6671000 − 23 = 2001 − 20003000 = 13000.
Answer: 0.667 is 13000 more than 23, less than half a thousandth, as rounding promises and as the figure shows.
Compute 13 + 13 + 13 exactly and with 0.333 for each term.
- Exactly: 33 = 1.
- With the cut-offs: 0.333 + 0.333 + 0.333 = 0.999.
- Each term was 13000 too small, so the sum is 3 × 13000 = 11000 too small: 1 − 0.999 = 0.001.
Answer: 1 exactly; the decimal sum misses it by 0.001, three times the error of each term.
Find 7 × 13 to the nearest hundredth, first exactly and then by rounding 13 to 0.33 first.
- Exactly: 7 × 13 = 73 = 2., which rounds to 2.33.
- With 0.33 first: 7 × 0.33 = 2.31.
Answer: 2.33. Rounding first changed the hundredths digit: the error of 0.33, 1300, was multiplied by 7.
A display shows 1 ÷ 7 as 0.142857, and someone concludes that 17 = 0.142857. Decide it.
- 0.142857 = 142,8571,000,000. By the equality test, it equals 17 only if 142,857 × 7 = 1,000,000 × 1.
- But 142,857 × 7 = 999,999. So they are not equal.
- 7 is a prime other than 2 and 5, so by the Theorem no finite decimal equals 17. Its decimal repeats: 0. (lesson Repeating decimals).
Answer: 17 − 0.142857 = 1,000,000 − 999,9997,000,000 = 17,000,000: very small, but not 0.
The last lesson of this part, Between any two rationals there is another (lesson 1.5), shows that between two different rational numbers there is always a third, however close the two are.
Exercises
Compute: (a) 4−9 + 56; (b) (−0.8) × 15−4; (c) () ÷ (−0.25).
▸ Show solution
(a) 4 × 6 + (−9) × 5(−9) × 6 = 24 − 45−54 = −21−54 = 718. Check: −818 + 1518 = 718. (b) −0.8 = −45; (−4) × 155 × (−4) = −60−20 = 3. (c) −0.25 = −14; (−5) × 412 × (−1) = −20−12 = 53.
Give the exact value: (a) 16 + 0.75; (b) 0.4 − .
▸ Show solution
(a) 0.75 = 34; 212 + 912 = 1112, whose decimal 0.91 never ends. (b) 0.4 = 25 and = 73; 615 − 3515 = −2915.
Evaluate −0.3 + 12 × (−1.4).
▸ Show solution
The product first: 12 × (−1.4) = 12 × −75 = −710. Then −0.3 + (−710) = −310 + −710 = −1010 = −1.
Simplify .
▸ Show solution
Numerator: 520 − 1220 = −720. Denominator: −710 + 210 = −510 = −12. Quotient: −720 ÷ −12 = (−7) × 220 × (−1) = −14−20 = 710 = 0.7.
0.67 is 23 rounded to hundredths. Find exactly how far it is from 23, and on which side.
▸ Show solution
0.67 − 23 = 67100 − 23 = 201 − 200300 = 1300. So 0.67 is 1300 too large, less than half a hundredth, as rounding to two places promises.
Prove that the average x + y2 of two rational numbers x and y is rational.
▸ Show solution
By the closure Theorem, x + y is rational, and 2 is rational and not 0, so (x + y) ÷ 2 is rational. In terms of the formulas: if x = ab and y = cd, then x + y2 = a × d + b × c2 × b × d, a quotient of integers with a nonzero denominator.
Show that ℤ is not closed under division by nonzero integers. Then show that the positive rational numbers are closed under addition, multiplication and division, but not under subtraction.
▸ Show solution
ℤ is not closed under division: 2 and 3 are integers, but 2 ÷ 3 = 23 lies between 0 and 1, so it is not an integer.
Let x = ab and y = cd be positive, with a, b, c, d counting numbers (lesson 1.1). Then x + y = a × d + b × cb × d, x × y = a × cb × d and x ÷ y = a × db × c have positive numerators and denominators, so they are positive. But 13 − 12 = is not positive: the positive rational numbers are not closed under subtraction.
Summary
- For integers with b ≠ 0 and d ≠ 0: ab ± cd = a × d ± b × cb × d, ab × cd = a × cb × d, and for c ≠ 0, ab ÷ cd = a × db × c, whatever the signs of the denominators.
- ℚ is closed under addition, subtraction, multiplication, and division by a number other than 0; ℕ is not closed under subtraction, and ℤ is not closed under division.
- Fractions and decimals mix freely. When some number has a repeating decimal, work with fractions to keep the value exact.
- The order of operations is unchanged: grouping symbols (fraction bars included) first, then multiplication and division from left to right, then addition and subtraction from left to right.
- A rational number whose lowest-terms denominator has a prime factor other than 2 and 5 equals no finite decimal. A calculator’s decimal is then a nearby, different rational number; fraction arithmetic gives the value itself.
Sources
- 1.Eric W. Weisstein, “Rational Number”, MathWorld, a Wolfram Web Resource.Section “Rational Number”. mathworld.wolfram.com/RationalNumber.html · open at the quoted passage.
“The elementary algebraic operations for combining rational numbers are exactly the same as for combining fractions.”
Used for: rational numbers are added, subtracted, multiplied and divided exactly as fractions are. - 2.Eric W. Weisstein, “Fraction”, MathWorld, a Wolfram Web Resource.Section “Fraction”. mathworld.wolfram.com/Fraction.html · open at the quoted passage.
“The rules for the algebraic combination of fractions are given by”
Used for: the four formulas, a/b ± c/d = (ad ± bc)/(bd), a/b × c/d = (ac)/(bd) and a/b ÷ c/d = (ad)/(bc), are the rules for combining fractions (the page gives them as formulas after these words). - 3.Eric W. Weisstein, “Fraction”, MathWorld, a Wolfram Web Resource.Section “Fraction”. mathworld.wolfram.com/Fraction.html · open at the quoted passage.
“Note however that the above results will not necessarily be reduced fractions.”
Used for: the results of the formulas need not be in lowest terms. - 4.Kenneth H. Rosen, Discrete Mathematics and Its Applications (8th ed., McGraw-Hill, 2019).Chapter 1, “The Foundations: Logic and Proofs”, section 1.7, “Introduction to Proofs” (1.7.6, “Proof by Contraposition”), Example 8, p. 90 (the whole topic: pp. 89–90).
“We have proved that the sum of two rational numbers is rational;”
Used for: the sum of two rational numbers is rational, proved by writing both over the common denominator qu (Example 8, pp. 89–90). - 5.Kenneth H. Rosen, Discrete Mathematics and Its Applications (8th ed., McGraw-Hill, 2019).Chapter 1, “The Foundations: Logic and Proofs”, section 1.7, “Introduction to Proofs”, Exercises, p. 95 (the whole topic: pp. 95).
“Use a direct proof to show that the product of two rational numbers is rational.”
Used for: the product of two rational numbers is rational (left as an exercise by Rosen). - 6.“The Number System, Grade 7”, Common Core State Standards Initiative (National Governors Association and Council of Chief State School Officers).Section “Apply and extend previous understandings of operations with fractions (CCSS.Math.Content.7.NS.A.2.b)”. thecorestandards.org/Math/Content/7/NS · open at the quoted passage.
“every quotient of integers (with non-zero divisor) is a rational number.”
Used for: every quotient of integers with a nonzero divisor is a rational number. - 7.David S. Dummit and Richard M. Foote, Abstract Algebra (3rd ed., John Wiley & Sons, 2004).Chapter 1, “Introduction to Groups”, section 1.1, “Basic Axioms and Examples”, p. 16 (the whole topic: pp. 16).
“then H is said to be closed under”
Used for: the term “closed”: a collection is closed under an operation when the operation applied to any two of its members gives a member (the sentence: “If the restriction of ⋆ to H is a binary operation on H, i.e., for all a, b ∈ H, a ⋆ b ∈ H, then H is said to be closed under ⋆”). - 8.H.-D. Ebbinghaus et al., Numbers (trans. H. L. S. Orde, Springer (Graduate Texts in Mathematics 123), 1991).Chapter 1, “Natural Numbers, Integers, and Rational Numbers” (K. Mainzer), section §4, “The Rational Numbers”, 1, “Historical”, p. 22 (the whole topic: pp. 22–23).
“developed a theory of rational numbers, and in fact a theory of those sets of numbers that are closed with respect to the four elementary”
Used for: Bolzano’s first theory of the rational numbers studied collections of numbers closed under the four operations (the sentence ends “arithmetic operations”). - 9.Lynn Marecek, MaryAnne Anthony-Smith and Andrea Honeycutt Mathis, Prealgebra (2nd ed., OpenStax, Rice University, 2020).Chapter 5, “Decimals”, section 5.3, “Decimals and Fractions” (“Convert Fractions to Decimals”), p. 404 (the whole topic: pp. 401–406).
“It is useful to convert between fractions and decimals when we need to add or subtract numbers in different forms. To add a fraction and a decimal, for example, we would need to either convert the fraction to a decimal or the decimal to a fraction.”
Used for: to combine a fraction and a decimal, convert the fraction to a decimal or the decimal to a fraction. - 10.Lynn Marecek, MaryAnne Anthony-Smith and Andrea Honeycutt Mathis, Prealgebra (2nd ed., OpenStax, Rice University, 2020).Chapter 2, “The Language of Algebra”, section 2.1, “Use the Language of Algebra” (“Simplify Expressions Using the Order of Operations”), p. 105 (the whole topic: pp. 105–106).
“Simplify all expressions inside the parentheses or other grouping symbols, working on the innermost parentheses first.”
Used for: first simplify inside the grouping symbols, the innermost first. - 11.Lynn Marecek, MaryAnne Anthony-Smith and Andrea Honeycutt Mathis, Prealgebra (2nd ed., OpenStax, Rice University, 2020).Chapter 2, “The Language of Algebra”, section 2.1, “Use the Language of Algebra” (“Simplify Expressions Using the Order of Operations”), p. 105 (the whole topic: pp. 105–106).
“Perform all multiplication and division in order from left to right.”
Used for: then all multiplications and divisions from left to right. - 12.Lynn Marecek, MaryAnne Anthony-Smith and Andrea Honeycutt Mathis, Prealgebra (2nd ed., OpenStax, Rice University, 2020).Chapter 2, “The Language of Algebra”, section 2.1, “Use the Language of Algebra” (“Simplify Expressions Using the Order of Operations”), p. 105 (the whole topic: pp. 105–106).
“Perform all addition and subtraction in order from left to right.”
Used for: then all additions and subtractions from left to right. - 13.Lynn Marecek, MaryAnne Anthony-Smith and Andrea Honeycutt Mathis, Prealgebra (2nd ed., OpenStax, Rice University, 2020).Chapter 5, “Decimals”, section 5.3, “Decimals and Fractions” (“Simplify Expressions Using the Order of Operations”), p. 406 (the whole topic: pp. 406–407).
“The order of operations introduced in Use the Language of Algebra also applies to decimals.”
Used for: the same order of operations applies to decimals. - 14.Lynn Marecek, MaryAnne Anthony-Smith and Andrea Honeycutt Mathis, Prealgebra (2nd ed., OpenStax, Rice University, 2020).Chapter 4, “Fractions”, section 4.5, “Add and Subtract Fractions with Different Denominators” (“Use the Order of Operations to Simplify Complex Fractions”), p. 323 (the whole topic: pp. 323–324).
“To follow the order of operations, we simplify the numerator and denominator separately first. Then we divide the numerator by the denominator.”
Used for: the numerator and the denominator of a complex fraction are simplified first, then divided. - 15.“fractions — Rational numbers”, The Python Standard Library, Python documentation (Python Software Foundation).Section “fractions — Rational numbers”. docs.python.org/3/library/fractions.html · open at the quoted passage.
“The fractions module provides support for rational number arithmetic.”
Used for: Python’s fractions module provides rational number arithmetic (a statement about Python’s own behavior). - 16.“fractions — Rational numbers”, The Python Standard Library, Python documentation (Python Software Foundation).Section “class fractions.Fraction, denominator”. docs.python.org/3/library/fractions.html · open at the quoted passage.
“Denominator of the Fraction in lowest terms.”
Used for: Python keeps each number as a numerator and a positive denominator in lowest terms (the entry goes on: “Guaranteed to be positive.”; the entry above it: “Numerator of the Fraction in lowest term.”).