# Wolfram Language & System 10.0 (2014)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.
BUILT-IN WOLFRAM LANGUAGE SYMBOL

# MinimalBy

MinimalBy[{e1,e2,},f]
returns a list of the for which the value of is minimal.

MinimalBy[{e1,e2,},f,n]
returns a list of the corresponding to the n smallest .

MinimalBy[f]
represents an operator form of MinimalBy that can be applied to an expression.

## DetailsDetails

• Values of are compared using the same canonical order as in Sort.
• The minimal are returned in the order they appear in the input.
• In the case of MinimalBy[list,f,n], the are sorted in the order of increasing , with those having the same value of being taken in the order they appear in list.
• MinimalBy[f][expr] is equivalent to MinimalBy[expr,f].

## ExamplesExamplesopen allclose all

### Basic Examples  (3)Basic Examples  (3)

Find the minimal element by last part:

 Out[1]=

All minimal elements are returned, in order of appearance:

 Out[1]=

Obtain the first three minimal elements:

 Out[1]=