# Max function is continuous and concave-convex?

Let $A \subset \mathbb{R}^n$ and $M \subset \mathbb{R}^{n \times m}$ be discrete sets of cardinality $N \geq 1$.

Consider the function $f: \mathbb{R}^n \times \mathbb{R}^m \rightarrow \mathbb{R}$ defined as

$$f(x,y) := \max_{(a,B) \in A \times M} x^\top (a + B y).$$

Say if $f$ is continuous in $(x,y)$, concave in the first argument $x$ and convex in the second argument $y$.

Note that it does for $N=1$ (i.e. when $A$ and $M$ just have a single element) because $f$ would be continuous and affine (i.e. both concave and convex) both in $x$ (for fixed $y$) and in $y$ (for fixed $x$).

-

The max of finitely many continuous functions is continuous. The max of convex functions is convex. Thus $f$ is coninuous and convex in both $x$ and $y$, but is is in general not concave in any of them: With $n=m=1$, $A=M=\{-1, 1\}$, you have $f(x,y) = \max\{x+xy,y-xy, -x+xy,-x-xy\}=|x|\cdot(1+|y|)$.