# setIsSubset() Function & Examples

Use the setIsSubset() set function in Calcul.io. Review its syntax, edit working examples, understand the result, and explore related math functions.

## setIsSubset

#### setIsSubset(set1, set2)

Try it yourself:

```calculio
setIsSubset([1, 2], [3, 4, 5, 6])
setIsSubset([3, 4], [3, 4, 5, 6])
```

---

## Test containment with setIsSubset

**setIsSubset(A, B)** tests whether every member of A is also a member of B. It returns a Boolean and is useful for validation and permission checks.

## Example

{1,2} is a subset of {1,2,3}; the reverse is false. Use [setDifference](https://calcul.io/function/setDifference/index.md) to see which members prevent containment and [setIntersect](https://calcul.io/function/setIntersect/index.md) to inspect overlap.

## Caveats

The empty set is a subset of every set. Duplicates should not affect membership, but normalize uncertain inputs with [setDistinct](https://calcul.io/function/setDistinct/index.md). For equal sets, both subset directions are true; use [deepEqual](https://calcul.io/function/deepEqual/index.md) if representation equality matters too.

[All functions](https://calcul.io/functions/index.md)
