# Convex extensibility of combination of two lines

This may be too easy, but:

Is there a function $f$ on the first quadrant of $\mathbb R^2$ such that $$f(x,1)=x,\qquad f(x,0)=0,$$ and $f$ is convex or concave?

Note there is no solution of the form $f(x,y)=x\cdot g(y)$, since (i) $-f$ is convex iff $f$ is concave, and (ii) the Hessian is $$H=\left( \begin{matrix} 0& g'(y) \\ g'(y)&x\cdot g''(y) \end{matrix} \right)$$ which is positive semi-definite only if $$-(g'(y))^2\ge 0$$ which would mean $g(y)$ is constant.

-

## 2 Answers

There is; for example, the following function is concave: $f(x,0)=0, f(x,y)=x$ for $y>0$.

-
Nice. Any thoughts on whether there is a continuous one? – Bjørn Kjos-Hanssen Mar 22 '14 at 6:21
No, such function cannot be continuous at points $(x,0)$ for $x>0$. To see this, consider (in 3D) the segments connecting $(0,0,0)$ with $(x,1,x)$. They pointwise approach the line formed by the points $(x,0,x)$, and they must lie below the graph of $f$. An analogous argument also shows that there is no convex function solving the question. – Jan Kyncl Mar 22 '14 at 6:28
Oh, I see... but this seems to make crucial use of the fact that we can extend lines to infinity, which actually in my intended application we can't. – Bjørn Kjos-Hanssen Mar 22 '14 at 7:00
If instead of the lines we have only two segments of finite length, then it seems both convex and concave continuous functions exist: the function must only go below or above the tetrahedron which is a convex hull of the two segments. – Jan Kyncl Mar 22 '14 at 17:56

No. Assume $f$ concave and consider $(1,y)\to (1,1)$. Placing this point to a line segment starting at $(0,1)$ and ending in the $x$-axis, you must have $f(1,y)\le0$. On the other hand, $f(1,y)\to f(1,1)=1$. The same would work for convex, considering $(1,y)\to(1,0)$ and segments starting at $(0,0)$ and ending in the line $y=1$.

-