# nthRoots() Function & Examples

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

## nthRoots

#### nthRoots(A)

#### nthRoots(A, root)

Try it yourself:

```calculio
nthRoots(1)
nthRoots(1, 3)
```

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

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

---

## Find all complex nth roots

**nthRoots(x, n)** returns the complete set of nth roots of x. In the complex plane, a nonzero value has n roots arranged evenly around a circle.

## Why all roots matter

`nthRoots(1, 3)` includes 1 and two complex cube roots of unity. This is useful in polynomial equations, signal analysis, and complex geometry. Use [nthRoot](https://calcul.io/function/nthRoot/index.md) when only the principal root is wanted, and [pow](https://calcul.io/function/pow/index.md) to check each root.

## Caveats

n should be a positive integer. Results may include complex values even when x is real, so use [re](https://calcul.io/function/re/index.md), [im](https://calcul.io/function/im/index.md), or [abs](https://calcul.io/function/abs/index.md) to inspect them. Numerical comparisons should tolerate small rounding differences.

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