Gradient in LaTeX (\nabla f(x))

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

Where it is used

Gradient of f at x: the vector of first partial derivatives, pointing in the direction of steepest ascent.

The gradient \nabla f(x) = (\partial f/\partial x_1, \dots, \partial f/\partial x_n)^\top drives first-order methods such as gradient descent, x_{k+1} = x_k - \alpha \nabla f(x_k), and its vanishing is the first-order optimality condition for unconstrained problems. \nabla is the inverted triangle, sometimes called del or nabla. The same operator gives divergence, \nabla \cdot \mathbf{F}, and curl, \nabla \times \mathbf{F}, in vector calculus. Do not confuse it with \Delta, the upright triangle used for the Laplacian or finite differences. Add a subscript, \nabla_x f, when differentiating only with respect to some variables.

Minimal compilable example

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

xk+1=xk−α∇f(xk)x_{k+1} = x_k - \alpha \nabla f(x_k)
\documentclass{article}
\begin{document}
Gradient: $\nabla f(x)$

\[ x_{k+1} = x_k - \alpha \nabla f(x_k) \]
\end{document}

Related symbols

All 최적화 →

Frequently asked questions

How do I write Gradient in LaTeX?
Type \nabla f(x) in math mode, for example $x_{k+1} = x_k - \alpha \nabla f(x_k)$. It works in plain LaTeX without loading any package.
Which package do I need for \nabla f(x)?
None. \nabla f(x) is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
Can I use \nabla f(x) in text mode, or only in math mode?
Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $\nabla f(x)$ in running text.
Math poweredAI로 LaTeX 작성

최고의 AI LaTeX 편집기, Overleaf 대안

Octree는 15개 이상의 대학의 연구자들이 AI를 사용하여 논문을 더 빠르게 작성하도록 도움

  • AI로 아름다운 TikZ 다이어그램 생성
  • 이미지를 업로드하고 LaTeX로 원활하게 변환
  • 논문 작성 및 서식에 대한 즉각적인 지원 받기