# How to write the Hessian

Do you know if there is any command to write "Hess f"? What is the standard? Should I just write it as text?

Thank you!

• You made an error in your command, @Bernard, it should be \DeclareMathOperator{\hess}{Hess}. You forgot a { again! – Clément Feb 26 '16 at 15:07
• Anyway, I'll remove my comment, since there's an answer now. Thanks for being watchful! – Bernard Feb 26 '16 at 15:18

The following will work nicely:

\documentclass{article}

\usepackage{amsmath}
\usepackage{mathtools}
\DeclareMathOperator{\Hessian}{Hess}

\begin{document}
\begin{align}
(\Hessian f)_{ij} &\equiv \frac{\partial^{2} f}{\partial x_{i} \partial x_{j} } \\
\Hessian\left( \frac{x^{2}}{y} \right) &=
\begin{bmatrix}
\frac{2}{y} & - \frac{2x}{y^{2}} \\
-\frac{2x}{y^{2}} & \frac{2x^{2}}{y^{3}}
\end{bmatrix}
\end{align}
\end{document}