I'm reviewing a proof which assumes, without justification, that if $f$ is convex in $R^n$ then at any point $x \in R^n$ one can find a tangential line $g$ that is linear in $R^n$ such that $g(x) = f(x)$ and $g(y) \leq f(y)$ for all $y \in R^n$.
I know this to be true, but I'm not sure how to prove it. Using the definition of a convex function we have that for any $x,y \in R^n$ and $a \in [0,1]$,
$$f(ax + (1-a)y) \leq af(x) + (1-a)f(y)$$
But how does this translate into being able to find such a tangential line? In one dimensional $R$ it seems "obvious" if you simply imagine a one dimensional convex graph, but even then I'm unsure how to prove it based on this definition.
For any convex function you can define the subgradient $ \partial f (x) $ by
$$ \partial f(x_0) = \{ a \in \mathbb{R}^n | f(x) \ge <a,x-x_0> + f(x_0) \forall x \in \mathbb{R}^n \} $$
Showing the existence of a tangent line with the desired property is equivilent to show that $ \partial f(x) \neq \emptyset $. This is usually done by using Hahn-Banach-Separation Theorem.
Therefore note that $ f $ is convex iff $ epi(f) = \{ (x,y) | x \in \mathbb{R}^n \wedge f(x) \le y \} $ is convex. Now fix $ x \in \mathbb{R}^n $. By Hahn Banach Theorem there exists a vector $ A \neq 0 $ with
$$ <A,(x,f(x))> \le <A,z> \forall z \in epi(f) $$
Now write $ A = (a_1,a_2) $. Then you have for $ y \in \mathbb{R}^n $ and $ f(y) \le z $
$$ <a_1,x> + a_2 f(x) \le <a_1,y> + a_2 z $$
Choosing $ y = x $ and $ z = f(x) + 1 $ you get $ a_2 \ge 0 $. And $ a_2 \neq 0 $ because you can choose $ v \in \mathbb{R}^n $ with $ <a_1,v> > 0 $ and you would get a contradiction by choosing $ y = x + v $ and assuming $ a_2 = 0 $.
So you can define $ a^* = \frac{1}{a_2} a_1 $ and get
$$ <a^*,x-y> + f(x) \le f(y) \forall y \in \mathbb{R}^n $$
But this yields $ -a^* \in \partial f(x) $ which implies the existence of a tangent line $ g $ with $ g \le f $ by defining $ g(y) = <-a^*,y-x> + f(x) $