# How to put a \dot accent above a \hat accent in math mode?

I use ${\dot \hat E}$ to put a hat and dot on top of an E simultaneously. However, an error occurs.

• Welcome to TeX.SE! – SAM Jul 2 '16 at 4:12
• $\dot{\hat{E}}$ should help ... – Zarko Jul 2 '16 at 4:16

First, be sure to load the amsmath package, as it provides for better positioning of stacked math accents. Second, write

$\dot{\hat{E}}$


A full MWE (minimum working example):

\documentclass{article}
\usepackage{amsmath}
\begin{document}
$\dot{\hat{E}}$
\end{document}


Just for comparison, here's the output of \dot{\hat{E}} if the amsmath package is not loaded:

• This shows why it's preferable to always teach the “braced syntax" – egreg Jul 2 '16 at 10:58
• Question of taste for you @Mico: if dot denotes time derivative and hat denotes preferred reference frame, would it make more sense to \hat{\dot\omega} or \dot{\hat\omega}? – Steven B. Segletes Jul 17 '18 at 17:38
• Perhaps \frac{d\hat\omega_k}{dt} makes the moist sense. – Steven B. Segletes Jul 17 '18 at 17:46
• @StevenB.Segletes - Thanks for these comments. I will readily concede that your understanding of what the dot and hat accents may mean is probably (almost surely, actually! -- I'm an economist; dot-accents tend to be used but rarely in mathematical economics and econometrics) a lot better than mine. I especially like the suggestion of not using both accents in combination and to "differential fraction" notation instead. Readers will quite likely agree. – Mico Jul 17 '18 at 18:02