Numerical Optimization

unconstrained optimization

Picture a hilly landscape with no fences anywhere — you are free to stand wherever you like, and your only goal is to find the lowest point of the valley. Nothing forbids any location; you simply follow the ground downhill until it stops going down. Unconstrained optimization is exactly this: find the input x that makes a function f(x) as small as possible (or as large as possible), with no rules limiting which x you may choose.

Formally, you seek a vector x in R^n that minimizes a real-valued objective f(x), written 'minimize f(x) over all x'. (Maximizing f is the same as minimizing -f, so people usually phrase everything as minimization.) The function f might be a simple formula, or it might be the error of a machine-learning model measured over data, or the cost of a design. Because there are no constraints, the candidates for a lowest point are special spots where the ground is locally flat — the gradient (the vector of slopes) is zero. Algorithms start from a guess x_0 and step downhill, x_{k+1} = x_k + (step), until the slope flattens out. The whole field of descent methods, Newton's method, quasi-Newton, and stochastic gradient descent lives here.

The honest caveat is what 'lowest' means. Most methods find a LOCAL minimum — a point lower than everything nearby — not necessarily the GLOBAL minimum, the lowest point of the entire landscape; a function can have many valleys of different depths, and a downhill walk settles in whichever one you started above. Only for special (convex) functions is every local minimum automatically global. For general functions, finding the true global minimum is genuinely hard, and most practical training simply accepts a good-enough local minimum. This is the computational heart of machine learning, control, and engineering design.

Minimize f(x, y) = (x - 3)^2 + (y + 1)^2. This is a single bowl whose floor is at (3, -1), where f = 0. Setting the gradient (2(x-3), 2(y+1)) to zero gives exactly that point. A downhill walk from any start slides into the same unique minimum, because this bowl is convex.

A convex bowl has one minimum; a bumpy landscape can trap you in many.

'Unconstrained' does not mean easy. A non-convex f can have countless local minima and saddle points, and which one you reach depends on where you start — so the answer a solver returns is local unless the problem is convex or you do extra global search.

Also called
minimizing a free functionfree optimization無限制最佳化無拘束最佳化