← Previous lessonFree lesson 2 of 3 · lesson 2 of 58Next lesson →

Unlock all 58 lessons of Statistics and Probability for Data SciencesFull course ₹40,000 · paid

Price & syllabus
Free lesson · 17 min · no payment

Set Theory Basics: Number Sets and Set-Builder Notation

A free lesson from Skill-Lync's Statistics and Probability for Data Sciences course, on Grow by Skill-Lync · Last updated 16 Nov 2026 · Session: “Week 2 Session 1”

What will you learn in this free Statistics and Probability for Data Sciences lesson?

The lesson defines a set and walks up the number sets N, Z, Q, R and C, showing how a repeating decimal such as 0.333 becomes a fraction. It then covers the membership symbol, curly-bracket notation and a first set-builder example for all x with |x| at most 100.

  • Natural, integer, rational, real and complex numbers
  • Converting repeating decimals into P by Q
  • Membership and non-membership symbols for sets
  • Writing a set in set-builder form

What comes after lesson 2?

The next free lesson is lesson 3, “Set Theory Problems: Subsets, Null Sets and Equivalent Sets” (17 min). Later in Skill-Lync's Statistics and Probability for Data Sciences course (paid): lesson 4, Week 2 Session 3; lesson 5, Week 2 Session 4; lesson 6, Week 3 Session 1. The full course has 58 lessons (21 h 38 min of video); see the course overview or its price and syllabus.

Lesson transcript

Machine transcript of the lesson audio (lightly cleaned). Technical terms may contain errors; the video is the reference.

Hey, welcome back guys. In today's class, we will be learning about set theory. Okay, so let us proceed. In the previous week, what did we learn? We were not doing much of mathematics, right? We learned about what AI is, what ML is, what DL is and we also learned about, you know, what are the minimum requirements that are needed to work in the fields of AI, ML and DL. So now this week, we are actually getting into mathematics. So we start from set theory because this is a very basic thing and if you understand set theory well, you will be able to understand probability.

Okay, which follows next and after that we will drill into statistics. Let's go here. So what are we seeing here? In this week, we will be seeing about what set theory is, what are the mathematical notations, what are the different types of set? Then we will also learn about the representation of a set. We will get into the algebra of set and finally we conclude with Venn diagrams. Okay, so the learning objectives for this week is detail about set theory and algebra of sets and Venn diagrams. Let us get into set theory. So what is a set? Set is nothing but a collection of items. The items can be anything, okay? So I have written few things here. So the first set here you can see is the vowels in English language. A, E, I, O, U. Then again, these are numbers. I have just picked up some random numbers from 1, 2, 4, 174. Then we have batsmen, a set of batsmen, Sachin Tendulkar, Adam Gilqvist, Mithali Vaj, Sean Pollock, Dwayne Lava, Sanat Jaisuvia.

Then you have a bag of chocolates, Davy Milk, Lactokin, Ekler, Perk, Munch. These are something we relished in childhood, right? Then you have, you know, a set of tennis players, Rafael Nadal, Roger Federer, Sevina Williams and Novak Djokovic. Okay, these are nothing but sets. So sets can be anything. There is no restriction that the items inside a set have to be mathematical. They can be anything. Okay, I have just given you an example of 5 sets. Okay, so in our childhood, we always know one set, right? We always know there is something called natural numbers. Natural numbers contain all numbers from 1 to infinity. So this is a set of all positive numbers. Let me explain you much further. So essentially what happens is, this is the number of line. This is something we learnt, right? Let me go back to black. Okay, so this is your number of line. This is something we all learnt. We have 1, 2, 3, 4, 5, 6 and this goes on up to infinity.

Right? So what happens is, here you have a set of all numbers from 1 to infinity. They are all equidistance. The distance between 1 and 2 is equal to 2 and 3 and this is something we all know. Right? We have been using this from our childhood. Like in LKG, UKG only we learnt 1, 2, 3, 4. This is represented as N which is nothing but natural numbers. Okay? Okay. This set contains all the positive numbers and this is something which we all know, right? From our childhood from our childhood from LKG, UKG. The next set we proceed is, this is a set of positive and negative integers and this is called as Z. Okay? This contains all the elements from minus infinity to infinity.

Z plus usually represents positive numbers while Z minus represents negative numbers. So you can see here I am representing from minus 12 to 12. Right? So you can see here this entire natural numbers. Right? Now you can see that this natural number comes here. Okay? If this is your Z, Z is nothing but your positive and negative integers. If 0 is here, if 0 is here, now you can see your 1, 2, 3, 4, 5, 6 which are nothing but the natural numbers is now a part of a much bigger set. This set contains from minus infinity to infinity. Again the rules are similar. You have say minus 5, minus 4, minus 3, up to minus 1. The distance between 5 and 4 is same as minus 4 and minus 3. You can see this. This is a much bigger set now. This one is a much bigger set and our original set.

Which is called N. The natural numbers is now a part of a much bigger set. So usually you know what we do is when we are writing, we write something like this. Okay? So to represent that this is natural number. Similarly for Z we do like this. Z plus means positive integers. Z minus means negative integers. Okay? So after seeing natural numbers and you know integers, we know that our number line is not complete. Right? For instance, if I ask you how many people are there in your home?

Definitely it is a number, right? 5, 6, something like that. Similarly if I ask you how many classmates do you have or how many people do go to the school? The numbers are all whole numbers. They are essentially integers. You either have 5 people going to school or 6 people going to school. You don't have 5.5. Right? Similarly you have negative numbers which are also you know integers. Minus 5, minus 6, minus 7. But then in real life we also meet numbers like 5.6, 7.3, 8.4. Right? Those are called rational numbers. So any numbers, any number that can be represented as a form P by Q where Q not equal to 0 is called a rational number.

Okay? Okay? Let me give you more explanation. Okay? So now you have 0 here. This is Z plus. This is Z minus. We have been dealing with the set called Z which represents the integer. So now what I am doing is I am now making a set of rational numbers. Okay? Rational numbers is represented by the letter Q. So usually what we do is we do something like this. You know make it look something different. So what happens is Q is a set of rational numbers. What does this set contain? These contain all the members of Z, N and also numbers which can be written in the format P by Q. Meaning you can write it in the format P by Q. So you can say is 0.3333 going up to infinity. Is this a rational number? Yes.

This is a rational number. Let me show you how. Supposing you have X is equal to 0.333. Now I am telling you multiply both sides with 10. So you have 10X is equal to 3.333. Right? Which I write it as 10X is equal to 3 plus X. What is X? X is 0.333. This is going on up to infinity. So let me add a bar here. So now you have something like that. So 9X is equal to 3. X is equal to 3 by 9. Which is equal to 1 by 3. So I am able to write number which is going you know up to more than infinite decimal places. But still I am able to write it in a P by Q format. Right?

So this is a rational number. Let us do another problem. Like if suppose I have 0.3628362836283628 keeps repeating. I can do the same thing. Now instead of multiplying by 10 I will multiply by 1, 2, 3, 4. So 10,000 into 0.3648 is equal to 3648.3648. And this goes on. Right? This is not 4. This is 2. So let me change it. Okay? So what happens is I have 10X is equal to 10,000X is equal to 3648 plus X. So again this becomes 999X is equal to 3648. So X is equal to 3648 divided by 999. Right?

So although this was a you know a very long decimal number. There were infinite points. But because of the repeativity I could represent this in a P by Q format. So you can extend this. You can have a 5 digit number repeating, a 10 digit number repeating, even a 1000 digit you know repeating. So all these numbers can be written in P by Q format. So these are all rational numbers. Okay? However, we have a scenario where the numbers might not repeat. They can just be random. 5, 4, 9, 3, 2, 4, anything. It can be anything. This just goes on.

These kind of numbers can never be written in terms of P by Q. Okay? So these numbers are called irrational numbers. For representing these irrational numbers, we cannot use our set Q. Because set Q contains only rational numbers. Numbers that can be written in the form P by Q. Even a number 1, 2, 3. The integers can also be written as 3 by 1, 2 by 1. Right? So they are also rational. But then there are few numbers that can never be written in this format. In P by Q format.

Those are called irrational numbers. Which I have written here. And they are represented by set R. Where R means real number. Okay? So now you have the number line. These are natural numbers. I am going to draw points like this to tell you these are the members. Then you realize that no there are also negative numbers. So you have Z. Again you can see some part of the number line is not being covered. Let me change the color. So now what do you want to do? You want to include rational numbers.

Which can come in between. So these belong to the rational numbers. They can be written in the form P by Q. And finally we also have numbers you know. Like which cannot be written in terms of P by Q. But then they are decimal numbers. So they will you know maybe fill this place. I am just using this for a representation. Doesn't mean that a rational number has to come after rational number. Okay? I am just showing you that we are now covering the entire number line.

Okay? So maybe I will use a bigger brush size. So now we have covered the entire number line. Okay? So you can already see. So now you can see. You have natural numbers, they were inside the bigger set Z, which was inside Q and which was inside R. R contains real numbers. So now my question to you is, have we covered all the numbers? Take some time to think. So my question to you is, have we covered all the numbers in the universe? Unfortunately, the answer is a big no, because we have no way to represent square root of minus 1 or square root of minus 2 inside the real axis.

Okay, so now we want to include the complex numbers. Complex numbers are nothing but numbers that have a real part and an imaginary part. Okay, they have a real part and an imaginary part. Usually complex numbers are written in the form X plus IY, where I is equal to square root of minus 1. Now in Python and all, usually it is represented as J. Electrical engineers or electronics engineers who, you know, represent frequencies in terms of complex numbers usually use J. Okay, so I and J both are equivalent. In physics and mathematics, you see I, some of the engineering applications see it as J.

Okay, so now let's proceed. So now we know that complex numbers have two parts, an real part and an imaginary part. So what we do is, complex number, this is a very bad graph. Wait, let me draw it again. I am bad, but essentially you know this is, and this is J, Y. So any complex number can be written as X plus IY. So X is a real number, Y is also a real number. So any complex number, so a number here is X minus IY. Okay, this X and this X is not same.

I am only saying that this X belongs to this number of line and Y belongs to this number of line. So you can see that for representing a complex number, you need two real numbers. One for real part and one for imaginary part. Okay, so now you can see that real part is a part of complex numbers. Okay, complex set. So let me go back here. So we had written, right, natural numbers is a part of integers, integers is a part of rational numbers, rational numbers is part of real numbers, and finally real numbers is part of complex numbers.

Okay, so we write C like this to just denote that this is a set. Okay, let me write it again. So going back to the slides, we have the set of rational numbers. So I have just represented a 7.5 to you. Then you have set of irrational numbers. So irrational numbers contains number as square root of 2, pi, exponential, any non-recurring, non-repeating, you know, long, decimal, all those things are irrational numbers. And finally, you have set of complex numbers like this, where I am writing 2 plus 3, hi, so this is 2, this is 3, and then you need two real lines to represent a complex number.

Okay, so these are the sets which you have already encountered at least in your 12th standard. Okay, so now let us see how to represent a set. So you have a set, before representing a set, let us represent a member of set. Okay, so now this is a Greek letter, this is called Epsilon. Epsilon is used to represent the membership of an element. So let us take this 8. 8 is an element of Z. Z we all know is an integer set, right? All the numbers from minus infinity to infinity are in the set called Z.

And 8 is a member of Z. Similarly, 3 by 7 is a member of Q. 5 plus 4Y is an element of C, C which is nothing but complex. Sachin Tendilkoev is an element of the set batsman. Okay, not an element, you see here right, Epsilon with a slash. This is used to represent a non-membership of an element in a set. For instance, 5 plus 4Y is clearly a complex number. This is not an element of integer set. Similarly, A, the alphabet A is not an element of Q.

Nadal is not an batsman. So this is just an representation. When you see Epsilon with a slash, it means not a member. Epsilon without a slash, it means it's a member. Okay, now let us see how to represent a set. So members of a set are enclosed within a flower bracket. Okay, when I write A, open flower bracket, 1, 2, 3, 4, close flower bracket, it means that I am saying members 1, 2, 3, 4 belong to the set A. For a small set, it is extremely easy.

Okay, you can write. But for a very, very big set, we may have to use the set builder form. Okay, let us go to the set builder form. Now what I am doing is, I am writing here, there is a set called A. A is such that it contains X and sometimes I use colon, sometimes you can also use a slash. Okay, X is an element of Z. When I write X is an element of Z, it automatically tells you that X belongs to integers. Okay, so now you must automatically think that my A set is going to have from minus infinity to plus infinity.

Okay, till here. Now I am telling modulus of X is less than equal to 100, right? Modulus of X is less than equal to 100, meaning I have all the X such that their modulus is less than 100, which means all my members are going to be from minus 100 to 100. Let me explain this more with detail. So as I told you, epsilon means element of, not, epsilon means not an element of. So, supposing I write A is such that it contains X such that X is an element of Z and modulus of X is less than equal to 100.

Okay, this was the example I had given in the PPT. So what this means is that I am going to take all the members of Z whose value is less than or equal to 100. If I had not used the modulus, suppose I wrote something like this, then you know what happened So, in the first case, let me change the color. Okay, in the first case, for this set, A will contain some minus 100, minus 99 to 100, right? Do you see that? For the second set, let us call it B.

Okay, B is equal to X such that X is an element of Z and X is less than equal to 100. Now you see, I am only saying X is less than or equal to 100. But Z itself is a very big set, right? It runs from minus infinity to infinity. So now our set B will have minus infinity, minus infinity, minus 1. It will go on and on, 0, 1, 2, 3 and finally up to 100. So do you see that when we used modulus, we restricted X from minus 100 to plus 100.

But when we just gave X is less than or equal to 100, we are running from minus infinity to 100. Okay, let us take a small break here. When we come back, let us do a much complicated problem. Okay, I recommend you, you know, to take all those 10th standard, 11th standard, 12th standard book problems and solve them so that you understand all these concepts much better. Thank you.

Want the rest of Statistics and Probability for Data Sciences?

Get the full course syllabus and fees.

The full course is paid (₹40,000). We'll send the syllabus and call you back within one working day.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Full course · paid

Unlock the full Statistics and Probability for Data Sciences course

The remaining 55 lessons, mentor-reviewed projects and a certificate come with the paid course (₹40,000). Leave your details: we'll send the syllabus and fees and call you back.

Get the syllabus and fees

A counsellor calls you back within one working day.

By submitting you agree to our Terms and Privacy Policy.

Grow by Skill-Lync · free lesson

Start watching

Free, no payment. Leave your details once and every free lesson on Grow plays straight away. A Skill-Lync counsellor may call you about the full Statistics and Probability for Data Sciences course.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.