# \widehat

Used to place a wider hat accent over grouped math content, such as Fourier transforms or estimated vectors of symbols.

https://texform.dev/latex/commands/widehat

## Metadata

| Field | Value |
| --- | --- |
| Topic | [Accents](https://texform.dev/latex/topics/accents) |
| Packages | base |
| Allowed mode | math |
| Tags | decoration |
| Commonality | medium |
| Kind | prefix |

## Syntax

### base

Argument specification: `m`

Used to place a wider hat accent over grouped math content, such as Fourier transforms or estimated vectors of symbols.

## Common tasks

### How to write a wide hat over two letters

```latex
\widehat{AB}
```

[Open in Playground](https://play.texform.dev/?input=%5Cwidehat%7BAB%7D)

### How to write a Fourier-transform hat

```latex
\widehat{f}(\xi)
```

[Open in Playground](https://play.texform.dev/?input=%5Cwidehat%7Bf%7D%28%5Cxi%29)

### How to hat a product

Use \widehat when \hat looks too narrow.

```latex
\widehat{xy}
```

[Open in Playground](https://play.texform.dev/?input=%5Cwidehat%7Bxy%7D)

## Examples

```latex
\widehat{xyz}
```

[Open in Playground](https://play.texform.dev/?input=%5Cwidehat%7Bxyz%7D)

## Renderer support

| Package | MathJax | KaTeX | XeTeX |
| --- | --- | --- | --- |
| base | full | full | full |

## Usage frequency

1.66% of formulas in the measured corpus contain this entry, rank 35 of 263 entries with frequency data.

## In TeXForm

TeXForm parses this entry as prefix syntax; the package determines its argument specification.

### [base/widehat-to-hat](https://texform.dev/rules/base/widehat-to-hat)

Drop stretchiness from \widehat by rewriting it to \hat.

Level: equiv. Fidelity: math.

```latex
\widehat{#1}
```

→

```latex
\hat{#1}
```

```latex
\widehat{AB}
```

→

```latex
\hat{AB}
```

## Equivalent forms

```latex
\hat{#1}
```

approximate. For short bases this is often similar, but \widehat is intended for wider grouped content.

## See also

- [\\acute](https://texform.dev/latex/commands/acute)
- [\\bar](https://texform.dev/latex/commands/bar)
- [\\breve](https://texform.dev/latex/commands/breve)
- [\\check](https://texform.dev/latex/commands/check)
- [\\ddddot](https://texform.dev/latex/commands/ddddot)
- [\\dddot](https://texform.dev/latex/commands/dddot)
- [\\ddot](https://texform.dev/latex/commands/ddot)
- [\\dot](https://texform.dev/latex/commands/dot)
- [\\grave](https://texform.dev/latex/commands/grave)
- [\\hat](https://texform.dev/latex/commands/hat)
- [\\mathring](https://texform.dev/latex/commands/mathring)
- [\\tilde](https://texform.dev/latex/commands/tilde)
- [\\vec](https://texform.dev/latex/commands/vec)
- [\\widetilde](https://texform.dev/latex/commands/widetilde)

## Test cases

### base

| Input | Case | MathJax | KaTeX | XeTeX |
| --- | --- | --- | --- | --- |
| \widehat{a} | Positive: baseline | Pass | Pass | Pass |
| \widehat a | Positive: bare[0] | Pass | Pass | Pass |
