# square() Function & Examples

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

## square

#### square(x)

Try it yourself:

```calculio
square(3)
sqrt(9)
3^2
3 * 3
```

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

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

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

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

---

## square(): Squaring a Number

**square()** returns a value multiplied by itself. Squaring produces nonnegative results for real inputs and is useful for distances, energies, variance, and error penalties.

## Use and inverse

square(-3) is 9. Reverse a nonnegative squared quantity with [sqrt()](https://calcul.io/function/sqrt/index.md), noting that the original sign cannot be recovered. Use [pow()](https://calcul.io/function/pow/index.md) for a variable exponent and [dotPow()](https://calcul.io/function/dotPow/index.md) for element-wise array powers.

Large values grow quickly when squared, so keep an eye on overflow and units: squaring a length produces an area-like unit.

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