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 عدم المساواة والترتيب →

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 poweredاكتب LaTeX باستخدام الذكاء الاصطناعي

أفضل محرر LaTeX بالذكاء الاصطناعي، بديل Overleaf

يساعد Octree الباحثين من أكثر من 15 جامعة على كتابة أوراق البحث بشكل أسرع باستخدام الذكاء الاصطناعي

  • أنشئ رسوم TikZ جميلة باستخدام الذكاء الاصطناعي
  • ارفع صورة وحولها إلى LaTeX بسلاسة
  • احصل على مساعدة فورية في كتابة وتنسيق أوراق البحث