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 (possibly equivalent) 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 (with ). It can be shown that lies somewhere between the smallest and the largest fraction among the . See also Mediant Farey sequence Stern–Brocot tree References External links Mediant Fractions at cut-the-knot MATHPAGES, Kevin Brown: Generalized Mediant Fractions (mathematics) Elementary arithmetic Operations on numbers