Fractions — Computation Rules
Given a number, , and a nonnegative number, , we can form a fraction, . In order for fractions to be useful, we need to be able to compute with them. That means we need to be able to add them, multiply them, and compare them with each other.
Adding
In general, . In the special case where , we have the much simpler .
Negating
In general, .
Subtracting
In general, . So, the prodecure for subtracting fractions is simply the procedure for negating followed by the procedure for adding.
Multiplying
In general, . Typically, multiplication is written without a ⋅ symbol, but I include it here for emphasis.
Reciprocating
In general, . Of course, in order for this to make sense, additionally require that .
Dividing
In general, . So, the procedure for dividing fractions is simply the procedure for reciprocating followed by the procedure for multiplying.
Comparing
Whenever you have a collection of numbers that are, in some sense, ordered, it is important to ask how to compute whether or not two of them are equal or less than one another, etc.
For instance, are the following two fractions equal? If not, which is bigger?
,
We will see how to find the answer below:
Equality — Canonical Form
Clearly, if you see two expression that look exactly the same, then they are equal. So, that is a sufficient condition for equality of fractions. However, it is not a necessary condition, since , but they are different expressions–they look different.
The reason why this is possible is because fractions are an example of something called a “quotient structure” in mathematics. In general, quotient structures redefine equality, in a sense, so that things that aren’t really equal are regarded as being equal. This is useful for “ignoring inessential details”.
We introduce something called a canonical form in order to facilitate the computation to determine whether or not two fractions are, in fact, equal. The canonical form of a fraction is essentially just “fully simplified”, but there’s a bit more to it in general (to handle cases with negatives and square-roots, etc.). To compute the canonical form of a fraction, follow the procedure:
- Put the denominator in simplest form, possibly altering the numerator.
- Find and cancel all common factors.
- Rewrite the numerator to be in simplest form (without altering the denominator).
Do this for both fractions you want to compare for equality; if they look the same, they are equal–if not, they are unequal.
Order
The method here is to find a common denominator. If you have fractions and , the common denominator will be . Moreover, we will have: and .
Therefore, it suffices to compare with . Note that is a divisor of and also of . So, and are not really fractions (even though they appear to be).
Bonus: Euclid’s Algorithm — Computing the GCD of Big Numbers!
These procedures require the ability to compute the GCD of large numbers. In order to acheive this for large numbers, you need an efficient procedure. Luckily, Euclid found one 2000 years ago. For the sake of simplicity, we will assume that numbers are positive in the following.
The best way to learn algorithms is to grok them by example:
Example: gcd(62318, 12602)
The idea is to iteratively compute the remainder by division. Here is the how you use the Euclidean Algorithm to compute gcd(62318, 12602):
62318 = 4 * 12602 + 11910
12602 = 1 * 11910 + 692
11910 = 17 * 692 + 146
692 = 4 * 146 + 108
146 = 1 * 108 + 38
108 = 2 * 38 + 32
38 = 1 * 32 + 6
32 = 5 * 6 + 2
6 = 3 * 2 + 0
2
Therefore, gcd(62318, 12602) = 2.
Explanation
The reason why the algorithm works is because of two important facts about the gcd:
-
For all n, gcd(n, 0) = n. This is because anything times 0 is 0; everything is a divisor of 0. Since the greatest divisor of n is clearly n (assuming n is positive), the greatest common divisor of n and 0 is n, as desired.
-
For all a and b, gcd(a, b - a) = gcd(a, b) = gcd(a - b, b).
To understand why this is true, let’s just focus one of the claims (since the other one is symmetrical). Namely, let’s understand why gcd(a, b - a) = gcd(a, b).
In order to understand this, let’s take a second to appreciate the content of this claim: “The number gcd(a, b - a) is the greatest common divisor of a and b.” So, if we can show that:
- gcd(a, b - a) is, in fact, a common divisor of a and b, and
- Any common divisor of a and b divides gcd(a, b - a), so that gcd(a, b - a) is not less than any divisor,
then we will have shown that gcd(a, b - a) = gcd(a, b). Now, let’s do it:
- By definition, gcd(a, b - a) is a common divisor of a and b - a. So, it remains to show that it is a divisor of b. To see this, notice that b = a + (b - a). But both a and (b - a) are multiples of gcd(a, b - a). And so, b must be a multiple of gcd(a, b - a). In other words, gcd(a, b - a) is a divisor of b, as desired.
- Suppose that c is come common divisor of a and b. In other words, a and b are both multiples of c. Well, then b - a is also a multiple of c. Thus, since gcd(a, b - a) is the greatest common divisor of a and b - a, we must have that c is a divisor of gcd(a, b - a). In particular, gcd(a, b - a) is the greatest common divisor of a and b, as desired.
Program
This program will feed you problems to drill your technique computing with fractions. From the drop-down menu, select the kind of problem you would like to receive. Then, fill in the fields and click submit to receive feedback.