Min

Min

Min[ list ] returns the smallest value in a list.

Usages

Min[ list ]

Min[ list ] returns the element of list with the smallest numerical value. The element is returned as it is written in the list, for example Sqrt[3] instead of 1.73....

Example in out
Sqrt[3] is smaller than 3 and Pi. Min[ {3, Pi, Sqrt[3]} ] Sqrt[3]
Negative numbers. Min[ {-3, -1, -2} ] -3
A list stored in a script variable. L := {4, 9, 1}
m := Min[L]
m = 1
Details
  • Equal values: if the smallest value occurs more than once, the first one is returned.
  • Elements without a numerical value: if any element has no numerical value (such as x), Min is left unevaluated: Min[ {2, x} ] stays Min[ {2, x} ].
  • Quantities: as with Max, quantities with the same unit are compared when the expression is simplified, for example Simplify[ Min[ {Quantity[3,'m'], Quantity[5,'m']} ] ].
Invalid input Result
Min[ {} ] Left unevaluated.
Min[ 5 ] Left unevaluated: the argument must be a list.
Min[ 3, 5 ] Error: the number of arguments should be 1. Put the values in a list: Min[ {3, 5} ].

See also: MinI, Max, Sort