The hat marks estimators in statistics (x̂ for an estimate of x), unit vectors in physics (n̂) and Fourier transforms. \widehat stretches over a group; \hat sits on one character.
All ways to write it
\hat{x}single letterNo package needed\widehat{xyz}wide hatNo package needed\hat{\mathbf{n}}unit vectorNo package needed\^{a}text mode âNo package needed
Example
\hat{\beta} = (X^T X)^{-1} X^T yThe least-squares estimator, hat marking the estimate.
Questions
Why does \widehat look the same as \hat on one letter?
On a single letter they coincide. \widehat only grows over two or more characters.
Using hat in Confluence
Confluence Cloud has no built-in LaTeX. With LaTeX Math for Confluence you add a math macro to any page, type \hat{x} and it renders inline or as a block, with a live preview while you edit. Every command on this page renders there without extra packages.