# Using the Nelder-Mead algorithm to find a maximum

In the Nelder-Mead algorithm, the simplex looks for the minimum of the function. If I multiply all the function values times -1, would I trick the simplex into searching for the maximum?

• Yes, $\min_x f(x) = -\max_x -f(x)$, independent of the method used to compute it. – Christian Clason Jan 6 '15 at 14:57
• @ChristianClason: This means that we can use minimization algorthims to find maxima and maximization algorithm to find minima always? – nomadStack Jan 6 '15 at 16:00
• Exactly. This is why textbooks usually talk about just one of the two. – Christian Clason Jan 6 '15 at 16:42

Yes, any minimization method can be used to find a maximum by applying it to $$-\min_{x} -f(x) = \max_{x} f(x)$$ (with the usual caveats that such a maximum must exist and $$-f$$ needs to have the required properties for the minimization method to work).