Marginal Product and Average product
Here is a simple explanation for a single input and output technology represented by a production function $f:\mathbb{R} \to \mathbb{R}$.

Note that Average Product (AP) is defined as 
$$
AP(x) = \frac{f(x)}{x}
$$
, and Marginal Product (MP) is defined as
$$
MP(x) = \frac{\partial f(x)}{\partial x} = f'(x)
$$

Now, we take the derivative of the function $AP(x)$, and then we have
$$
\frac{\partial AP(x)}{\partial x} = \frac{f'(x)x-f(x)}{x^2}
\\
= \frac{1}{x}\bigg[f'(x)-\frac{f(x)}{x}\bigg]
\\
= \frac{1}{x}[MP(x)-AP(x)]
$$

Since $x$ indicates the level of the input, $x&gt;0$, and thus we have,
$$
\frac{\partial AP(x)}{\partial x} &gt; 0 \iff MP(x)&gt;AP(x)
$$
, or 
$$
\frac{\partial AP(x)}{\partial x} &lt; 0 \iff MP(x)&lt;AP(x)
$$