# \overset

Used to place a symbol or text above another mathematical symbol or relation.

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

## Metadata

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

## Syntax

### base

Argument specification: `m m`

Used to place a symbol or text above another mathematical symbol or relation.

## Common tasks

### How to put a label above a relation

```latex
X \overset{\mathrm{iid}}{\sim} \mathcal{N}(0,1)
```

[Open in Playground](https://play.texform.dev/?input=X+%5Coverset%7B%5Cmathrm%7Biid%7D%7D%7B%5Csim%7D+%5Cmathcal%7BN%7D%280%2C1%29)

### How to write a definitional equality

```latex
f(x) \overset{\mathrm{def}}{=} x^2
```

[Open in Playground](https://play.texform.dev/?input=f%28x%29+%5Coverset%7B%5Cmathrm%7Bdef%7D%7D%7B%3D%7D+x%5E2)

### How to stack a symbol on an arrow

```latex
A \overset{f}{\longrightarrow} B
```

[Open in Playground](https://play.texform.dev/?input=A+%5Coverset%7Bf%7D%7B%5Clongrightarrow%7D+B)

## Examples

```latex
\overset{*}{=}
```

[Open in Playground](https://play.texform.dev/?input=%5Coverset%7B*%7D%7B%3D%7D)

```latex
\overset{\text{def}}{=}
```

[Open in Playground](https://play.texform.dev/?input=%5Coverset%7B%5Ctext%7Bdef%7D%7D%7B%3D%7D)

## Renderer support

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

## Usage frequency

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

## In TeXForm

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

## Equivalent forms

```latex
\stackrel{#1}{#2}
```

approximate. Styles might differ, and \\stackrel typically expects a relation symbol as the base

## Test cases

### base

| Input | Case | MathJax | KaTeX | XeTeX |
| --- | --- | --- | --- | --- |
| \overset{a}{b} | Positive: baseline | Pass | Pass | Fail |
| \overset a{b} | Positive: bare[0] | Pass | Pass | Fail |
| \overset{a}b | Positive: bare[1] | Pass | Pass | Fail |
