← Module 05 / Calculus & optimization

Lesson 05.1 · §4.1

Where are you allowed to look for a minimum?

Distinguish feasible, local, global, and strict minima.

In this lesson 5 ideas
  1. The same curve can have different answers
  2. Compare nearby points or all points
  3. Turn a maximum into a minimum
  4. Transfer
  5. Explore the relationship

Source scope: §4.1, PDF pages 27. Numerical examples, experiments, added derivations, and practice are teaching supplements unless identified as source results.

The same curve can have different answers

For f(x)=x2f(x)=x^2, minimizing over R\mathbb R gives x=0x=0. Over [1,3][1,3] it gives x=1x=1. Over (0,3](0,3] no minimum exists: moving closer to zero always lowers the value, but zero is excluded. The curve alone does not specify the problem.

A cost function, or objective function, is a scalar function of several variables. In machine learning it often measures how poorly a model fits data. The feasible set X⊆RdX\subseteq\mathbb R^d lists allowed inputs. A problem is unconstrained when XX is the function’s entire domain; otherwise it is constrained. Constraints can change both the answer and the difficulty of finding it.

Compare nearby points or all points

Let f:Rd→Rf:\mathbb R^d\to\mathbb R and x∗∈Xx^*\in X.

  • A local minimum in XX satisfies f(x∗)≤f(y)f(x^*)\le f(y) for every y∈X∩Bϵ(x∗)y\in X\cap B_\epsilon(x^*) for some ϵ>0\epsilon>0.
  • A global minimum in XX satisfies f(x∗)≤f(y)f(x^*)\le f(y) for every y∈Xy\in X.
  • A strict local or global minimum replaces ≤\le by << for all compared y≠x∗y\ne x^*.
  • Local and global maxima reverse the inequalities.

Strictness excludes equality with other points, not with x∗x^* itself. It makes the minimizer unique within the stated comparison set. A local minimum need not be global. The source assumes optimization over the whole domain when “in XX” is omitted and the context does not say otherwise.

Source footnote 8 and boundary clarification. A neighborhood of xx is an open set containing xx. For a constrained problem use the relative neighborhood X∩Bϵ(x)X\cap B_\epsilon(x); it need not be open in the ambient space. This expresses the source’s local comparison while retaining boundary points such as x=1x=1 in [1,3][1,3].

Turn a maximum into a minimum

Maximizing ff is equivalent to minimizing −f-f. Every comparison reverses when multiplied by −1-1. The source therefore discusses minimization without losing generality.

At a boundary minimum the gradient may be nonzero. For x2x^2 on [1,3][1,3], f′(1)=2f'(1)=2. Later gradient-zero conditions apply to unconstrained interior points with differentiability, not to every feasible minimum.

Transfer

For f(x)=xf(x)=x on (0,1)(0,1), neither a minimum nor a maximum exists. Zero and one are an infimum and a supremum, respectively, but neither is attained. On [0,1][0,1] both extrema exist at the endpoints.

Explore the relationship

Explore it yourself

Change the feasible set

Does excluding a point remove a minimum even when the curve stays the same?

Preparing interactive controls…

xf / 20-3-2-11234
f(x) = 1; f′(x) = 2. Unique global minimum at x = 0.

The solid curve is the feasible part; the hollow endpoint is excluded. The slider stops at 0.01 in the open-domain case for numerical interaction, but the mathematical domain includes every positive value below it.