In algebra, a fraction consists of one quantity divided by another quantity. The fraction "three divided by four" or "three over four" or "three fourths" can be written as

or 3 ÷ 4
or 3/4

In this article, we will use the latter notation. Other typical fractions include -2/7 and (x+1)/(x-1). The first quantity, the number "on top of the fraction", is called the numerator, and the other number is called the denominator. The denominator can never be zero. A fraction consisting of two integers is called a rational number.

Several rules for the calculation with fractions are useful:

Cancelling. If both the numerator and the denominator of a fraction are multiplied or divided by the same number, then the fraction does not change its value. For instance, 4/6 = 2/3 and 1/x = x / x2.

Adding fractions. To add or subtract two fractions, you first need to change the two fractions so that they have a common denominator; then you can add or subtract the numerators. For instance, 2/3 + 1/4 = 8/12 + 3/12 = 11/12.

Multiplying fractions. To multiply two fractions, multiply the numerators to get the new numerator, and multiply the denominators to get the new denominator. For instance, 2/3 × 1/4 = (2×1) / (3× 4) = 2 / 12 = 1 / 6.

Dividing fractions. To divide one fraction by another one, flip numerator and denominator of the second one, and then multiply the two fractions. For instance, (2/3) / (4/5) = 2/3 × 5/4 = (2×5) / (3×4) = 10/12 = 5/6.

In abstract algebra, these rules can be proved to hold in any field. Furthermore, if one starts with any integral domain Q, one can always construct a field consisting of all fractions of elements of Q, the field of fractions of Q.