I know that an analogous result for convex function is proved here. But my question is about using a specific method to proceed. Here is the question:
Poblem
Prove that a function of $n$ variables is concave if and only if the set below its graph in $\mathbb{R}^{\mathbf{n+1}}$ is a convex set. Prove this statement for functions of one variable first. Then apply the following theorem for the case of $n$ variables.
Theorem$\quad$ Let $f$ be a function defined on a convex subset $U$ of $\mathbb{R}^{\mathbf{n}}$. Then, $f$ is concave if and only if its restriction to every line segment in $U$ is a concave function of one variable.
My Question
I do not have problem proving the statement for functions of one variable (see My Attempt below). But I am not sure how to apply the above theorem for the case of functions of $n$ variables. Could someone please help me with this? Basically, how to formally and rigorously extend the proof of the statement from functions of one variable to $n$ variables? Thanks a lot in advance!
My Attempt
Here is what I have so far:
Proof$\quad$ We first prove that a function of one variable $f$ is concave if and only if the set on or below its graph in $\mathbb{R}^2$ is a convex set. Suppose that $f$ is concave, and that $(x_1,y_1)$ and $(x_2,y_2)$ lie in the set on or below its graph $G$; that is, $f(x_1) \geq y_1$ and $f(x_2) \geq y_2$. Any point on the line segment $L$ joining these two points can be represented by $(tx_2 + (1-t)x_1, ty_2 + (1-t)y_1)$, where $t \in [0,1]$. Since $f$ is concave, we have \begin{align*} f(tx_2 + (1-t)x_1) \geq tf(x_2) + (1-t)f(x_1) \geq ty_2 + (1-t)y_1. \end{align*} Thus, the segment $L$ lies in the set on or below $G$. Hence, the set on or below $G$ is convex.
Conversely, suppose the set on or below $G$ is convex, and that $(x_1,f(x_1))$ and $(x_2,f(x_2))$ are in this set. Then, for all $t \in [0,1]$, the point $(tx_1 + (1-t)x_2, tf(x_1) + (1-t)f(x_2))$ is also in this set. Thus, \begin{align*} tf(x_1) + (1-t)f(x_2) \leq f(tx_1 + (1-t)x_2). \end{align*} So, $f$ is concave.
Now, let $f$ be a function defined on a convex subset $U$ of $\mathbb{R}^{\mathbf{n}}$. $\dots$ (This is where I got stuck.)