Hessian in LaTeX (\nabla^2 f(x))

∇2f(x)\nabla^2 f(x)
LaTeX command
\nabla^2 f(x)
Package
No package needed: built into LaTeX
Mode
Math mode only

Where it is used

Hessian of f at x: the matrix of second partial derivatives, describing local curvature.

In optimization, \nabla^2 f(x) is the Hessian, used in Newton's method, x_{k+1} = x_k - [\nabla^2 f(x_k)]^{-1} \nabla f(x_k), and in second-order conditions: a positive definite Hessian at a stationary point means a strict local minimum. Be careful: in physics and PDEs, \nabla^2 f means the Laplacian, a scalar equal to the trace of the Hessian, often written \Delta f. Clarify which you mean, or use H_f or \nabla\nabla^\top f for the matrix. Convexity of a twice-differentiable function is equivalent to \nabla^2 f(x) \succeq 0 everywhere.

Minimal compilable example

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

∇2f(x)⪰0∀x∈dom⁡f\nabla^2 f(x) \succeq 0 \quad \forall x \in \operatorname{dom} f
\documentclass{article}
\usepackage{amsmath}
\begin{document}
Hessian: $\nabla^2 f(x)$

\[ \nabla^2 f(x) \succeq 0 \quad \forall x \in \operatorname{dom} f \]
\end{document}

Related symbols

All Optimization →

Frequently asked questions

How do I write Hessian in LaTeX?
Type \nabla^2 f(x) in math mode, for example $\nabla^2 f(x) \succeq 0 \quad \forall x \in \operatorname{dom} f$. It works in plain LaTeX without loading any package.
Which package do I need for \nabla^2 f(x)?
None. \nabla^2 f(x) is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
Can I use \nabla^2 f(x) in text mode, or only in math mode?
Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $\nabla^2 f(x)$ in running text.
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