# Array operators in Amplitude

> For AI agents: a documentation index is available at [/docs/llms.txt](/docs/llms.txt). Append `.md` to any page URL for markdown, or send `Accept: text/markdown`.

When you [build charts in Amplitude](https://amplitude.com/docs/analytics/charts/build-charts-add-events), you choose between several array operators: `is`, `is not`, `contains`, `does not contain`, `set is`, `set is not`, `set contains`, and `set does not contain`. The diagrams in this article show how each operator behaves so you can choose the correct one for your analysis.

## Equals and does not equal

![Equals A: the shaded region covers all of set A, including the parts it shares with B and C](https://amplitude.com/docs/images/diagrams/array-operators-equals-a.svg) ![Equals A: the shaded region covers all of set A, including the parts it shares with B and C](https://amplitude.com/docs/images/diagrams/array-operators-equals-a.dark.svg)

![Equals A and B: the shaded region covers only the lens where A and B overlap](https://amplitude.com/docs/images/diagrams/array-operators-equals-a-and-b.svg) ![Equals A and B: the shaded region covers only the lens where A and B overlap](https://amplitude.com/docs/images/diagrams/array-operators-equals-a-and-b.dark.svg)

![Equals A or B: the shaded region covers sets A and B in full](https://amplitude.com/docs/images/diagrams/array-operators-equals-a-or-b.svg) ![Equals A or B: the shaded region covers sets A and B in full](https://amplitude.com/docs/images/diagrams/array-operators-equals-a-or-b.dark.svg)

![Does not equal A: the shaded region covers the whole universe except set A](https://amplitude.com/docs/images/diagrams/array-operators-does-not-equal-a.svg) ![Does not equal A: the shaded region covers the whole universe except set A](https://amplitude.com/docs/images/diagrams/array-operators-does-not-equal-a.dark.svg)

![Does not equal B: the shaded region covers the whole universe except set B](https://amplitude.com/docs/images/diagrams/array-operators-does-not-equal-b.svg) ![Does not equal B: the shaded region covers the whole universe except set B](https://amplitude.com/docs/images/diagrams/array-operators-does-not-equal-b.dark.svg)

![Does not equal A or B: the shaded region covers the whole universe except sets A and B](https://amplitude.com/docs/images/diagrams/array-operators-does-not-equal-a-or-b.svg) ![Does not equal A or B: the shaded region covers the whole universe except sets A and B](https://amplitude.com/docs/images/diagrams/array-operators-does-not-equal-a-or-b.dark.svg)

![Does not equal A, and does not equal B: the shaded region covers the whole universe except sets A and B, the same region as a single not-equal filter listing both values](https://amplitude.com/docs/images/diagrams/array-operators-does-not-equal-a-and-b.svg) ![Does not equal A, and does not equal B: the shaded region covers the whole universe except sets A and B, the same region as a single not-equal filter listing both values](https://amplitude.com/docs/images/diagrams/array-operators-does-not-equal-a-and-b.dark.svg)

## Set contains and set does not contain

![Set contains A: the shaded region covers all of set A](https://amplitude.com/docs/images/diagrams/array-operators-set-contains-a.svg) ![Set contains A: the shaded region covers all of set A](https://amplitude.com/docs/images/diagrams/array-operators-set-contains-a.dark.svg)

![Set contains B: the shaded region covers all of set B](https://amplitude.com/docs/images/diagrams/array-operators-set-contains-b.svg) ![Set contains B: the shaded region covers all of set B](https://amplitude.com/docs/images/diagrams/array-operators-set-contains-b.dark.svg)

![Set contains A and B: the shaded region covers only the lens where A and B overlap, because listing two values requires both](https://amplitude.com/docs/images/diagrams/array-operators-set-contains-a-and-b.svg) ![Set contains A and B: the shaded region covers only the lens where A and B overlap, because listing two values requires both](https://amplitude.com/docs/images/diagrams/array-operators-set-contains-a-and-b.dark.svg)

![Set does not contain A: the shaded region covers the whole universe except set A](https://amplitude.com/docs/images/diagrams/array-operators-set-does-not-contain-a.svg) ![Set does not contain A: the shaded region covers the whole universe except set A](https://amplitude.com/docs/images/diagrams/array-operators-set-does-not-contain-a.dark.svg)

![Set does not contain B: the shaded region covers the whole universe except set B](https://amplitude.com/docs/images/diagrams/array-operators-set-does-not-contain-b.svg) ![Set does not contain B: the shaded region covers the whole universe except set B](https://amplitude.com/docs/images/diagrams/array-operators-set-does-not-contain-b.dark.svg)

![Set does not contain A and B: the shaded region covers everything except the lens where A and B overlap, so arrays holding just one of the two still match](https://amplitude.com/docs/images/diagrams/array-operators-set-does-not-contain-a-and-b.svg) ![Set does not contain A and B: the shaded region covers everything except the lens where A and B overlap, so arrays holding just one of the two still match](https://amplitude.com/docs/images/diagrams/array-operators-set-does-not-contain-a-and-b.dark.svg)

![Set does not contain A, and does not contain B: the shaded region covers the whole universe except sets A and B, a larger exclusion than one filter listing both values](https://amplitude.com/docs/images/diagrams/array-operators-set-does-not-contain-a-and-does-not-contain-b.svg) ![Set does not contain A, and does not contain B: the shaded region covers the whole universe except sets A and B, a larger exclusion than one filter listing both values](https://amplitude.com/docs/images/diagrams/array-operators-set-does-not-contain-a-and-does-not-contain-b.dark.svg)

## Set equals and set does not equal

![Set equals A: the shaded region covers only the part of set A outside B and C, because set equals needs an exact match](https://amplitude.com/docs/images/diagrams/array-operators-set-equals-a.svg) ![Set equals A: the shaded region covers only the part of set A outside B and C, because set equals needs an exact match](https://amplitude.com/docs/images/diagrams/array-operators-set-equals-a.dark.svg)

![Set equals B: the shaded region covers only the part of set B outside A and C, because set equals needs an exact match](https://amplitude.com/docs/images/diagrams/array-operators-set-equals-b.svg) ![Set equals B: the shaded region covers only the part of set B outside A and C, because set equals needs an exact match](https://amplitude.com/docs/images/diagrams/array-operators-set-equals-b.dark.svg)

![Set equals A and B: the shaded region covers only the part of the A and B overlap that lies outside C](https://amplitude.com/docs/images/diagrams/array-operators-set-equals-a-and-b.svg) ![Set equals A and B: the shaded region covers only the part of the A and B overlap that lies outside C](https://amplitude.com/docs/images/diagrams/array-operators-set-equals-a-and-b.dark.svg)

![Set does not equal A: the shaded region covers everything except the part of set A outside B and C](https://amplitude.com/docs/images/diagrams/array-operators-set-does-not-equal-a.svg) ![Set does not equal A: the shaded region covers everything except the part of set A outside B and C](https://amplitude.com/docs/images/diagrams/array-operators-set-does-not-equal-a.dark.svg)

![Set does not equal B: the shaded region covers everything except the part of set B outside A and C](https://amplitude.com/docs/images/diagrams/array-operators-set-does-not-equal-b.svg) ![Set does not equal B: the shaded region covers everything except the part of set B outside A and C](https://amplitude.com/docs/images/diagrams/array-operators-set-does-not-equal-b.dark.svg)

![Set does not equal A and B: the shaded region covers everything except the part of the A and B overlap outside C](https://amplitude.com/docs/images/diagrams/array-operators-set-does-not-equal-a-and-b.svg) ![Set does not equal A and B: the shaded region covers everything except the part of the A and B overlap outside C](https://amplitude.com/docs/images/diagrams/array-operators-set-does-not-equal-a-and-b.dark.svg)
