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 Ketaksamaan & Tertib →

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 poweredTulis LaTeX menggunakan AI

Editor LaTeX AI Terbaik, Alternatif Overleaf

Octree membantu penyelidik dari 15+ universiti menulis kertas penyelidikan dengan lebih cepat menggunakan AI

  • Jana diagram TikZ yang cantik menggunakan AI
  • Muat naik imej dan tukar ke LaTeX dengan lancar
  • Dapatkan bantuan segera untuk menulis dan memformat kertas penyelidikan