Why difference quotient of convex functions increases in both variables

Let $f: \mathbb R \rightarrow \mathbb R$ be a convex function and $$g(x,y)=\frac{f(x)-f(y)}{x-y} \textrm{ for } x\neq y.$$ I wish to prove that $g$ is increasing function in both variables.

Thanks

-
Hint: If $a<b<c$, then $g(a,c)$ is a convex combination of $g(a,b)$ and $g(b,c)$. Second hint: $g(x,y)=g(y,x)$. – Hagen von Eitzen Jul 6 '13 at 11:32
I understand hints but don't know how to prove to prove that: if $x<x', y<y'$ and $x \neq y,x' \neq y'$ then $g(x,y) \leq g(x',y')$. – Richard Jul 6 '13 at 12:08
@Richard Prove $g(x,y)\leq g(x',y)\leq g(x',y')$ – S.B. Jul 6 '13 at 12:41
Thanks. Now I understand. – Richard Jul 6 '13 at 12:51

Fix $y_2 > y_1 > x$ and define $$\phi(y) = \frac{f(y) - f(x)}{y - x}$$ Then noticing that there is some $0 < t < 1$ such that $y_1 = (1-t)x + ty_2$ by convexity we have that $$\phi(y_1) = \frac{f(y_1) - f(x)}{y_1 - x} = \frac{f((1-t)x + ty_2) - f(x)}{(1-t)x + ty_2- x} \leq \frac{(1-t)f(x) + tf(y_2) - f(x)}{(1-t)x + ty_2 - x} = \frac{t(f(y_2)-f(x))}{t(y_2 - x)} = \phi(y_2)$$ You can get all the other cases in a similar fashion.