# When $\min_{x \in X,y \in Y} f(x,y) = \min_{x \in X} \min_{y \in Y} f(x,y)$?

When $$\min_{x \in X,y \in Y} f(x,y) = \min_{x \in X} \min_{y \in Y} f(x,y) \qquad?$$
I mean when we are minimizing a function with respect to two variables, under what conditions we are allowed to minimize over one variable and then minimize over the other one?

• when you do your first minimization (the inner one on $y$), you implicitly assume that you can compare functions (the functions $x\mapsto f(x,y)$) . What order do you use on functions? – Denis Jul 7 '13 at 17:57
• Thank you! what do you mean by order? – Mahdi Khosravi Jul 7 '13 at 18:00
• I mean what is the meaning of $\min_y f(x,y)$? The only meaning I see would be the minimum of all functions $f(\cdot,y)$, but then you need to define what is the minimum operation for functions. – Denis Jul 7 '13 at 18:02
• To take an example, let's say $f(x,y)=\sin(x)+\sin(y)$, what is the result of $\min_x \min_y f(x,y)$ ? – Denis Jul 7 '13 at 18:05
• obviously, it's $\min_x \sin(x) + \min_y \sin(y)$ – Mahdi Khosravi Jul 7 '13 at 18:06

First I reformulate the question : given a function of two variables $f(x,y)$, its minimum can be written $\min_x y^*(x)$, where $y^*(x)=\min_y f(x,y)$. Question: under which condition $y^*(x)$ is a constant function, so is independent of $x$?
Answer: Let $f'(x,y)$ be the $y$-derivative of $f(x,y)$. $y^*(x)$ is exprimable as a solution of $f'(x,y)=0$. A sufficient condition for $y^*$ to be a constant is if $f'(x,y)$ is of the form $h(x,y)g(y)$, where $y^*$ is a root of $g$.
For each $x$, $$\min_yf(x,y)\ge\min_{x,y}f(x,y)\tag{1}$$ Taking the minimum over $x$, $$\min_x\min_yf(x,y)\ge\min_{x,y}f(x,y)\tag{2}$$ However, there is an $(x_0,y_0)$ so that $f(x_0,y_0)=\min\limits_{x,y}f(x,y)$. Then $$\min_yf(x_0,y)=\min_{x,y}f(x,y)\tag{3}$$ Therefore, we must have that the minimum over all $x$ is at most the value at one $x_0$: $$\min_x\min_yf(x,y)\le\min_{x,y}f(x,y)\tag{4}$$ $(2)$ and $(4)$ show that $$\min_x\min_yf(x,y)=\min_{x,y}f(x,y)\tag{5}$$