# Difference between minimizing and maximizing functions

Could someone please explain the difference between minimizing and maximizing functions or give me some links to explain the difference in very very very simple terms?

I have searched online and I found the following link:

Maximizing and Minimizing a function

but I still dont undestand :-/

• I think this is a very practical and accessible introduction from Numerical Recipes Regards Nov 5, 2013 at 18:58
• Does the OP know what the maximum of $\{1,2,3,4\}$ is? And the minimum? Nov 5, 2013 at 19:07
• @JpMcCarthy I dont know what you mean?
– MTA
Nov 5, 2013 at 19:50
• Folks I think the issue here is that the OP doesn't understand maximum and minimum. @RegUser The maximum element of a set is the biggest value. So the maximum of $\{1,2,3,4\}$ is 4 while the minimum is 1. Another question... what is the minimum value of $x^2$ where $x$ is a real number? Nov 5, 2013 at 20:05
• @JpMcCarthy your question seems so simple that I thought it was a trick question lol. It is obvious what is the max and min values when you put it in such simple terms. I believe the answer is 0. I asked my question because I did not know how you can check whether a function is minimizing or maximizing.
– MTA
Nov 5, 2013 at 23:19

When we talk of maximizing or minimizing a function what we mean is what can be the maximum possible value of that function or the minimum possible value of that function.

This can be defined in terms of global range or local range.

When we say global range, we want to find out the maximum value of the function over the whole range of input over which the function can be defined (the domain of the function).

When we say local range, it means we want to find out the maximum or minimum value of the function within the given local range for that function (which will be a subset of the domain of the function).

For example: Lets take the function sin x. This has a maximum value of +1 and a minimum value of -1. This will be its global maxima and minima. Since over all the values that sin x is defined for (i.e. - infinity to +infinity) sin x will have maximum value of +1 and minimum of -1.

Now suppose we want to find maxima and minima for sin x over the interval [0,90] (degree). This is local maxima and minima because here we have restricted our interval over which the function is defined. Here sin x will have minimum at 0 and its value will be 0. Its maximum will be at 90 and value will be 1. All other values of sin x will lie between 0 and 1 within the interval [0,90].

• If you had a function can you tell whether its maximizing or minimizing?
– MTA
Nov 5, 2013 at 19:49
• I think you are using the term maximizing/minimizing in the wrong context. What do you mean that a function is maximizing or minimizing? A function can have a maximum or a minimum value. By itself it can't be said whether it's maximizing or minimizing. Maximizing/minimizing is always a relative concept. A function can act as a maximizing function for some other function i.e. when say function 'A' acts on another function 'B' then it may give the maximum value of function 'B'. In that case we can say 'A' is a maximizing function for 'B'. Please explain what do you mean by maximizing functn? Nov 6, 2013 at 7:26
• I replied to @JpMcCarthy above explaining why I asked but I have copied the text here: Its because I had a fitness function (a weighted function that says the fitness of a subpath in a tour (solving TSP)) and my teacher asked me if the fitness function is minimizing or maximizing but i had no clue! (so i guessed maximizing - If you are increasing the fitness of the subpath then i guess it would me maximizing?).
– MTA
Nov 6, 2013 at 9:34
• Maybe in fitness functions you can say whether they are minimizing or maximizing? Fitness function F takes in X (which is the number of unique cities visited) and it takes in Y (which is the distance of the tour) - I wanted to visit as many unique cities as possible and at the same time keep the distance of the tour very low.
– MTA
Nov 6, 2013 at 9:35
• This is the travelling salesman problem right? Nov 7, 2013 at 15:19

In both situations you are finding critical points where the derivative is zero. This means that the function is not changing at this point, implying it has reached a maximum, minimum, or saddle point. To check which it is you can use the values at that point in the function and see if it is smaller or larger than points near it. Think about a parabola $y=x^2$. Here, you have a minimum at $x=0$ because it $y(x=0)=0$ is less than every point in the domain. If instead you had $y=-x^2$ you would have a maximum at $y(x=0)=0$ because $0$ is greater than all of the other points in the domain. For example, for $y(x)=-x^2$, it is always negative ($y(x=1)=-1$), so $0$ must be the maximum.

• And this alludes to the fact that in general for a function $f$, $min(f)=max(-f)$ Nov 5, 2013 at 19:33