# \absolutevalue

Used as the long-form absolute-value command in the physics package, taking a required brace-delimited expression.

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

## Metadata

| Field | Value |
| --- | --- |
| Topic | [Physics: quantities](https://texform.dev/latex/topics/physics-quantities) |
| Packages | physics |
| Allowed mode | math |
| Tags |  |
| Commonality | low |
| Kind | prefix |

## Syntax

### physics

Argument specification: `s m{}`

Used as the long-form absolute-value command in the physics package, taking a required brace-delimited expression.

## Examples

```latex
\absolutevalue{a}
```

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

```latex
\absolutevalue*{a}
```

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

## Renderer support

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

## In TeXForm

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

### Expands to (physics)

```latex
\absolutevalue{#1}
```

→

```latex
\left| #1 \right|
```

With a leading star, the reparsed form uses plain fences `| #1 |`; with an adjacent sizing control sequence \big, \Big, \bigg, or \Bigg before the brace, it reparses to the corresponding sized fence form.

### [physics/absolutevalue-to-abs](https://texform.dev/rules/physics/absolutevalue-to-abs)

Collapse absolutevalue to the shorter abs helper before fence expansion.

Level: authoring. Fidelity: render.

```latex
\absolutevalue{#1}
```

→

```latex
\abs{#1}
```

```latex
\absolutevalue{z}^2=x^2+y^2
```

→

```latex
\abs{z}^2=x^2+y^2
```

## Equivalent forms

```latex
\abs{#1}
```

exact. MathJax maps both names to the same parse method with the same parameters, including star and sized-prefix behavior.

## See also

- [\\abs](https://texform.dev/latex/commands/abs)
- [\\bqty](https://texform.dev/latex/commands/bqty)
- [\\Bqty](https://texform.dev/latex/commands/Bqty)
- [\\norm](https://texform.dev/latex/commands/norm)
- [\\order](https://texform.dev/latex/commands/order)
- [\\pqty](https://texform.dev/latex/commands/pqty)
- [\\qty](https://texform.dev/latex/commands/qty)
- [\\quantity](https://texform.dev/latex/commands/quantity)
- [\\vqty](https://texform.dev/latex/commands/vqty)

## Test cases

### physics

| Input | Case | MathJax | KaTeX | XeTeX |
| --- | --- | --- | --- | --- |
| \absolutevalue{a} | Positive: baseline | Pass | Fail | Pass |
| \absolutevalue*{a} | Positive: vary:s[0] | Pass | Fail | Pass |
