LatexNotes

Hat / circumflex (x̂) in LaTeX

\hat{x} places a circumflex accent (a small peak) over a single character, most often used to denote an estimator in statistics or a unit vector in physics and geometry.

LaTeX command

\hat{x}

Not the symbol you meant? Draw it to find the command →

The hat accent modifies a single symbol to signal a specific meaning depending on the field. In statistics, \hat{\theta} denotes an estimator of the parameter \theta, computed from data, while \theta on its own denotes the unknown true parameter being estimated. In vector work, \hat{n} or \hat{\imath} denotes a unit vector, one with length exactly 1, pointing in a given direction.

\hat is sized for a single character; over several letters it stays narrow and sits awkwardly. When a hat needs to sit over more than one symbol, for instance an expression like AB, use \widehat{AB} instead, which produces a wider accent that spans the whole group properly rather than sitting over just the first letter.

For dotted letters like i and j, use \hat{\imath} and \hat{\jmath} (the dotless forms \imath, \jmath) rather than \hat{i} or \hat{j}: without the dotless variants, the accent collides visually with the letter's own dot, producing a cluttered double mark.

Other forms

\widehat{AB}wide hat over several symbols

Examples

$\hat{p}$

an estimator, for instance of a proportion

$\hat{\theta}$

an estimator of a parameter theta

$\hat{\imath}, \hat{\jmath}, \hat{k}$

the standard unit vectors along the x, y and z axes

$\widehat{AB}$

a wide hat spanning two letters, an arc or angle

$\hat{y} = \hat{\beta}_0 + \hat{\beta}_1 x$

a fitted regression line using hatted estimators

Tips and common mistakes

Working from handwritten notes?

LatexNotes turns a photo or PDF of handwritten mathematics into clean, compilable LaTeX - graphs and all. Free to try, no sign-up.

Convert your maths to LaTeX →

FAQ

What does a hat over a variable mean?

It depends on context. In statistics, \hat{\theta} usually denotes an estimator or estimate of the parameter \theta, computed from sample data. In vector work, \hat{n} denotes a unit vector, one with length 1, in the direction of n.

What is the difference between \hat and \widehat?

\hat produces an accent sized for exactly one character and sits awkwardly over more than that. \widehat automatically stretches to span multiple characters cleanly, so use it for expressions like \widehat{AB} rather than \hat{AB}.

Why does \hat{i} look wrong?

The accent collides with the dot already on top of the letter i. Use the dotless \imath inside the hat, \hat{\imath}, which removes the letter's own dot so only the accent remains.

Is \hat the same as \bar or \dot?

No, each accent has its own standard meaning: \hat{x} typically marks an estimator or unit vector, \bar{x} typically marks a mean or average, and \dot{x} marks a time derivative. They are not interchangeable even though all three are accents placed over a single symbol.

See also