Mediant (mathematics)

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 (nonzero denominator), considered as ordered pairs of appropriate integers, a priori disregarding the perspective on rational numbers as equivalence classes of fractions.

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.

In fact, mediants commonly occur in the study of continued fractions and in particular, Farey fractions.

The nth Farey sequence Fn is defined as the (ordered with respect to magnitude) sequence of reduced fractions a/b (with coprime a, b) such that b ≤ n. If two fractions a/c < b/d are adjacent (neighbouring) fractions in a segment of Fn then the determinant relation

mentioned above is generally valid and therefore the mediant is the simplest fraction in the interval (a/c, b/d), in the sense of being the fraction with the smallest denominator.

Thus the mediant will then (first) appear in the (c + d)th Farey sequence and is the "next" fraction which is inserted in any Farey sequence between a/c and b/d.

This gives the rule how the Farey sequences Fn are successively built up with increasing n. 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.

A positive rational number is one in the form

are positive natural numbers; i.e.

The set of positive rational numbers

represents the rational number

, and the slope of a segment connecting the origin of coordinates to this point is

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.

are two representations of (possibly equivalent) rational numbers

The line segments connecting the origin of coordinates to

form two adjacent sides in a parallelogram.

The vertex of the parallelogram opposite to the origin of coordinates is the point

, which is also the magnitude of the cross product of vectors

It follows from the formal definition of rational number equivalence that the area is zero if

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.

[2] The notion of mediant can be generalized to n fractions, and a generalized mediant inequality holds,[3] a fact that seems to have been first noticed by Cauchy.

More precisely, the weighted mediant

lies somewhere between the smallest and the largest fraction among the

Determining the mediant of two rational numbers graphically. The slopes of the blue and red segments are two rational numbers; the slope of the green segment is their mediant.