# \xrightarrow

Used in AMS math to place annotations above or above/below a right-pointing arrow, e.g. labeled maps, limits, or transitions.

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

## Metadata

| Field | Value |
| --- | --- |
| Topic | [Arrows](https://texform.dev/latex/topics/arrows) |
| Packages | ams |
| Allowed mode | math |
| Tags |  |
| Commonality | medium |
| Kind | prefix |

## Syntax

### ams

Argument specification: `o m`

Used in AMS math to place annotations above or above/below a right-pointing arrow, e.g. labeled maps, limits, or transitions.

## Examples

```latex
\xrightarrow{a}
```

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

```latex
\xrightarrow[b]{a}
```

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

## Renderer support

| Package | MathJax | KaTeX | XeTeX |
| --- | --- | --- | --- |
| ams | full | full | full |

## Usage frequency

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

## In TeXForm

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

## Equivalent forms

```latex
\overset{a}{\to}
```

approximate. These approximate the annotated-arrow effect but do not reproduce the same stretching and spacing behavior as \xrightarrow.

```latex
\underset{b}{\overset{a}{\to}}
```

approximate. Close in intent for both labels, but stretching and spacing differ from the AMS construction.

## See also

- [\\xleftarrow](https://texform.dev/latex/commands/xleftarrow)

## Test cases

### ams

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