Maximum in LaTeX (\max)

max⁡\max
LaTeX command
\max
Package
No package needed: built into LaTeX
Mode
Math mode only

Where it is used

Maximum operator: the largest element of a set or the greatest value a function reaches on its domain.

Optimization problems, the max norm \|x\|_\infty = \max_i |x_i|, and ReLU activations \max(0, x) all rely on \max. It behaves like \sum with respect to limits: below the operator in display style, beside it in inline text. Brackets after it are not auto-sized, so write \max\left( a, b \right) or \max\bigl( \dots \bigr) when the argument contains fractions. When the maximum might not exist, use \sup instead. For an argmax operator, declare one with the starred \DeclareMathOperator* so its subscript also goes underneath in displays.

Minimal compilable example

Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.

∥x∥∞=max⁡1≤i≤n∣xi∣\|x\|_\infty = \max_{1 \le i \le n} |x_i|
\documentclass{article}
\begin{document}
Maximum: $\max$

\[ \|x\|_\infty = \max_{1 \le i \le n} |x_i| \]
\end{document}

Related symbols

All Inequalities at Order →

Frequently asked questions

How do I write Maximum in LaTeX?
Type \max in math mode, for example $\|x\|_\infty = \max_{1 \le i \le n} |x_i|$. It works in plain LaTeX without loading any package.
Which package do I need for \max?
None. \max is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
Can I use \max in text mode, or only in math mode?
Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $\max$ in running text.
Math poweredSumulat ng LaTeX gamit ang AI

Pinakamahusay na AI LaTeX Editor, Alternatibo sa Overleaf

Tinutulungan ng Octree ang mga researcher mula sa 15+ na unibersidad na sumulat ng research papers nang mas mabilis gamit ang AI

  • Gumawa ng magagandang TikZ diagrams gamit ang AI
  • Mag-upload ng larawan at i-convert ito sa LaTeX nang walang problema
  • Makakuha ng instant na tulong sa pagsulat at pag-format ng research papers