# intersection {#intersection}

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

## Syntax {#syntax}

`intersection(X, Y)` or `X&Y`

## Arguments {#arguments}

**X** and **Y** can be sets, or integer scalars/vectors of the same length.

## Details {#details}

If both *X* and *Y* are sets, return the intersection of the two sets.

If *X* and *Y* are integer scalars/vectors, conduct the bitwise operation "AND".

## Examples {#examples}

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

6 7 8 & 4 5 6;
// output: [4,5,0]
```

