ArgMin

ArgMin[f,x]

gives a position xmin at which f is minimized.

ArgMin[f,{x,y,}]

gives a position {xmin,ymin,} at which f is minimized.

ArgMin[{f,cons},{x,y,}]

gives a position at which f is minimized subject to the constraints cons.

ArgMin[,xrdom]

constrains x to be in the region or domain rdom.

ArgMin[,,dom]

constrains variables to the domain dom, typically Reals or Integers.

Details and Options

  • ArgMin finds the global minimum of f subject to the constraints given.
  • ArgMin is typically used to find the smallest possible values given constraints. In different areas, this may be called the best strategy, best fit, best configuration and so on.
  • If f and cons are linear or polynomial, ArgMin will always find a global minimum.
  • The constraints cons can be any logical combination of:
  • lhs==rhsequations
    lhs>rhs, lhsrhs, lhs<rhs, lhsrhsinequalities (LessEqual,)
    lhsrhs, lhsrhs, lhsrhs, lhsrhsvector inequalities (VectorLessEqual,)
    Exists[], ForAll[]quantified conditions
    {x,y,}rdomregion or domain specification
  • ArgMin[{f,cons},xrdom] is effectively equivalent to ArgMin[{f,consxrdom},x].
  • For xrdom, the different coordinates can be referred to using Indexed[x,i].
  • Possible domains rdom include:
  • Realsreal scalar variable
    Integersinteger scalar variable
    Vectors[n,dom]vector variable in
    Matrices[{m,n},dom]matrix variable in
    vector variable restricted to the geometric region
  • By default, all variables are assumed to be real.
  • ArgMin will return exact results if given exact input. With approximate input, it automatically calls NArgMin.
  • If the minimum is achieved only infinitesimally outside the region defined by the constraints, or only asymptotically, ArgMin will return the closest specifiable point.
  • Even if the same maximum is achieved at several points, only one is returned.
  • If the constraints cannot be satisfied, ArgMin returns {Indeterminate,Indeterminate,}.
  • N[ArgMin[]] calls NArgMin for optimization problems that cannot be solved symbolically.

Examples

open allclose all

Basic Examples  (5)

Find a minimizer point for a univariate function:

Find a minimizer point for a multivariate function:

Find a minimizer point for a function subject to constraints:

Find a minimizer point as a function of parameters:

Find a minimizer point over a geometric region:

Plot it:

Scope  (36)

Basic Uses  (7)

Minimize over the unconstrained reals:

If the single variable is not given in a list, the result is a value at which the minimum is attained:

Minimize subject to constraints :

Constraints may involve arbitrary logical combinations:

An unbounded problem:

An infeasible problem:

The infimum value may not be attained:

Use a vector variable and a vector inequality:

Univariate Problems  (7)

Unconstrained univariate polynomial minimization:

Constrained univariate polynomial minimization:

Exp-log functions:

Analytic functions over bounded constraints:

Periodic functions:

Combination of trigonometric functions with commensurable periods:

Piecewise functions:

Unconstrained problems solvable using function property information:

Multivariate Problems  (9)

Multivariate linear constrained minimization:

Linear-fractional constrained minimization:

Unconstrained polynomial minimization:

Constrained polynomial optimization can always be solved:

The minimum value may not be attained:

The objective function may be unbounded:

There may be no points satisfying the constraints:

Quantified polynomial constraints:

Algebraic minimization:

Bounded transcendental minimization:

Piecewise minimization:

Convex minimization:

Minimize convex objective function such that is positive semidefinite and :

Plot the region and the minimizing point:

Parametric Problems  (4)

Parametric linear optimization:

Coordinates of the minimizer point are continuous functions of parameters:

Parametric quadratic optimization:

Coordinates of the minimizer point are continuous functions of parameters:

Unconstrained parametric polynomial minimization:

Constrained parametric polynomial minimization:

Optimization over Integers  (3)

Univariate problems:

Integer linear programming:

Polynomial minimization over the integers:

Optimization over Regions  (6)

Minimize over a region:

Plot it:

Find the minimum distance between two regions:

Plot it:

Find the minimum such that the triangle and ellipse still intersect:

Plot it:

Find the disk of minimum radius that contains the given three points:

Plot it:

Using Circumsphere gives the same result directly:

Use to specify that is a vector in :

Find the minimum distance between two regions:

Plot it:

Options  (1)

WorkingPrecision  (1)

Finding an exact minimum point can take a long time:

With WorkingPrecision->100, you get an approximate minimum point:

Applications  (10)

Basic Applications  (3)

Find the lengths of sides of a unit area rectangle with minimal perimeter:

Find the lengths of sides of a unit area triangle with minimal perimeter:

The minimal perimeter triangle is equilateral:

Find a point on a parabola closest to its axis:

Assuming a particular relationship between the and parameters:

Geometric Distances  (6)

The point q in a region that is nearest to a given point p is given by ArgMin[Norm[p-q],q]. Find the nearest point in Disk[] to {1,1}:

Plot it:

Find the nearest point to {1,2} in the standard unit simplex Simplex[2]:

Plot it:

Find the nearest point to {1,1,1} in the standard unit sphere Sphere[]:

Plot it:

Find the nearest point to {-1,1,1} in the standard unit simplex Simplex[3]:

Plot it:

The the nearest points p and q can be found through ArgMin[Norm[p-q],{p,q}]. Find the nearest points in Disk[{0,0}] and Rectangle[{3,3}]:

The nearest distance:

Plot it:

Find the nearest points in Line[{{0,0,0},{1,1,1}}] and Ball[{5,5,0},1]:

The nearest distance:

Plot it:

Geometric Centers  (1)

If n is a region that is full dimensional, then the Chebyshev center is the point p that minimizes SignedRegionDistance[,p], i.e. the negation of the distance to the complement region. Find the Chebyshev center for Disk[]:

Find the Chebyshev center for Rectangle[]:

Properties & Relations  (6)

Minimize gives both the value of the minimum and the minimizer point:

ArgMin gives an exact global minimizer point:

NArgMin attempts to find a global minimizer point numerically, but may find a local minimizer:

FindArgMin finds a local minimizer point depending on the starting point:

The minimum point satisfies the constraints, unless messages say otherwise:

The given point minimizes the distance from the point {2,}:

When the minimum is not attained, ArgMin may give a point on the boundary:

Here the objective function tends to the minimum value when y tends to infinity:

ArgMin can solve linear optimization problems:

LinearOptimization can be used to solve the same problem:

Use RegionNearest to compute a nearest point in the given region:

It can be computed using ArgMin:

Possible Issues  (2)

A finite minimum value may not be attained:

The objective function may be unbounded:

There may be no points satisfying the constraints:

ArgMin requires that all functions present in the input be real valued:

Values for which the equation is satisfied but the square roots are not real are disallowed:

Wolfram Research (2008), ArgMin, Wolfram Language function, https://reference.wolfram.com/language/ref/ArgMin.html (updated 2021).

Text

Wolfram Research (2008), ArgMin, Wolfram Language function, https://reference.wolfram.com/language/ref/ArgMin.html (updated 2021).

CMS

Wolfram Language. 2008. "ArgMin." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2021. https://reference.wolfram.com/language/ref/ArgMin.html.

APA

Wolfram Language. (2008). ArgMin. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ArgMin.html

BibTeX

@misc{reference.wolfram_2024_argmin, author="Wolfram Research", title="{ArgMin}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/ArgMin.html}", note=[Accessed: 22-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_argmin, organization={Wolfram Research}, title={ArgMin}, year={2021}, url={https://reference.wolfram.com/language/ref/ArgMin.html}, note=[Accessed: 22-December-2024 ]}