# [`∩`](https://bpl.fast.ai//glyphs/up-shoe.html) — Duplicates / Intersection

Function. Keys: `Alt-c`. Hanzi: `交/重`. Ranks: [`∞`](https://bpl.fast.ai//glyphs/infinity.html) monadic, `∞ ∞` dyadic

`∩Y` keeps the distinct major cells of `Y` that occur more than once, in order of first appearance. It matches cells as [`∪`](down-shoe.md) does.

```bpl
∩"mississippi"      ⍝ "isp"
∩3 1 3 3 2 1        ⍝ 3 1
```

`X∩Y` keeps the major cells of `X` found among the major cells of `Y`. Order and repetitions are retained. An atom on the right acts as a one-item vector. Uses [tolerant](../numbers.md#mathish-mode) matching.

```bpl
1 2 1 3∩1 3        ⍝ 1 1 3
"abcd"∩"bdf"        ⍝ "bd"
[1 2◇3 4◇1 2]∩[1 2◇5 6] ⍝ [1 2◇1 2]
```

## Errors

- `RANK`: `Y` is a scalar, or the set operation would compare cells of different ranks
- `LENGTH`: the major cells of `X` and `Y` differ in shape
