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 Optimization →

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 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