Commonfractions can be positive or negative, and they can be proper or improper (see below). Compound fractions, complex fractions, mixed numerals, and decimals (see below) are not common fractions; though, unless irrational, they can be evaluated to a common fraction.
Common fractions can be classified as either proper or improper. When the numerator and the denominator are both positive, the fraction is called proper if the numerator is less than the denominator, and improper otherwise.[11] The concept of an "improper fraction" is a late development, with the terminology deriving from the fact that "fraction" means "a piece", so a proper fraction must be less than 1.[10] This was explained in the 17th century textbook The Ground of Arts.[12][13]
A ratio is a relationship between two or more numbers that can be sometimes expressed as a fraction. Typically, a number of items are grouped and compared in a ratio, specifying numerically the relationship between each group. Ratios are expressed as "group 1 to group 2 ... to group n". For example, if a car lot had 12 vehicles, of which
Whether common fractions or decimal fractions are used is often a matter of taste and context. Common fractions are used most often when the denominator is relatively small. By mental calculation, it is easier to multiply 16 by 3/16 than to do the same calculation using the fraction's decimal equivalent (0.1875). And it is more accurate to multiply 15 by 1/3, for example, than it is to multiply 15 by any decimal approximation of one third. Monetary values are commonly expressed as decimal fractions with denominator 100, i.e., with two decimals, for example $3.75. However, as noted above, in pre-decimal British currency, shillings and pence were often given the form (but not the meaning) of a fraction, as, for example, "3/6" (read "three and six") meaning 3 shillings and 6 pence, and having no relationship to the fraction 3/6.
Nevertheless, "complex fraction" and "compound fraction" may both be considered outdated[24] and now used in no well-defined manner, partly even taken synonymously for each other[25] or for mixed numerals.[26] They have lost their meaning as technical terms and the attributes "complex" and "compound" tend to be used in their every day meaning of "consisting of parts".
If one takes for c the greatest common divisor of the numerator and the denominator, one gets the equivalent fraction whose numerator and denominator have the lowest absolute values. One says that the fraction has been reduced to its lowest terms.
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:
To add fractions containing unlike quantities (e.g. quarters and thirds), it is necessary to convert all amounts to like quantities. It is easy to work out the chosen type of fraction to convert to; simply multiply together the two denominators (bottom number) of each fraction. In case of an integer number apply the invisible denominator 1.
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 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 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.
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.
A conventional way to indicate a repeating decimal is to place a bar (known as a vinculum) over the digits that repeat, for example 0.789 = 0.789789789... For repeating patterns that begin immediately after the decimal point, the result of the conversion is the fraction with the pattern as a numerator, and the same number of nines as a denominator. For example:
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:
is an equivalence relation of fractions. Each fraction from one equivalence class may be considered as a representative for the whole class, and each whole class may be considered as one abstract fraction. This equivalence is preserved by the above defined operations, i.e., the results of operating on fractions are independent of the selection of representatives from their equivalence class. Formally, for addition of fractions
A fraction may also contain radicals in the numerator or the denominator. If the denominator contains radicals, it can be helpful to rationalize it (compare Simplified form of a radical expression), especially if further operations, such as adding or comparing that fraction to another, are to be carried out. It is also more convenient if division is to be done manually. When the denominator is a monomial square root, it can be rationalized by multiplying both the top and the bottom of the fraction by the denominator:
The process of rationalization of binomial denominators involves multiplying the top and the bottom of a fraction by the conjugate of the denominator so that the denominator becomes a rational number. For example:
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.
While the Persian mathematician Jamshīd al-Kāshī claimed to have discovered decimal fractions himself in the 15th century, J. Lennart Berggren notes that he was mistaken, as decimal fractions were first used five centuries before him by the Baghdadi mathematician Abu'l-Hasan al-Uqlidisi as early as the 10th century.[41][n 2]
In primary schools, fractions have been demonstrated through Cuisenaire rods, Fraction Bars, fraction strips, fraction circles, paper (for folding or cutting), pattern blocks, pie-shaped pieces, plastic rectangles, grid paper, dot paper, geoboards, counters and computer software.
The first version requires that numerator and denominator are instancesof numbers.Rational and returns a new Fraction instancewith value numerator/denominator. If denominator is 0, itraises a ZeroDivisionError. The second version requires thatother_fraction is an instance of numbers.Rational and returns aFraction instance with the same value. The next two versions accepteither a float or a decimal.Decimal instance, and return aFraction instance with exactly the same value. Note that due to theusual issues with binary floating point (see Floating-Point Arithmetic: Issues and Limitations), theargument to Fraction(1.1) is not exactly equal to 11/10, and soFraction(1.1) does not return Fraction(11, 10) as one might expect.(But see the documentation for the limit_denominator() method below.)The last version of the constructor expects a string or unicode instance.The usual form for this instance is:
The Fraction class inherits from the abstract base classnumbers.Rational, and implements all of the methods andoperations from that class. Fraction instances are hashable,and should be treated as immutable. In addition,Fraction has the following properties and methods:
Changed in version 3.9: The math.gcd() function is now used to normalize the numeratorand denominator. math.gcd() always returns an int type.Previously, the GCD type depended on numerator and denominator.
The first version returns the nearest int to self,rounding half to even. The second version rounds self to thenearest multiple of Fraction(1, 10**ndigits) (logically, ifndigits is negative), again rounding half toward even. Thismethod can also be accessed through the round() function.
 3a8082e126