# Problem with the Hermitian adjoint of an operator $\dagger$

Normally it is enough just to write \dag like this \hat A^{\dag} but it doesn't work here!. $$\hat A^{\dag}$$

If you type $\newcommand\dag\dagger$ at the beginning of your post, you can type $$a^\dag$$ and $$b^\dag$$ later. It will work as expected.
I actually use $\newcommand\ket[1]{\left| #1 \right>}$ quite often in quantum physics related posts, so I can confirm it works.
Not all LaTeX commands are supported. We use MathJax for LaTeX rendering, and the list of macros that are implemented is given on their website. In this case you can use \dagger instead.