In mathematics, the mediant of two fractions, generally made up of four positive integers That is to say, the numerator and denominator of the mediant are the sums of the numerators and denominators of the given fractions, respectively. It is sometimes called the freshman sum, as it is a common mistake in the early stages of learning about addition of fractions. Technically, this is a binary operation on valid fractions, considered as ordered pairs of appropriate integers, a priori disregarding the perspective on rational numbers as equivalence classes of fractions. For example, the mediant of the fractions 1/1 and 1/2 is 2/3. However, if the fraction 1/1 is replaced by the fraction 2/2, which is an equivalent fraction denoting the same rational number 1, the mediant of the fractions 2/2 and 1/2 is 3/4. For a stronger connection to rational numbers the fractions may be required to be reduced to lowest terms, thereby selecting unique representatives from the respective equivalence classes. The Stern-Brocot tree provides an enumeration of all positive rational numbers via mediants in lowest terms, obtained purely by iterative computation of the mediant according to a simple algorithm.
Properties
The mediant inequality: An important property of the mediant is that it lies strictly between the two fractions of which it is the mediant: If and, then
Assume that the pair of fractions a/c and b/d satisfies the determinant relation. Then the mediant has the property that it is the simplest fraction in the interval, in the sense of being the fraction with the smallest denominator. More precisely, if the fraction with positive denominator c' lies between a/c and b/d, then its numerator and denominator can be written as and with two positive real numbers. To see why the must be positive note that
The converse is also true: assume that the pair of reduced fractions a/c < b/d has the property that the reduced fraction with smallest denominator lying in the interval is equal to the mediant of the two fractions. Then the determinant relation bc − ad = 1 holds. This fact may be deduced e.g. with the help of Pick's theorem which expresses the area of a plane triangle whose vertices have integer coordinates in terms of the number vinterior of lattice points inside the triangle and the number vboundary of lattice points on the boundary of the triangle. Consider the triangle with the three vertices v1 =, v2 =, v3 =. Its area is equal to
Relatedly, if p/q and r/s are reduced fractions on the unit interval such that |ps − rq| = 1 then
Graphical determination of mediants
A positive rational number is one in the form where are positive natural numbers; i.e.. The set of positive rational numbers is, therefore, the Cartesian product of by itself; i.e.. A point with coordinates represents the rational number, and the slope of a segment connecting the origin of coordinates to this point is. Since are not required to be coprime, point represents one and only one rational number, but a rational number is represented by more than one point; e.g. are all representations of the rational number. This is a slight modification of the formal definition of rational numbers, restricting them to positive values, and flipping the order of the terms in the ordered pair so that the slope of the segment becomes equal to the rational number. Two points where are two representations of rational numbers and. The line segments connecting the origin of coordinates to and form two adjacent sides in a parallelogram. The vertex of the parallelogram opposite to the origin of coordinates is the point, which is the mediant of and. The area of the parallelogram is, which is also the magnitude of the cross product of vectors and. It follows from the formal definition of rational number equivalence that the area is zero if and are equivalent. In this case, one segment coincides with the other, since their slopes are equal. The area of the parallelogram formed by two consecutive rational numbers in the Stern-Brocot tree is always 1.
Generalization
The notion of mediant can be generalized to n fractions, and a generalized mediant inequality holds, a fact that seems to have been first noticed by Cauchy. More precisely, the weighted mediant of n fractions is defined by . It can be shown that lies somewhere between the smallest and the largest fraction among the.