# symmetricDifference {#symmetricdifference}

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

## Syntax {#syntax}

`symmetricDifference(X, Y)` or `X^Y`

## Arguments {#arguments}

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

## Details {#details}

Return the union of two sets minus the intersection of the two sets.

## Examples {#examples}

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

y^x;
// output: set(5,8,3,9,6)

x^y;
// output: set(8,5,3,6,9)
```

