ArgMin
✖
ArgMin
gives a position at which f is minimized subject to the constraints cons.
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==rhs equations lhs>rhs, lhs≥rhs, lhs<rhs, lhs≤rhs inequalities (LessEqual,…) lhsrhs, lhsrhs, lhsrhs, lhsrhs vector inequalities (VectorLessEqual,…) Exists[…], ForAll[…] quantified conditions {x,y,…}∈rdom region or domain specification - ArgMin[{f,cons},x∈rdom] is effectively equivalent to ArgMin[{f,cons∧x∈rdom},x].
- For x∈rdom, the different coordinates can be referred to using Indexed[x,i].
- Possible domains rdom include:
-
Reals real scalar variable Integers integer 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 allBasic Examples (5)Summary of the most common use cases
Find a minimizer point for a univariate function:

https://wolfram.com/xid/0tzy6pj6-faqf4h

Find a minimizer point for a multivariate function:

https://wolfram.com/xid/0tzy6pj6-b6nuhh

Find a minimizer point for a function subject to constraints:

https://wolfram.com/xid/0tzy6pj6-fcm1i7

Find a minimizer point as a function of parameters:

https://wolfram.com/xid/0tzy6pj6-65b19

Find a minimizer point over a geometric region:

https://wolfram.com/xid/0tzy6pj6-ewyjra


https://wolfram.com/xid/0tzy6pj6-bema4a

Scope (36)Survey of the scope of standard use cases
Basic Uses (7)
Minimize over the unconstrained reals:

https://wolfram.com/xid/0tzy6pj6-86qsf

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

https://wolfram.com/xid/0tzy6pj6-pn44d

Minimize subject to constraints
:

https://wolfram.com/xid/0tzy6pj6-edj208

Constraints may involve arbitrary logical combinations:

https://wolfram.com/xid/0tzy6pj6-dtv7r7


https://wolfram.com/xid/0tzy6pj6-pjuvi



https://wolfram.com/xid/0tzy6pj6-jajckq


The infimum value may not be attained:

https://wolfram.com/xid/0tzy6pj6-fbfbh6


Use a vector variable and a vector inequality:

https://wolfram.com/xid/0tzy6pj6-lu8fwi

Univariate Problems (7)
Unconstrained univariate polynomial minimization:

https://wolfram.com/xid/0tzy6pj6-dhud3y

Constrained univariate polynomial minimization:

https://wolfram.com/xid/0tzy6pj6-bp80ai


https://wolfram.com/xid/0tzy6pj6-or0am7

Analytic functions over bounded constraints:

https://wolfram.com/xid/0tzy6pj6-cm5gkd


https://wolfram.com/xid/0tzy6pj6-b1wc7x


https://wolfram.com/xid/0tzy6pj6-z7foj



https://wolfram.com/xid/0tzy6pj6-jpja8l


https://wolfram.com/xid/0tzy6pj6-ch1ske

Combination of trigonometric functions with commensurable periods:

https://wolfram.com/xid/0tzy6pj6-pbsb7r


https://wolfram.com/xid/0tzy6pj6-e9jn5u

Unconstrained problems solvable using function property information:

https://wolfram.com/xid/0tzy6pj6-es0ujg


https://wolfram.com/xid/0tzy6pj6-jxi0j

Multivariate Problems (9)
Multivariate linear constrained minimization:

https://wolfram.com/xid/0tzy6pj6-cemla

Linear-fractional constrained minimization:

https://wolfram.com/xid/0tzy6pj6-lr473t

Unconstrained polynomial minimization:

https://wolfram.com/xid/0tzy6pj6-czwmlc

Constrained polynomial optimization can always be solved:

https://wolfram.com/xid/0tzy6pj6-gzq2vq

The minimum value may not be attained:

https://wolfram.com/xid/0tzy6pj6-jfqbw


The objective function may be unbounded:

https://wolfram.com/xid/0tzy6pj6-hod8g


There may be no points satisfying the constraints:

https://wolfram.com/xid/0tzy6pj6-fwp0ns


Quantified polynomial constraints:

https://wolfram.com/xid/0tzy6pj6-bj2pwq


https://wolfram.com/xid/0tzy6pj6-dsj2qz

Bounded transcendental minimization:

https://wolfram.com/xid/0tzy6pj6-pc6y7


https://wolfram.com/xid/0tzy6pj6-cgyyk8


https://wolfram.com/xid/0tzy6pj6-81pld6

Minimize convex objective function such that
is positive semidefinite and
:

https://wolfram.com/xid/0tzy6pj6-ml87f0

Plot the region and the minimizing point:

https://wolfram.com/xid/0tzy6pj6-5jo4bk

Parametric Problems (4)
Parametric linear optimization:

https://wolfram.com/xid/0tzy6pj6-ds69uj

Coordinates of the minimizer point are continuous functions of parameters:

https://wolfram.com/xid/0tzy6pj6-hbs678

Parametric quadratic optimization:

https://wolfram.com/xid/0tzy6pj6-8l1oto

Coordinates of the minimizer point are continuous functions of parameters:

https://wolfram.com/xid/0tzy6pj6-cqc84z

Unconstrained parametric polynomial minimization:

https://wolfram.com/xid/0tzy6pj6-hvvtn9

Constrained parametric polynomial minimization:

https://wolfram.com/xid/0tzy6pj6-e7xyfo

Optimization over Integers (3)
Optimization over Regions (6)

https://wolfram.com/xid/0tzy6pj6-i9nmj9

https://wolfram.com/xid/0tzy6pj6-jonhz


https://wolfram.com/xid/0tzy6pj6-otv084

Find the minimum distance between two regions:

https://wolfram.com/xid/0tzy6pj6-dkte2m

https://wolfram.com/xid/0tzy6pj6-imyj


https://wolfram.com/xid/0tzy6pj6-bvatmu

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

https://wolfram.com/xid/0tzy6pj6-ho0zb

https://wolfram.com/xid/0tzy6pj6-ed2z9w


https://wolfram.com/xid/0tzy6pj6-dy0urb

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

https://wolfram.com/xid/0tzy6pj6-fxoyak

https://wolfram.com/xid/0tzy6pj6-cgb90j


https://wolfram.com/xid/0tzy6pj6-m75xbi

Using Circumsphere gives the same result directly:

https://wolfram.com/xid/0tzy6pj6-ccn5a7

Use to specify that
is a vector in
:

https://wolfram.com/xid/0tzy6pj6-e7unye

https://wolfram.com/xid/0tzy6pj6-bznxqd

Find the minimum distance between two regions:

https://wolfram.com/xid/0tzy6pj6-kgd51l

https://wolfram.com/xid/0tzy6pj6-bcrl8n


https://wolfram.com/xid/0tzy6pj6-ifh0j0

Options (1)Common values & functionality for each option
WorkingPrecision (1)
Finding an exact minimum point can take a long time:

https://wolfram.com/xid/0tzy6pj6-dt4zl

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

https://wolfram.com/xid/0tzy6pj6-c5mizn

Applications (10)Sample problems that can be solved with this function
Basic Applications (3)
Find the lengths of sides of a unit area rectangle with minimal perimeter:

https://wolfram.com/xid/0tzy6pj6-wtuty

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

https://wolfram.com/xid/0tzy6pj6-jayfl1

https://wolfram.com/xid/0tzy6pj6-bx6cxm

The minimal perimeter triangle is equilateral:

https://wolfram.com/xid/0tzy6pj6-m0jx

Find a point on a parabola closest to its axis:

https://wolfram.com/xid/0tzy6pj6-mcgw7a

Assuming a particular relationship between the and
parameters:

https://wolfram.com/xid/0tzy6pj6-h6oc0

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}:

https://wolfram.com/xid/0tzy6pj6-bbe5gq

https://wolfram.com/xid/0tzy6pj6-clvki


https://wolfram.com/xid/0tzy6pj6-byd4zt

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

https://wolfram.com/xid/0tzy6pj6-bi7hqn

https://wolfram.com/xid/0tzy6pj6-bfqxai


https://wolfram.com/xid/0tzy6pj6-hfmqh

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

https://wolfram.com/xid/0tzy6pj6-dj6j8q

https://wolfram.com/xid/0tzy6pj6-dmukk8


https://wolfram.com/xid/0tzy6pj6-jz2mh

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

https://wolfram.com/xid/0tzy6pj6-jqaty

https://wolfram.com/xid/0tzy6pj6-k97ofe


https://wolfram.com/xid/0tzy6pj6-e5f7z2

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}]:

https://wolfram.com/xid/0tzy6pj6-ft5pzx

https://wolfram.com/xid/0tzy6pj6-l1hdoc


https://wolfram.com/xid/0tzy6pj6-iro44


https://wolfram.com/xid/0tzy6pj6-jze3u8

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

https://wolfram.com/xid/0tzy6pj6-ogx39

https://wolfram.com/xid/0tzy6pj6-h1n6ry


https://wolfram.com/xid/0tzy6pj6-ew52ld


https://wolfram.com/xid/0tzy6pj6-d7lqct

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[]:

https://wolfram.com/xid/0tzy6pj6-c10aaw

https://wolfram.com/xid/0tzy6pj6-jhcnbu


https://wolfram.com/xid/0tzy6pj6-jdkw0n

Find the Chebyshev center for Rectangle[]:

https://wolfram.com/xid/0tzy6pj6-b0ca3

https://wolfram.com/xid/0tzy6pj6-et09g2


https://wolfram.com/xid/0tzy6pj6-bpix6d

Properties & Relations (6)Properties of the function, and connections to other functions
Minimize gives both the value of the minimum and the minimizer point:

https://wolfram.com/xid/0tzy6pj6-c60bbs

ArgMin gives an exact global minimizer point:

https://wolfram.com/xid/0tzy6pj6-c3l3pu

https://wolfram.com/xid/0tzy6pj6-z9fmn


https://wolfram.com/xid/0tzy6pj6-dxhraz

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

https://wolfram.com/xid/0tzy6pj6-kxmpp


https://wolfram.com/xid/0tzy6pj6-ffnzus

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

https://wolfram.com/xid/0tzy6pj6-ddl886


https://wolfram.com/xid/0tzy6pj6-jjukrq

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

https://wolfram.com/xid/0tzy6pj6-d7nsku


https://wolfram.com/xid/0tzy6pj6-qmgbx

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

https://wolfram.com/xid/0tzy6pj6-l7yvm2

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

https://wolfram.com/xid/0tzy6pj6-g84p9r


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

https://wolfram.com/xid/0tzy6pj6-gqziww


ArgMin can solve linear optimization problems:

https://wolfram.com/xid/0tzy6pj6-mm3mtp

LinearOptimization can be used to solve the same problem:

https://wolfram.com/xid/0tzy6pj6-6ixtbc

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

https://wolfram.com/xid/0tzy6pj6-ecegsq

https://wolfram.com/xid/0tzy6pj6-cy5bsl

It can be computed using ArgMin:

https://wolfram.com/xid/0tzy6pj6-eb1ko5


https://wolfram.com/xid/0tzy6pj6-l9bm78

Possible Issues (2)Common pitfalls and unexpected behavior
A finite minimum value may not be attained:

https://wolfram.com/xid/0tzy6pj6-byn0ry


The objective function may be unbounded:

https://wolfram.com/xid/0tzy6pj6-i7gioe


There may be no points satisfying the constraints:

https://wolfram.com/xid/0tzy6pj6-edzan1


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

https://wolfram.com/xid/0tzy6pj6-due48b

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

https://wolfram.com/xid/0tzy6pj6-mnsihk

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).
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.
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
Wolfram Language. (2008). ArgMin. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ArgMin.html
BibTeX
@misc{reference.wolfram_2025_argmin, author="Wolfram Research", title="{ArgMin}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/ArgMin.html}", note=[Accessed: 25-March-2025
]}
BibLaTeX
@online{reference.wolfram_2025_argmin, organization={Wolfram Research}, title={ArgMin}, year={2021}, url={https://reference.wolfram.com/language/ref/ArgMin.html}, note=[Accessed: 25-March-2025
]}