Min
Examples
open all close allBasic Examples (3)
Scope (29)
Numerical Evaluation (7)
Min[5.56, -4.8, 7.3]N[Min[1 / 7, 4 / 5, 1], 50]The precision of the output tracks the precision of the input:
Min[0.210000045000110400, 1]Evaluate efficiently at high precision:
Min[47, 5, 1`100]//TimingMin[15 / 71, 5, 1`100000];//TimingThe minimum of all elements of a matrix:
mat = {{-1, 0, 1, 2}, {0, 2, 4, 6}, {-3, -2, -1, 0}};Min[mat]Min /@ matMin /@ Transpose[mat]For Interval objects, Min gives the minimum element in all intervals:
Min[Interval[{1, 3}], Interval[{-3, 5}]]For CenteredInterval objects, Min[Δ1,Δ2] gives an interval containing Min[a1,a2] for any ai∈Δi:
Min[CenteredInterval[2, 1], CenteredInterval[1, 4]]Compute average-case statistical intervals using Around:
Min[{ 1, Around[-1.10001, 0.01]}]Compute the elementwise values of an array using automatic threading:
Min[2, 3, {{1 / 2, -1}, {-5 / 3, 1 / 2}}]Or compute the matrix Min function using MatrixFunction:
MatrixFunction[Min[2, 3, #]&, {{1 / 2, -1}, {-5 / 3, 1 / 2}}]//FullSimplifySpecific Values (5)
Values of Min at fixed points:
Min[{E, Pi, 5}]Min[∞, 5]Min[-∞, 5]PiecewiseExpand[Min[ {x, y, z}], -2 < x < 2, 3 < y < 4]Solve equations and inequalities:
Reduce[{Min[Sin[x], Cos[x]] > 0, 0 < x < 20}, x]Find a value of x for which Min[{Sin[x],Cos[x]}]1/2:
xval = x /. FindRoot[Min[{Sin[x], Cos[x]}] == 1 / 2, {x, π / 2}]Plot[Min[{Sin[x], Cos[x]}], {x, -3, 3}, Epilog -> Style[Point[{xval, Min[{Sin[xval], Cos[xval]}]}], PointSize[Large], Red]]Visualization (3)
Plot the Min of several functions:
Plot[Min[Sin[x], Cos[x]], {x, 0, 2π}, PlotRange -> All]Plot Min in three dimensions:
Plot3D[Min[x, y], {x, -3, 3}, {y, -3, 3}, ColorFunction -> "BlueGreenYellow"]Plot Min of three functions in three dimensions:
Plot3D[Min[Tan[x], Tan[y]], {x, -3, 3}, {y, -3, 3}, ColorFunction -> "BlueGreenYellow"]Function Properties (9)
Min is only defined for real-valued inputs:
FunctionDomain[Min[x1, x2], {x1, x2}]FunctionDomain[Min[x1, x2], {x1, x2}, Complexes]The range of Min is all real numbers:
FunctionRange[Min[x1, x2], {x1, x2}, y]Min effectively flattens out all lists:
Min[{{3, 4, 1}}, {2, 2}, 7]Basic symbolic simplification is done automatically:
Min[x, y, Min[x, z]]Additional simplification can be done using Simplify:
Simplify[Min[1 - x, x, 1 + x]]Multi-argument Min is generally not an analytic function:
FunctionAnalytic[Min[ x, x ^ 2], x]It will have singularities where the arguments cross, but it will be continuous:
FunctionSingularities[Min[x, x ^ 2], x]//ReduceFunctionDiscontinuities[Min[x, x ^ 2], x]Min can have any monotonicity depending on its arguments:
FunctionMonotonicity[Min[x, x ^ 2], x]FunctionMonotonicity[Min[x, -x ^ 2], x]FunctionMonotonicity[Min[-x, x ^ 2], x]FunctionSurjective[Min[x, -x ^ 2], x]Plot[{Min[x, -x ^ 2], 1}, {x, -2, 2}]Min can have any sign depending on its arguments:
FunctionSign[Min[x, x ^ 2], x]FunctionSign[Min[x, -x ^ 2], x]FunctionSign[Min[RealAbs[x], x ^ 2], x]Differentiation and Integration (5)
First derivative with respect to x:
D[Min[x, y], x]Higher derivatives with respect to x:
Table[D[Min[x, y], {x, k}], {k, 1, 3}]//FullSimplifyFormula for the ![]()
derivative with respect to x:
D[Min[x, y], {x, k}]// FullSimplifyCompute the indefinite integral using Integrate:
Integrate[Min[x, y, z], x]FullSimplify[D[%, x]]Integrate[Min[x, y], {x, 0, 4}]Integrate[Min[Sin[x], Cos[x]], {x, 0, Pi}]//FullSimplifyIntegrate[Exp[Min[x, a - x]], {x, 0, 1}]Applications (7)
Data Processing (2)
Create a function that computes the cumulative min of a list:
CumulativeMin[list_List] := FoldList[Min, First[list], Rest[list]]Use on some different types of data:
data1 = Table[Sin[x] + x Sin[Sqrt[2]x], {x, 0, 25, .1}];ListLinePlot[{data1, CumulativeMin[data1]}]Create a function that computes the min of a sequence given by a function:
ProceduralMin[f_, {k_, kmin_, kmax_, dk_}] :=
Module[{val = ∞},
Do[val = Min[val, f], {k, kmin, kmax, dk}];
val
]Try it for some different sequences:
ProceduralMin[Sin[x] + x Sin[Sqrt[2]x], {x, 0., 10^6, 1.}]Function Processing (4)
Create a function that gives the positive part and another that gives the negative part:
PositivePart[f_] := Max[0, f];
NegativePart[f_] := Min[0, f];{Plot[PositivePart[Sin[x]], {x, 0, 5π}, ...],
Plot[NegativePart[Sin[x]], {x, 0, 5π}, ...]}The min of non-positive functions will be another non-positive function. Use that to generate interesting negative functions. These are all non-positive functions:
FunctionSign[#, {x, y}]& /@ {-Exp[-(x^2 + y^2)], -Sin[x + y] - 1}The max will also be non-negative:
FunctionSign[Min[{-Exp[-(x^2 + y^2)], -Sin[x + y] - 1}], {x, y}]Plot3D[Min[{-Exp[-(x^2 + y^2)], -Sin[x + y] - 1}], {x, -2, 2}, {y, -2, 2}]FunctionSign[#, {x, y}]& /@ {-Sin[x - y] - 1, -Sin[x + y] - 1}Plot3D[Max[{-Sin[x - y] - 1, -Sin[x + y] - 1}], {x, -5, 5}, {y, -5, 5}]The min of decreasing functions will be another decreasing function. Use that to generate interesting decreasing functions:
FunctionMonotonicity[#, x]& /@ {-x, (-x)^3, (1 - x)^5}Plot[Min[{-x, (-x)^3, (1 - x)^5}], {x, -2, 2}]The min of concave functions will be another concave function. Use that to generate interesting concave functions:
FunctionConvexity[#, {x, y}]& /@ {-x^2 - y^2, -Exp[x + y] - 2, -Exp[-x + y] - 2, -Exp[-x - y] - 2, -Exp[x - y] - 2}Plot3D[Min[{-x^2 - y^2, -Exp[x + y] - 2, -Exp[-x + y] - 2, -Exp[-x - y] - 2, -Exp[x - y] - 2}], {x, -2, 2}, {y, -2, 2}, MeshFunctions -> {#3&}]Geometric Regions (1)
Max and min can be used to model Boolean operations for implicit regions. The intersection
is equivalent to
and, similarly, the union
is equivalent to
.
Consider the following two regions:
RegionPlot[{x^3 + y <= 0, y^3 + x <= 0}, {x, -2, 2}, {y, -2, 2}]This is their intersection done with either Boolean operations or max:
{RegionPlot[x^3 + y <= 0∧y^3 + x <= 0, {x, -2, 2}, {y, -2, 2}],
RegionPlot[Max[{x^3 + y, y^3 + x}] <= 0, {x, -2, 2}, {y, -2, 2}]}This is their union done with either Boolean operations or min:
{RegionPlot[x^3 + y <= 0∨y^3 + x <= 0, {x, -2, 2}, {y, -2, 2}],
RegionPlot[Min[{x^3 + y, y^3 + x}] <= 0, {x, -2, 2}, {y, -2, 2}]}Properties & Relations (6)
With no arguments, Min returns Infinity:
Min[]Min[Min[z, y], x]Use PiecewiseExpand to express Min and Max as explicit cases:
PiecewiseExpand[Max[Min[x, y], z]]Use FullSimplify to simplify Min expressions:
FullSimplify[Max[x, y] - Min[-x, -y]]FullSimplify[Min[x, y] - (x + 2y - Sqrt[(x - y) ^ 2]) / 2, Element[{x, y}, Reals]]Minimize a function containing Min:
Minimize[Min[x ^ 2 + 2x + 2, x ^ 4 - 3 x + 2], x]Min can be differentiated:
Min'[x]Derivative[1, 0][Min]Possible Issues (2)
Neat Examples (2)
Two-dimensional sublevel sets:
Table[RegionPlot[Min[x, y] < t, {x, -2, 2}, {y, -2, 2}, PlotLabel -> Min[x, y] < t], {t, {-1, 0, 1}}]Table[RegionPlot[Min[x, y] > t, {x, -2, 2}, {y, -2, 2}, PlotLabel -> Min[x, y] > t], {t, {-1, 0, 1}}]Three-dimensional sublevel sets:
Table[RegionPlot3D[Min[x, y, z] < t, {x, -2, 2}, {y, -2, 2}, {z, -2, 2}, PlotLabel -> Min[x, y, z] < t], {t, {-1, 0, 1}}]Table[RegionPlot3D[Min[x, y, z] > t, {x, -2, 2}, {y, -2, 2}, {z, -2, 2}, PlotLabel -> Min[x, y, z] > t], {t, {-1, 0, 1}}]See Also
Max MinMax TakeSmallest MinimalBy RankedMin RankedMax Ordering Minimize FindMinimum MinDetect Clip UpTo
Function Repository: ParetoListMinima
Tech Notes
Related Guides
-
▪
- Numerical Functions ▪
- Elementary Functions ▪
- Numerical Data ▪
- Math & Counting Operations on Lists ▪
- Descriptive Statistics ▪
- Elements of Lists ▪
- Mathematical Functions ▪
- Computation with Structured Datasets ▪
- Robust Descriptive Statistics ▪
- GPU Computing ▪
- GPU Computing with Apple ▪
- GPU Computing with NVIDIA
History
Introduced in 1988 (1.0) | Updated in 2003 (5.0) ▪ 2021 (13.0)
Text
Wolfram Research (1988), Min, Wolfram Language function, https://reference.wolfram.com/language/ref/Min.html (updated 2021).
CMS
Wolfram Language. 1988. "Min." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2021. https://reference.wolfram.com/language/ref/Min.html.
APA
Wolfram Language. (1988). Min. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Min.html
BibTeX
@misc{reference.wolfram_2026_min, author="Wolfram Research", title="{Min}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/Min.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_min, organization={Wolfram Research}, title={Min}, year={2021}, url={https://reference.wolfram.com/language/ref/Min.html}, note=[Accessed: 12-June-2026]}