Fractions — Computation Rules

Given a number, x , and a nonnegative number, y , we can form a fraction, x y . 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, a b + c d = a d + b c bd . In the special case where b = d , we have the much simpler a b + c b = a + c b .

Negating

In general, - a b = - a b .

Subtracting

In general, x - y = x + ( - y ) . So, the prodecure for subtracting fractions is simply the procedure for negating followed by the procedure for adding.

Multiplying

In general, a b c d = a c b d . Typically, multiplication is written without a ⋅ symbol, but I include it here for emphasis.

Reciprocating

In general, ( a b ) -1 = b a . Of course, in order for this to make sense, additionally require that a 0 .

Dividing

In general, x / y = x y -1 . 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?

22 7 , 104348 33215

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 1 2 = 2 4 , 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:

  1. Put the denominator in simplest form, possibly altering the numerator.
  2. Find and cancel all common factors.
  3. 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 a b and c d , the common denominator will be lcm ( b , d ) . Moreover, we will have: a b = ( d gcd ( b , d ) ) a lcm ( b , d ) and c d = ( b gcd ( b , d ) ) c lcm ( b , d ) .

Therefore, it suffices to compare ( b gcd ( b , d ) ) c with ( d gcd ( b , d ) ) a . Note that gcd ( b , d ) is a divisor of b and also of d . So, d gcd ( b , d ) and b gcd ( b , d ) 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:

  1. 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.

  2. 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:

    1. gcd(a, b - a) is, in fact, a common divisor of a and b, and
    2. 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:

    1. 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.
    2. 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.


Answer in Canonical Form: