# Absolute value function (abs)

Absolute value of a number, or modulus of a complex one.

## How to write it

### abs(x)

**x**

The number or expression. Takes an expression.

## Examples

- $\displaystyle \left| -3 \right| = 3$

  `abs(-3)`

  In the solver, `abs(-3)` gives `3`.

  [Open in the solver](https://hilberon.com/?q=abs%28-3%29)
- $\displaystyle \left| 3-5 i \right| = \sqrt{34}$

  `abs(3 - 5i)`

  In the solver, `abs(3 - 5i)` gives `sqrt(34)`.

  [Open in the solver](https://hilberon.com/?q=abs%283%20-%205i%29)

## Related functions

- [arg](https://hilberon.com/library/arg)

  Argument of a complex number: its angle in radians.
- [trunc](https://hilberon.com/library/trunc)

  A number with its fractional part cut off.
- [binomial](https://hilberon.com/library/binomial)

  Binomial coefficient: the ways to choose k items out of n.
- [times](https://hilberon.com/library/times)

  Product of numbers: the function form of \*.
- [ceil](https://hilberon.com/library/ceil)

  Least whole number not below a number.
- [subtract](https://hilberon.com/library/subtract)

  A difference: the function form of -.

---
Source: https://hilberon.com/library/abs
