Maximize in LaTeX (\max_{x})
- LaTeX command
\max_{x}- Package
- No package needed: built into LaTeX
- Mode
- Math mode only
Where it is used
Maximum over x: the largest value the expression attains as x ranges over its domain.
\max_{x} works like \min_{x}: the predefined operator places limits underneath in display style and to the side inline. Typical uses are the dual function, minimax problems such as \min_G \max_D in GAN training, and margin maximization in SVMs. When the supremum may not be achieved, \sup is the correct operator. Combining operators is common, and TeX handles stacked limits on adjacent \min and \max well. You can override placement with \limits or \nolimits, and add \, or \; before the objective for breathing room in long expressions.
Minimal compilable example
Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.
\documentclass{article}
\usepackage{amssymb}
\begin{document}
Maximize: $\max_{x}$
\[ \min_{G} \max_{D} \; \mathbb{E}[\log D(x)] + \mathbb{E}[\log(1 - D(G(z)))] \]
\end{document}Related symbols
- Subject To
\text{s.t.} - Minimize
\min_{x} - Constraint
g(x) \leq 0 - Argmin Subscript
\arg\min_{x} - Equality Constraint
h(x) = 0 - Argmax Subscript
\arg\max_{x}
Frequently asked questions
- How do I write Maximize in LaTeX?
- Type \max_{x} in math mode, for example $\min_{G} \max_{D} \; \mathbb{E}[\log D(x)] + \mathbb{E}[\log(1 - D(G(z)))]$. It works in plain LaTeX without loading any package.
- Which package do I need for \max_{x}?
- None. \max_{x} is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
- Can I use \max_{x} in text mode, or only in math mode?
- Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $\max_{x}$ in running text.
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