Learn

Here’s a summary of what we’ve learned:

  • A set is denoted by a capital letter and is represented by listing all its unique elements inside curly braces.

  • A subset is formed by taking parts of the original set.

  • Basic set operations:

    • The complement of a set A is the set of all elements in the universal set U that are not in A.

    • The cardinality of a set is the number of elements in the set.

  • More set operations:

    • The intersection of two sets A and B, written A ⋂ B, is the set containing all elements of A that also belong to B.

    • The union of two sets, written A ∪ B, is the set of all the elements contained in either set (or both sets).

    • The difference of two sets, written A – B, is the set of all elements of A that are not elements of B.

  • A Venn diagram uses overlapping circles to illustrate the logical relationships between two or more sets of items.

  • The Identity Property for Union says that the union of a set and the empty set is the set itself. For a set A, A ∪ ∅ = A.

  • The intersection of a set with the Universal set is the set itself. For a set A, A ⋂ U = A.

  • Any set intersected with an empty set gives the empty set. A ⋂ ∅ = ∅.

  • The union of any set with the Universal set is the Universal set. A ∪ U = U.

  • Set operations can be used to gain insights into data from datasets/databases.

Take this course for free

By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.
Already have an account?