gives the n^(th) smallest element in list.


gives the n^(th) largest element in list.


  • RankedMin yields a definite result if all its arguments are real numbers.
  • RankedMin[{x1,,xm},n] is often indicated using or .
  • RankedMin[{x1,,xm},1] is equivalent to Min[{x1,,xm}].
  • RankedMin[{x1,,xm},-1] is equivalent to Max[{x1,,xm}].
  • RankedMin[{x1,,xm},m] is equivalent to Max[{x1,,xm}].
  • RankedMin[{x1,,xm},n] is equivalent to Quantile[{x1,,xm},n/m].


open allclose all

Basic Examples  (3)

The second smallest of three numbers:

The third smallest of four numbers:

Plot the second-largest function over a subset of the reals:

Scope  (22)

Numerical Evaluation  (4)

Evaluate the second smallest of three numbers:

The fourth smallesti.e. the largestof four numbers:

The second largest of five numbers:

The fourth largest of five numbers:

The fifth largesti.e. the smallestof five numbers:

Evaluate to high precision:

Evaluate efficiently at high precision:

Specific Values  (4)

Values at infinity:

Evaluate symbolically:

Solve equations and inequalities:

Find a value of for which the RankedMin[{Sin[x],Cos[x],Exp[x]},2]1:

Visualization  (3)

Plot RankedMin of several functions:

Plot RankedMin in three dimensions:

Plot RankedMin of three functions in three dimensions:

Function Properties  (8)

RankedMin is only defined for real-valued inputs:

The range of RankedMin is real numbers:

Basic symbolic simplification is done automatically:

Multi-argument ranked RankedMin is generally not an analytic function:

It will have singularities where the functions cross, but it will be continuous:

is neither nondecreasing nor nonincreasing:

is not injective:

is not surjective:

is non-negative:

Integration  (3)

Series expansion of the second-smallest function at the origin:

Asymptotic expansion at Infinity:

Integrate expressions involving RankedMin:

Applications  (7)

Plot the bivariate RankedMin functions:

Plot the contours of bivariate and trivariate RankedMin functions:

RankedMin[{y1,,yn,x},k] as a function of x:

Compute the expectation of the second smallest (median) variable:

Alternatively, use OrderDistribution:

Compute the probability of the second smallest variable being less than 1:

Show that OrderDistribution is a special case of TransformedDistribution:

Find the height of the third shortest child in a class:

Properties & Relations  (6)

RankedMin[{x1,,xn},1] is equivalent to Min[x1,,xn]: »

RankedMin[{x1,,xn},n] is equivalent to Max[x1,,xn]: »

RankedMin[{x1,,xn},k] is equivalent to RankedMax[{x1,,xn},n-k+1]:

RankedMin[{x1,,xn},m] is equivalent to Quantile[{x1,,xn},m/n]: »

RankedMin[{x1,,xn},k] is equivalent to Sort[{x1,,xn}]k:

The equivalent Piecewise function has disjoint piecewise case domains:

Algebraically prove the piecewise case domains are disjoint:

Visually show it:

Algebraically prove the piecewise case domains are pairwise disjoint:

Visually show it:

Neat Examples  (2)

Two-dimensional sublevel sets:

Three-dimensional sublevel sets:

Wolfram Research (2010), RankedMin, Wolfram Language function, https://reference.wolfram.com/language/ref/RankedMin.html (updated 2017).


Wolfram Research (2010), RankedMin, Wolfram Language function, https://reference.wolfram.com/language/ref/RankedMin.html (updated 2017).


Wolfram Language. 2010. "RankedMin." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2017. https://reference.wolfram.com/language/ref/RankedMin.html.


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


@misc{reference.wolfram_2021_rankedmin, author="Wolfram Research", title="{RankedMin}", year="2017", howpublished="\url{https://reference.wolfram.com/language/ref/RankedMin.html}", note=[Accessed: 20-May-2022 ]}


@online{reference.wolfram_2021_rankedmin, organization={Wolfram Research}, title={RankedMin}, year={2017}, url={https://reference.wolfram.com/language/ref/RankedMin.html}, note=[Accessed: 20-May-2022 ]}