Calligraphic H (Hamiltonian) in LaTeX (\mathcal{H})
- LaTeX command
\mathcal{H}- Package
- No package needed: built into LaTeX
- Mode
- Math mode only
Where it is used
Calligraphic H, used for the Hamiltonian (energy function) and frequently for a Hilbert space.
In classical mechanics Hamilton's equations read \dot{q} = \partial \mathcal{H}/\partial p and \dot{p} = -\partial \mathcal{H}/\partial q. Quantum mechanics usually writes the Hamiltonian operator as \hat{H} and uses \mathcal{H} for the Hilbert space of states, so the two calligraphic meanings can collide in one paper. Statistical physics uses \mathcal{H} for a Hamiltonian functional in the Boltzmann weight e^{-\beta \mathcal{H}}. Learning theory uses it for a hypothesis class. Pick distinct letters if more than one appears. Note that \mathcal only covers capital letters in the default fonts.
Minimal compilable example
Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.
\documentclass{article}
\begin{document}
Calligraphic H (Hamiltonian): $\mathcal{H}$
\[ \dot{q} = \partial_p \mathcal{H}, \quad \dot{p} = -\partial_q \mathcal{H} \]
\end{document}Related symbols
- Psi (Upper)
\Psi - Calligraphic L (Lagrangian)
\mathcal{L} - Omega
\omega - D'Alembertian
\Box - Lambda
\lambda - Laplacian
\nabla^2
Frequently asked questions
- How do I write Calligraphic H (Hamiltonian) in LaTeX?
- Type \mathcal{H} in math mode, for example $\dot{q} = \partial_p \mathcal{H}, \quad \dot{p} = -\partial_q \mathcal{H}$. It works in plain LaTeX without loading any package.
- Which package do I need for \mathcal{H}?
- None. \mathcal{H} is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
- Can I use \mathcal{H} in text mode, or only in math mode?
- Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $\mathcal{H}$ in running text.
최고의 AI LaTeX 편집기, Overleaf 대안
Octree는 15개 이상의 대학의 연구자들이 AI를 사용하여 논문을 더 빠르게 작성하도록 도움
- AI로 아름다운 TikZ 다이어그램 생성
- 이미지를 업로드하고 LaTeX로 원활하게 변환
- 논문 작성 및 서식에 대한 즉각적인 지원 받기