Definition:Mediant

Let $$r, s \in \Q$$, i.e. let $$r, s$$ be rational numbers.

Let $$r$$ and $$s$$ be expressed as $$r = \frac a b, s = \frac c d$$ where $$a, b, c, d$$ are integers such that $$b > 0, d > 0$$ (this is always possible by Divided By a Positive in Quotient Field).

Then the mediant of $$r$$ and $$s$$ is $$\frac {a + c} {b + d}$$.

Note
The mediant of two rational numbers depends on the fractional expressions used. For example, $$\frac 2 4 = \frac 3 6$$, but $$\frac{1 + 2}{1 + 4} = \frac 3 5 \neq \frac 4 7 = \frac{1 + 3}{1 + 6}$$.

Therefore it is most common to refer to the mediant of two fractions. Sometimes, the mediant of two rational numbers refers to the mediant of the lowest terms representations of the numbers, and sometimes it can refer the mediant of any fractional expression of the numbers. Care should be taken to make clear which meaning is being used.