# square {#square}

**Parent topic:**[Functions](../../Functions/category.md)

## Syntax {#syntax}

`square(X)`

## Arguments {#arguments}

**X** is a scalar/pair/vector/matrix.

## Details {#details}

Return the square of *X*. The data type of the result is always DOUBLE.

## Examples {#examples}

```
square(3);
// output: 9

square(2 4 NULL 6);
// output: [4,16,,36]

square(1..4$2:2);
```

|\#0|\#1|
|---|---|
|1|9|
|4|16|

