# Is the function argmin continuous?

Let $X$ and $Y$ be topological spaces, and $f:X\times Y\rightarrow \mathbb{R}$ be continuous.

Now lets define the function $g:Y\rightarrow X$ as follows: $$g(y)=\underset{x}{\operatorname{argmin}}f(x,y)$$

1. If $g(y)$ is a point of $X$ for all $y\in Y$, is $g$ continuous?
2. If $g(y)$ is a non-empty compact set of $X$ for all $y\in Y$, is the graph of $g$ closed?

If not, which is a counterexample?, and which assumptions do I need to have continuity/closed graph.

• For a lot of examples your function $g$ is not well-defined. It might be useful to assume compactness of $X$, for example. (Counterexample: $f \colon \mathbb{R} \times \mathbb{R} \rightarrow \mathbb{R}, ~f(x,y) = y$.) Commented Jun 18, 2018 at 15:18
• I know the function might not be well-defined, that is why my first question is assuming $g(y)$ is always a point, otherwhise, $g$ is a point-to-set mapping. Commented Jun 18, 2018 at 15:24
• This is not a rigorous answer but given that any version of the Implicit Function Theorem I know requires at least some sort of local injectivity, I find it hard to belive that your $g$ will be continuous without quite a few additional assumptions (i.e. $g$ is the implicit function for $f(x,y) - \min_x f(x,y)$, and reuqiring $g$ to be as in your point 1 requires $f(\cdot,y)$ to have (unique) minima near which $f(\cdot,y)$ will not be locally injective). Commented Jun 18, 2018 at 15:32
• I think what you are describing is the case when $f(x,y)$ has a unique minimum point $x^*$ for any $y$, that is what I mean with $g(y)$ beeing a point. Commented Jun 18, 2018 at 15:36

For the first question you might consider the case $X = Y = \mathbb{R}$ and $f(x, y) = (xy - 1)^2 (x^2 + y^2)$. This gives $g(y) = \frac{1}{y}$ for $y \ne 0$ and $g(0) = 0$, which clearly is not continuous at $0$.
However, the graph of $g$ is closed without any assumptions of $g(y)$, just because $f$ is continuous. To see that this is true, it suffices to show that for arbitrary $y \in Y$ and $x \in X \setminus g(y)$ there is a neighbourhood of $(x, y)$ that does not meet this graph.
Since $x \notin g(y)$ there is an $m \in X$ such that $f(m, y) < f(x, y)$. Put $z = \frac12 f(m, y) + \frac12 f(x, y)$. By continuity of $f$ there is a neighbourhood $V$ of $y$ such that $f(m, v) < z$ for all $v \in V$. It follows that $f(u, v) < z$ whenever $(u, v)$ is a point on the graph of $g$ with $v \in V$.
Again by continuity of $f$, there is a neighbourhood $U$ of $(x, y)$ such that $f(u, v) > z$ for all $(u, v) \in U$. But then $U \cap (X \times V)$ is a neighbourhood of $(x, y)$ that does not contain any point of the graph.
• What if I add the assumption that $f$ is convex in $X\times Y$, then, would it be possible to show that $g$ is continuous? or the weaker assumption that $f(x,y)$ is convex over $X$ for any $y\in Y$ Commented Jun 28, 2018 at 0:54