Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Number System and Arithmetic
  • Algebra
  • Set Theory
  • Probability
  • Statistics
  • Geometry
  • Calculus
  • Logarithms
  • Mensuration
  • Matrices
  • Trigonometry
  • Mathematics
Open In App
Next Article:
Representation of a Set
Next article icon

Set Theory Formulas

Last Updated : 06 Jun, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

In mathematics, a set is simply a collection of well-defined individual objects that form a group. A set can contain any group of items, such as a set of numbers, a day of the week, or a vehicle. Each element of the set is called an element of the set.

Example: A = { 2, 4, 6, 8 }.

A is a set and  2, 4, 6, and 8 are elements of the set or members of the set. Elements written in a set can be used in any order, but cannot be repeated. All elements of a set are represented by lowercase letters in the alphabet. 

We can also write this as 2 ∈ A, 4 ∈ A, etc. The cardinality of the set is 4. Here are some commonly used sets. 

  1. N: Set of all natural numbers
  2. Z: Set of all integers
  3. Q: Set of all rational numbers
  4. R: Set of all real numbers
  5. Z+: Set of all positive integers.

Set Formulas

A set formula is a formula related to set theory in mathematics. A set is a well-defined collection of objects made up of individual elements. Set knowledge helps you apply set formulas in areas related to statistics, probability, geometry, and sequences.

Set Formulas on the Number of Elements of Sets

If n(A) and n(B) represent the number of elements in two finite sets A and B, respectively, then

  • n (A ∩ B) = n(A) + n(B) - n(A U B)
  • n(A) = n(A U B) + n(A ∩ B) - n(B)
  • n(B) = n(A U B) + n(A ∩ B) - n(A)

If sets A and B are disjoint sets then

  • n(A U B) = n(A) + n(B)
  • A ∩ B = ∅
  • n(A - B) = n(A)

Sets Formulas on Properties of Sets 

Set formulas have almost the same properties as real or natural numbers. Aggregations also have commutative, associative, and distributive properties. The set formula according to the properties of the set is as follows.

  • Commutativity

A⋂ B = B⋂ A 
A∪ B = B∪ A

  •   Associativity

A⋂ (B⋂ C) = (A⋂ B)⋂ C
A∪ (B∪ C) = (A∪ B)∪ C

  • Distributivity                

A ⋂ (B∪ C) = (A ⋂ B) ∪ (A⋂ C)

  • Idempotent Law

A ⋂ A = A
A ∪ A = A

  • Law of Ø and U

A⋂ Ø = Ø
U ⋂ A = A
A ∪ Ø = A
U ∪ A = U

Sets Formulas of Complement Sets

The set formulas of set complement include the basic law of complement, De Morgan's law, double complement, and the law of empty and universal sets.     

  1. Complement Law                                      A∪A' = U, A⋂A' = Ø and A' = U -  A
  2. De Morgan's Laws                                    (A ∪B)' = A' ⋂B' and (A⋂B)' = A' ∪ B'
  3. Law of Double complementation            (A')' = A
  4. Laws of Empty set and Universal Set       Ø' = ∪ and ∪' = Ø

Sets Formulas of Difference of Sets

  1. A - A = Ø
  2. B - A = B⋂ A'
  3. B - A = B - (A⋂B)
  4. (A - B) = A if A⋂B =  Ø
  5. (A - B) ⋂ C = (A⋂ C) - (B⋂C)
  6. A ΔB = (A-B) U (B- A) 
  7. n(AUB) = n(A - B) + n(B - A) + n(A⋂B)
  8. n(A - B) =  n(A∪B) - n(B)
  9. n(A - B) = n(A) - n(A⋂B)
  10. n(A') = n(∪) - n(A)

Related Reads

  • Cardinality of a Set
  • Representation of a Set
  • Types of Sets
  • Operation on Sets

Sample Questions - Set Theory Formulas

Question 1: What is a set in mathematics? Give examples.

Solution:

A set is a collection of individual elements enclosed in braces and separated by commas.  Example: Collecting vegetables, collecting notebooks. Alternatively, the set can be expressed as set A = { 1, 2, 3, 4 } where 1, 2, 3, and 4 are elements of set A.

Question 2: Why do we use sets in math? 

Solution:

The purpose of using sets is to represent a set of related objects in a group. In mathematics, we usually refer to groups of numbers, such as groups of natural numbers, sets of rational numbers, etc.

Question 3: What is the union of sets?

Solution:

The union of two sets A and B contains elements of both sets A and B . It is denoted by the symbol "U". For example, if  set A = { 2,3 } and  B = { 5,6 } then AUB = { 2, 3, 5, 6 }. 

Question 4: How can we represent the given set in set-builder form A = {1, 3, 5, 7, 9}.

Solution:

We can represent the given set in set-builder form as A = { x | x is an odd natural number less than 10 }.

Question 5: Given A = { 10, 12, 14, 16, 18 } and B = { 14, 16 }. Find A U B and A ⋂ B and A – B.

Solution:

As, A = { 10, 12, 14, 16, 18 } and B = { 14, 16 }
A U B = { 10, 12, 14, 16, 18 }
A ⋂ B = { 14, 16 }
A – B = { 10, 12, 18 }  

Question 6: What is the formula for the intersection of sets?

Solution:

The set expression for the intersection of sets A and B is denoted by ⋂ and n(A⋂B) denotes the elements common to sets A and B. So,  formula for intersection of sets is given by  n(A⋂B) = n(A) + n(B)- n(A∪B) .

Question 7: What is the application of the set formulas?  

Solution:

Set formulas have broad application in many abstract concepts. 

For example, if R is the set of real numbers and Q is the set of rational numbers, then R - Q is the set of irrational numbers. 

Probability theory adopts set rules.  For example, a sample space is a universal set. If A and B are two mutually exclusive events, then P(A∪B) = P(A) + P(B) - P(A⋂B).

Question 8: There are 240 students in the class, 92 playing badminton, 60  table tennis, 80 rugby, 27 playing badminton and table tennis, 20 playing rugby and table tennis, 16 playing badminton and rugby, and 60 do not play any of the three games. Find  

  1. Number of students who play badminton, table tennis, and rugby.
  2. Number of students who play badminton and not rugby.
  3. Number of students who play badminton and rugby and not table tennis.

Solution:

Consider, that n(U) is the total number of students in class and n(B), n(T), and n(R) is the number of students who play badminton, table tennis, and rugby respectively.

Here, n(B∩T) is the number of students who play both badminton and tennis, n(R∩T) is the number of students who play both rugby and tennis and n(B∩R) is the number of students who play both badminton and rugby. 

We are given that: n(U) = 240 , n(B)=92 , n(T)=60 , n(R)=80 ,  n(B∩T)=27 , n(R∩T)=20, n(B∩R)=16 and n(B’∩T’∩R’) ( number of students which do not play any of the three games ) = 60   

Given  n(B’∩T’∩R’)=60  ⇒n(B∪T∪R)’=60

So,  n(B∪T∪R) = n(U) -n(B∪T∪R)’ = 240-60=180

Now , n(B∪T∪R) =  n(B) + n(T) + n(R) - n(B∩T) - n(R∩T) - n(B∩R) + n(B∩T∩R)

180= 92+60+80-27-20-16+n(B∩T∩R)

n(B∩T∩R) =180+63-232=243-232=11

  1. Number of students who play badminton, table tennis and rugby = 11.
  2. Number of students who play badminton but not rugby, n(B-R)  =  n(B)-n(B∩R)=92-16=76
  3. Number of students who play badminton and rugby but not table tennis ,n(B∩R∩T’)= n(B∩R)-n(B∩R∩T) =16-11=5.

Question 9: In a survey of 800 students in a school, 250 students were found to be drinking mojito and 500 were drinking juice, 150 were drinking both mojito and juice. Find how many students were drinking neither mojito nor juice.

Solution:

Consider n(U) is the total number of students in school , n (M) is the number of students which are drinking mojito , n (J) is the number of students which are drinking juice , n(M∩J) are the number of students which are drinking both mojito and juice

Given  , n(U) = 800, n(M) = 250,n(J) = 500,n(M∩J) = 150

We have to find number of students which are drinking neither mojito nor juice , n(M’∩J’) =  n(M∪J)’

n(M∪J)’ = n(u)-n(M∪J)
n(M∪J) = n(M) +n(J)-n(M∩J)=250+500-150=600
 n(M∪J)’ = 800 - 600 = 200.

Conclusion

The Set theory is fundamental in mathematics providing a structured way to the discuss and analyze collections of objects. The key formulas including those for the union, intersection and differences of the sets enable precise calculation and manipulation of these collections. The Mastery of set theory formulas is crucial for the solving complex problems in the various mathematical fields and real-world applications from the computer science to probability theory.


Next Article
Representation of a Set

P

prachikathuria09
Improve
Article Tags :
  • Mathematics
  • School Learning
  • Maths-Formulas

Similar Reads

    Set Theory
    Set theory is a branch of mathematics that deals with collections of objects, called sets. A set is simply a collection of distinct elements, such as numbers, letters, or even everyday objects, that share a common property or rule.Example of SetsSome examples of sets include:A set of fruits: {apple,
    3 min read
    Set Theory Formulas
    In mathematics, a set is simply a collection of well-defined individual objects that form a group. A set can contain any group of items, such as a set of numbers, a day of the week, or a vehicle. Each element of the set is called an element of the set.Example: A = { 2, 4, 6, 8 }. A is a set and 2, 4
    8 min read

    Representation of Set

    Representation of a Set
    Sets are defined as collections of well-defined data. In Math, a Set is a tool that helps to classify and collect data belonging to the same category. Even though the elements used in sets are all different from each other, they are all similar as they belong to one group. For instance, a set of dif
    8 min read
    Set-Builder Notation
    Set-builder Notation is a type of mathematical notation used to describe sets by naming their components or highlighting the requirements that each member of the set must meet. Sets are written in the form of {y | (properties of y)} OR {y : (properties of y)} in the set-builder notation, where the c
    11 min read

    Types of Set

    Types Of Sets
    In mathematics, a set is defined as a well-defined collection of distinct elements that share a common property. These elements— like numbers, letters, or even other sets are listed in curly brackets "{ }" and represented by capital letters. For example, a set can include days of the week. The diffe
    13 min read
    Empty Set
    Empty Sets are sets with no items or elements in them. They are also called null sets. The symbol (phi) ∅represents the empty set and is written as ∅ = { }. It is also known as a void set or a null set. When compared to other sets, empty sets are seen to be distinctive.Empty sets are used to simplif
    10 min read
    Disjoint Sets
    Disjoint Sets are one of the types of many pair of sets, which are used in Set Theory, other than this other types are equivalent sets, equal sets, etc. Set Theory is the branch of mathematics that deals with the collection of objects and generalized various properties for these collections of objec
    8 min read
    Finite Sets
    Finite set is a collection of finite, well-defined elements. For better understanding, imagine you have a bunch of your favourite toys or snacks. You know exactly how many you have, that's the idea of a finite set in math. A finite set is a way to discuss collections of things you can count. In this
    10 min read
    Universal Sets
    Universal Set is a set that has all the elements associated with a given set, without any repetition. Suppose we have two sets P = {1, 3, 5} and Q = {2, 4, 6} then the universal set of P and Q is U = {1, 2, 3, 4, 5, 6}. We generally use U to denote universal sets. Universal Set is a type of set that
    6 min read
    Subsets in Maths
    Subsets in Maths are a core concept in the study of Set Theory. It can be defined as a group of elements, objects, or members enclosed in curly braces, such as {x, y, z} is called a Set, where each member of the set is unique and is taken from another set called the Parent Set.This article explores
    12 min read

    Operation on Sets

    Set Operations
    A set is simply a collection of distinct objects. These objects can be numbers, letters, or even people—anything! We denote a set using curly brackets.For example: A = {1, 2, 3}Set Operations can be defined as the operations performed on two or more sets to obtain a single set containing a combinati
    10 min read
    Union of Sets
    Union of two sets means finding a set containing all the values in both sets. It is denoted using the symbol '∪' and is read as the union. Example 1:If A = {1, 3. 5. 7} and B = {1, 2, 3} then A∪B is read as A union B and its value is,A∪B = {1, 2, 3, 5, 7}Example 2:If A = {1, 3. 5.7} and B = {2, 4} t
    12 min read
    Intersection of Sets
    Intersection of Sets is the operation in set theory and is applied between two or more sets. It result in the output as all the elements which are common in all the sets under consideration. For example, The  intersection of sets A and B is the set of all elements which are common to both A and B.In
    11 min read
    Difference of Sets
    Difference of Sets is the operation defined on sets, just like we can perform arithmetic operations on numbers in mathematics. Other than the difference, we can also perform the union and intersection of sets for any given set. These operations have a lot of important applications in mathematical pr
    10 min read
    Complement of a Set
    In mathematics, a set is a collection or grouping of well-defined objects. All such objects, when grouped in a set, are called elements. Sets are represented by capital letter symbols, and the elements are placed together in a curly bracket {}.For example, if W is the set of whole numbers, then W =
    10 min read
    Cartesian Product of Sets
    The term 'product' mathematically refers to the result obtained when two or more values are multiplied together. For example, 45 is the product of 9 and 5.To understand the Cartesian product of sets, one must first be familiar with basic set operations such as union and intersection, which are appli
    7 min read

    Application of Set

    De Morgan's Law - Theorem, Proofs, Formula & Examples
    De Morgan's law is the law that gives the relation between union, intersection, and complements in set theory. In Boolean algebra, it gives the relation between AND, OR, and complements of the variable, and in logic, it gives the relation between AND, OR, or Negation of the statement. With the help
    13 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences