# im() Function & Examples

Use the im() complex function in Calcul.io. Review its syntax, edit working examples, understand the result, and explore related math functions.

## im

#### im(x)

Try it yourself:

```calculio
im(2 + 3i)
re(2 + 3i)
im(-5.2i)
im(2.4)
```

[re](https://calcul.io/function/re/index.md)

[conj](https://calcul.io/function/conj/index.md)

[abs](https://calcul.io/function/abs/index.md)

[arg](https://calcul.io/function/arg/index.md)

---

## im(): get an imaginary component

**im(x)** returns the imaginary part of a complex number. For `3 + 4i`, `im(3 + 4i)` is 4; for an ordinary real number it is 0.

## Complex-number calculations

Complex values have a real and imaginary coordinate. Pair im() with [re()](https://calcul.io/function/re/index.md) to inspect both parts, and use [conj()](https://calcul.io/function/conj/index.md) to build a value. The [conj()](https://calcul.io/function/conj/index.md) function reverses the imaginary sign, while [abs()](https://calcul.io/function/abs/index.md) gives its magnitude.

## Practical care

im() extracts a component; it does not test whether a result is complex. Tiny floating-point residues can appear where theory predicts zero, so use an appropriate tolerance before declaring an imaginary part absent.

[All functions](https://calcul.io/functions/index.md)
