Equality Constraint in LaTeX (h(x) = 0)

h(x)=0h(x) = 0
LaTeX command
h(x) = 0
Package
No package needed: built into LaTeX
Mode
Text and math mode

Where it is used

Generic equality constraint: the function h must vanish at any feasible point x.

Equality constraints h_j(x) = 0 complement inequality constraints g_i(x) \leq 0 in the standard form of a nonlinear program. In convex optimization they must be affine, so they are often written Ax = b instead. In the Lagrangian each one gets a multiplier \nu_j or \mu_j that, unlike inequality multipliers, may take any sign. The letter h is conventional, but it collides with step size or entropy in some fields; choose letters that do not clash. For several constraints, index them with j to keep them apart from the inequality index i.

Minimal compilable example

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

hj(x)=0,j=1,…,ph_j(x) = 0, \quad j = 1, \dots, p
\documentclass{article}
\begin{document}
Equality Constraint: $h(x) = 0$

\[ h_j(x) = 0, \quad j = 1, \dots, p \]
\end{document}

Related symbols

All 最適化 →

Frequently asked questions

How do I write Equality Constraint in LaTeX?
Type h(x) = 0 in math mode, for example $h_j(x) = 0, \quad j = 1, \dots, p$. It works in plain LaTeX without loading any package.
Which package do I need for h(x) = 0?
None. h(x) = 0 is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
Can I use h(x) = 0 in text mode, or only in math mode?
Both. h(x) = 0 compiles in running text as well as inside $...$; in a formula keep it in math mode so it gets math fonts and spacing.
Math poweredAIでLaTeXを書く

最高のAI LaTeXエディタ、Overleaf代替

Octreeは15以上の大学の研究者がAIを使って論文をより速く書くのを支援

  • AIで美しいTikZダイアグラムを生成
  • 画像をアップロードしてシームレスにLaTeXに変換
  • 論文の執筆とフォーマットに即座にサポートを取得