Fraction

In Unicode, precomposed fraction characters are in the Number Forms block.

then the ratio of red to white to yellow cars is 6 to 2 to 4. The ratio of yellow cars to white cars is 4 to 2 and may be expressed as 4:2 or 2:1.

If, in a complex fraction, there is no unique way to tell which fraction lines takes precedence, then this expression is improperly formed, because of ambiguity. So 5/10/20/40 is not a valid mathematical expression, because of multiple possible interpretations, e.g. as

The Euclidean algorithm gives a method for finding the greatest common divisor of any two integers.

Comparing fractions with the same positive denominator yields the same result as comparing the numerators:

If the equal denominators are negative, then the opposite result of comparing the numerators holds for the fractions:

If two positive fractions have the same numerator, then the fraction with the smaller denominator is the larger number. When a whole is divided into equal pieces, if fewer equal pieces are needed to make up the whole, then each piece must be larger. When two positive fractions have the same numerator, they represent the same number of parts, but in the fraction with the smaller denominator, the parts are larger.

Because every negative number, including negative fractions, is less than zero, and every positive number, including positive fractions, is greater than zero, it follows that any negative fraction is less than any positive fraction. This allows, together with the above rules, to compare all possible fractions.

The first rule of addition is that only like quantities can be added; for example, various quantities of quarters. Unlike quantities, such as adding thirds to quarters, must first be converted to like quantities as described below: Imagine a pocket containing two quarters, and another pocket containing three quarters; in total, there are five quarters. Since four quarters is equivalent to one (dollar), this can be represented as follows:

For adding quarters to thirds, both types of fraction are converted to twelfths, thus:

The smallest possible denominator is given by the least common multiple of the single denominators, which results from dividing the rote multiple by all common factors of the single denominators. This is called the least common denominator.

The process for subtracting fractions is, in essence, the same as that of adding them: find a common denominator, and change each fraction to an equivalent fraction with the chosen common denominator. The resulting fraction will have that denominator, and its numerator will be the result of subtracting the numerators of the original fractions. For instance,

To multiply fractions, multiply the numerators and multiply the denominators. Thus:

To explain the process, consider one third of one quarter. Using the example of a cake, if three small slices of equal size make up a quarter, and four quarters make up a whole, twelve of these small, equal slices make up a whole. Therefore, a third of a quarter is a twelfth. Now consider the numerators. The first fraction, two thirds, is twice as large as one third. Since one third of a quarter is one twelfth, two thirds of a quarter is two twelfth. The second fraction, three quarters, is three times as large as one quarter, so two thirds of three quarters is three times as large as two thirds of one quarter. Thus two thirds times three quarters is six twelfths.

A short cut for multiplying fractions is called "cancellation". Effectively the answer is reduced to lowest terms during multiplication. For example:

A two is a common factor in both the numerator of the left fraction and the denominator of the right and is divided out of both. Three is a common factor of the left denominator and right numerator and is divided out of both.

Since a whole number can be rewritten as itself divided by 1, normal fraction multiplication rules can still apply.

This method works because the fraction 6/1 means six equal parts, each one of which is a whole.

Decimal numbers, while arguably more useful to work with when performing calculations, sometimes lack the precision that common fractions have. Sometimes an infinite repeating decimal is required to reach the same precision. Thus, it is often useful to convert repeating decimals into fractions.

If a non-repeating set of decimals precede the pattern (such as 0.1523987), one may write the number as the sum of the non-repeating and repeating parts, respectively:

Then, convert both parts to fractions, and add them using the methods described above:

These definitions agree in every case with the definitions given above; only the notation is different. Alternatively, instead of defining subtraction and division as operations, the "inverse" fractions with respect to addition and multiplication might be defined as:

Even if this process results in the numerator being irrational, like in the examples above, the process may still facilitate subsequent manipulations by reducing the number of irrationals one has to work with in the denominator.