Hessian in LaTeX (\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.
\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
- Optimal Value
x^* - Gradient
\nabla f(x) - Feasible Set
\mathcal{X} - Lambda
\lambda - Function
f(x) - Lagrangian
\mathcal{L}(x, \lambda)
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.
최고의 AI LaTeX 편집기, Overleaf 대안
Octree는 15개 이상의 대학의 연구자들이 AI를 사용하여 논문을 더 빠르게 작성하도록 도움
- AI로 아름다운 TikZ 다이어그램 생성
- 이미지를 업로드하고 LaTeX로 원활하게 변환
- 논문 작성 및 서식에 대한 즉각적인 지원 받기