Subset Calculator

Set A
Set B

Enter elements separated by commas, semicolons, or spaces. See Example

Subset Visualization Elements in Set A Elements in Set B Common Elements

Subset Calculator

What is a Subset?

Imagine you have a big box of toys (let's call it Set B) and a smaller box of toys (Set A). If all the toys in the smaller box are also in the big box, we say that Set A is a subset of Set B. It's like the smaller box fits completely inside the bigger box!

How to Calculate if A is a Subset of B

To check if Set A is a subset of Set B, we need to make sure that every single toy (or element) in Set A is also in Set B. It's like checking off a list to make sure nothing is missing!

Formula

We can write the subset relationship like this:

\[ A \subseteq B \iff \forall x (x \in A \implies x \in B) \]

Where:

  • \(A \subseteq B\) means "A is a subset of B"
  • \(\iff\) means "if and only if"
  • \(\forall\) means "for all"
  • \(x\) represents an element
  • \(\in\) means "is an element of"
  • \(\implies\) means "implies" or "leads to"

Calculation Steps

  1. Write down all the elements in Set A
  2. Write down all the elements in Set B
  3. Look at each element in Set A
  4. Check if that element is also in Set B
  5. If you find an element from A that's not in B, stop! A is not a subset of B
  6. If all elements from A are in B, then A is a subset of B

Example and Visual Representation

Let's say we have two sets of animals:

Set A = {cat, dog}

Set B = {cat, dog, fish, bird}

To check if A is a subset of B, we look at each animal in Set A:

  • Is "cat" in Set B? Yes!
  • Is "dog" in Set B? Yes!

Since all animals in Set A are also in Set B, we can say that A is a subset of B!

We can show this with a picture:

Subset Visualization (A ⊆ B) Set A {cat, dog} Set B {cat, dog, fish, bird} Verification: ✓ cat ∈ B ✓ dog ∈ B ∴ A ⊆ B Set A Elements Set B Elements

In this picture, the red circle (Set A) is completely inside the blue circle (Set B), showing that A is a subset of B!