# \sup

Used for the supremum of a set or mathematical expression

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

## Metadata

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

## Syntax

### base

Argument specification: ``

Used for the supremum of a set or mathematical expression

## Common tasks

### How to write a supremum

```latex
\sup_{x\in S} f(x)
```

[Open in Playground](https://play.texform.dev/?input=%5Csup_%7Bx%5Cin+S%7D+f%28x%29)

### How to write the least upper bound of a set

```latex
\sup A
```

[Open in Playground](https://play.texform.dev/?input=%5Csup+A)

### How to write an essential supremum

```latex
\|f\|_\infty=\operatorname{ess\,sup}|f|
```

[Open in Playground](https://play.texform.dev/?input=%5C%7Cf%5C%7C_%5Cinfty%3D%5Coperatorname%7Bess%5C%2Csup%7D%7Cf%7C)

## Examples

```latex
\sup
```

[Open in Playground](https://play.texform.dev/?input=%5Csup)

```latex
\sup_{x \to 0}
```

[Open in Playground](https://play.texform.dev/?input=%5Csup_%7Bx+%5Cto+0%7D)

```latex
\sup(S)
```

[Open in Playground](https://play.texform.dev/?input=%5Csup%28S%29)

## Renderer support

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

## Usage frequency

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

## In TeXForm

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

## Equivalent forms

```latex
\operatorname*{sup}
```

exact. Using amsmath

## See also

- [\\det](https://texform.dev/latex/commands/det)
- [\\gcd](https://texform.dev/latex/commands/gcd)
- [\\inf](https://texform.dev/latex/commands/inf)
- [\\injlim](https://texform.dev/latex/commands/injlim)
- [\\lim](https://texform.dev/latex/commands/lim)
- [\\liminf](https://texform.dev/latex/commands/liminf)
- [\\limsup](https://texform.dev/latex/commands/limsup)
- [\\max](https://texform.dev/latex/commands/max)
- [\\min](https://texform.dev/latex/commands/min)
- [\\Pr](https://texform.dev/latex/commands/Pr)
- [\\projlim](https://texform.dev/latex/commands/projlim)

## Test cases

### base

| Input | Case | MathJax | KaTeX | XeTeX |
| --- | --- | --- | --- | --- |
| \sup | Positive: baseline | Pass | Pass | Pass |
