# union {#union}

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

## Syntax {#syntax}

`union(X, Y)` or `X|Y`

## Arguments {#arguments}

**X** and **Y** are sets.

## Details {#details}

Return the union of two sets.

## Examples {#examples}

```
x=set([5,5,3,4]);
y=set(8 9 9 4 6);
x | y;
// output: set(8,9,6,4,3,5)
```

