yields the numerically largest of the xi.


yields the largest element of any of the lists.


  • Max yields a definite result if all its arguments are real numbers.
  • In other cases, Max carries out some simplifications.
  • Max[] gives -Infinity.
  • Max works on SparseArray objects.


open allclose all

Basic Examples  (3)

Maximum of two numbers:

Maximum of a list:

Plot over a subset of the reals:

Scope  (23)

Numerical Evaluation  (5)

Evaluate numerically:

Evaluate to high precision:

The precision of the output tracks the precision of the input:

Evaluate efficiently at high precision:

The maximum of all elements of a matrix:

The maxima of all rows:

The maxima of all columns:

Max works with real-valued intervals:

Specific Values  (5)

Values of Max at fixed points:

Values at infinity:

Evaluate symbolically:

Solve equations and inequalities:

Find a value of x for which Max[{Sin[x],Cos[x]}]1:

Visualization  (3)

Plot the Max of several functions:

Plot Max in three dimensions:

Plot Max of two functions in three dimensions:

Function Properties  (5)

Max is only defined for real-valued inputs:

The range of Max is all real numbers:

Max effectively flattens out all lists:

Basic symbolic simplification is done automatically:

Additional simplification can be done using Simplify:

Differentiation and Integration  (5)

First derivative with respect to x:

Higher derivatives with respect to x:

Formula for the ^(th) derivative with respect to x:

Compute the indefinite integral using Integrate:

Verify the anti-derivative:

Definite integrals:

Applications  (5)

Use in bounds of iterator variables:

Cumulative maxima:

Find the highest point of a plotted curve:

Mean of the length ratio of a randomly broken stick:

Rfunction-based solid modeling:

Properties & Relations  (6)

With no arguments, Max returns -Infinity:

Max is Flat and Orderless:

Use PiecewiseExpand to express Max and Min as explicit cases:

Use FullSimplify to simplify Max expressions:

Maximize a function containing Max:

Max can be differentiated:

Possible Issues  (2)

Max flattens lists, rather than being Listable:

The oneargument form evaluates for any argument:

Neat Examples  (2)

Two-dimensional sublevel sets:

Three-dimensional sublevel sets:

Wolfram Research (1988), Max, Wolfram Language function, (updated 2003).


Wolfram Research (1988), Max, Wolfram Language function, (updated 2003).


@misc{reference.wolfram_2020_max, author="Wolfram Research", title="{Max}", year="2003", howpublished="\url{}", note=[Accessed: 02-March-2021 ]}


@online{reference.wolfram_2020_max, organization={Wolfram Research}, title={Max}, year={2003}, url={}, note=[Accessed: 02-March-2021 ]}


Wolfram Language. 1988. "Max." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2003.


Wolfram Language. (1988). Max. Wolfram Language & System Documentation Center. Retrieved from