Overview
This first module of Mathematics One for Data Science introduces fundamental number concepts used throughout data science and higher mathematics. Starting from counting with natural numbers, the lecture expands to integers, explores arithmetic operations, and ends with divisibility, factors, primes, and the unique prime factorization of integers.
Natural Numbers
- Numbers are abstract quantities that describe what is common to groups of objects, such as seven balls and seven pencils both sharing the number 7.
- Zero (of Indian origin) is essential because it represents counting nothing and makes the place-value number system work.
- The natural numbers are often written as N and traditionally include 0, 1, 2, 3, 4, ... in this course. Some books exclude 0 and write N without it; to be clear, this course may write N0 or explicitly include 0. To understand their role in broader mathematical contexts, you can explore Set Theory: Definitions, Elements, and Subsets.
Integers and the Number Line
- Subtraction exposes a limitation: 5 - 6 goes below zero, so negative numbers are introduced.
- Natural numbers plus their negatives form the integers, written with a double-barred Z: ..., -3, -2, -1, 0, 1, 2, 3, ...
- Natural numbers have a starting point, while integers extend infinitely in both directions.
- The number line arranges integers left to right in increasing order.
Arithmetic Operations
Addition and Subtraction
- Addition and subtraction are basic operations; subtraction is what leads from natural numbers to integers.
Multiplication
- Multiplication is repeated addition: 7 × 4 means four copies of 7, giving 28.
- Multiplication signs: 7 × 4 = 7 · 4; for symbols like m and n, writing mn means m × n.
- Sign rule: one negative factor makes the product negative; two negatives make it positive. Even numbers of minus signs give positive results; odd numbers give negative results.
Exponentiation
- Exponentiation is repeated multiplication: m × m is m2 (called squared because it forms a square); m × m × m is m3 (cubed).
- Higher powers are written m^k and read as 'm to the power k'.
Division
- Division can be viewed as repeated subtraction: sharing 20 mangoes among 5 friends takes 4 rounds, so 20 ÷ 5 = 4.
- If 19 mangoes are divided among 5 friends, 3 full rounds are possible and 4 mangoes remain: quotient = 3, remainder = 4.
- Remainder notation: 19 mod 5 = 4, where 'mod' means modulus/remainder.
Divisibility and Remainders
- a divides b if b mod a = 0; this is written as a | b.
- Equivalent form: b = a × k for some integer k, meaning b is a multiple of a.
- A slash through the bar, e.g. 4 ∤ 19, means 'does not divide'.
- Examples: 4 | 20, 7 | 63, and 32 | 1024.
Factors
- A factor (or divisor) of a number b is any a that divides b evenly.
- Factors come in pairs: if a divides b and b = a × k, then k is also a factor.
- Example: 12 = 1 × 12 = 2 × 6 = 3 × 4, so its factor pairs are (1,12), (2,6), (3,4).
- If a number is a perfect square, the middle factor pairs with itself, e.g. 36 has factor 6 appearing only once in the factor list.
- Non-square numbers have an even number of factors; perfect squares have an odd number of factors.
Prime Numbers
- A prime number has exactly two distinct positive factors: 1 and itself.
- 1 is not prime because it has only one factor.
- The smallest prime is 2, followed by 3, 5, 7, 11, ...
- No even number greater than 2 can be prime because it is divisible by 2; 9 is not prime because it is divisible by 3.
Sieve of Eratosthenes
- The sieve of Eratosthenes generates primes up to a limit by eliminating multiples of each found prime.
- Method: write numbers in a grid, remove 1, circle/keep the first unmarked number as prime, then mark all its multiples as non-prime. Repeat with the next unmarked number.
- Example for primes up to 100: start with 2, remove all multiples of 2; then 3 is prime, remove its remaining multiples; continue with 5, 7, etc.
Prime Factorization
- Every integer can be uniquely decomposed into a product of primes (the prime factorization).
- Example: 12 = 2 × 2 × 3 = 22 × 3.
- Example: 126 = 2 × 3 × 3 × 7 = 2 × 32 × 7.
- This uniqueness is a fundamental result used throughout mathematics. It also underpins more advanced applications, such as Cryptography with Prime Numbers and the RSA Algorithm.
Key Takeaways
- Natural numbers are used for counting and include 0 in this course.
- Integers extend natural numbers with negatives and form the number line.
- Arithmetic operations: multiplication is repeated addition; exponentiation is repeated multiplication; division is repeated subtraction with quotients and remainders.
- Divisibility, factors, and primes build the language of number theory.
- Prime factorization decomposes any integer uniquely into primes.
For a deeper look at how these foundational concepts scale to more complex systems, see Number Systems: Natural Numbers, Integers, Rationals, and Reals.
[Music] so welcome to the first week of mathematics one for data science so we
are going to start with some very basic things which you probably know right from the beginning we are going to start
talking about numbers so in this first module what we are going to talk about is natural numbers and integers so as
you probably remember from as young as you were in school when you first came across numbers we use numbers mainly for
counting so for instance if we see seven balls like this and then we see seven pencils like this then we need to know
that these are the same number of things and for this we use this number seven so seven represents what is common to these
two objects that there are seven balls and seven pencils so seven is an abstract concept in that sense and it
refers to a quantity so we all of course know the numbers 1 2 3 4 and all that so when we see a number of things we can
count them but perhaps the most important number of all which is of Indian origin is 0 so it's quite
important to have a way to represent something when there is nothing to count because without a 0 we cannot use our
place numbering system that we use to manipulate numbers so these numbers starting with 0 I what are often called
the natural numbers now there is some confusion in some books and many books will actually use only 1 2 3 4 to
represent the natural numbers so we use this kind of in with a double line across it could represent the set of
natural numbers and in case there is any confusion whether 0 is included in this set or not now sometimes people will not
include 0 in the set of natural numbers so sometimes to emphasize that we are using 0 we will actually put this
subscript 0 below the end right so we will write either N or n 0 but whenever we are talking about natural numbers it
always includes a 0 now what can we do with natural numbers well we can add them we can subtract them we can
multiply them we can divide them so these are the normal arithmetic operations which you have studied in
school but what is really interesting from a mathematics perspective is when we take natural numbers and we
perform an operation on them do we always get a natural number so if we add two natural numbers do we get a natural
number if we subtract a number from another we get a natural number if we multiply them do we get a natural number
if we divide one by another do we get a natural number so the first operation which fails this test is subtraction
because if we subtract a larger number from a smaller number so supposing we take 6 and subtract it from 5 then we go
below zero right if you have five things and we take away 6 things well we cannot take away 6 things that word subtraction
means so we need to expand the scope of our numbers to allow these operations to work sensibly and this is how we get the
negative numbers so we had the positive numbers 0 1 2 the non negative technically because 0 is neither
positive nor negative so we had the positive numbers 1 2 3 4 we added a zero to account for the fact that we are
counting nothing and now we add symmetrically on the other side negative numbers minus 1 minus 2 minus 3 so this
is just to illustrate why we get them of course this is something that you should know from school so this set which is
the natural numbers extended with the negative numbers is what we call the integers and we use Z with a bar across
it to indicate the set of integers so we have n the set of natural numbers which starts at 0 and goes forward 0 1 2 3 4
and we have the integers which start at no at minus infinity and go to plus infinity so these are both infinite sets
but the natural numbers have a starting point 0 and the integers extend to infinity in both directions so it's very
convenient mentally to think of the integers as forming this kind of a sequence where on the left you have the
very small ones and on the right you have the very long ones and this is normally called the number line so as
you go from left to right the numbers are increasing and this is how the integers are arranged so we said that
subtraction takes us away from natural numbers and we brought the integers so now let's look at the other two
operations that we talked about multiplication and division so let's start with multiplication
so when we say seven times four what we are really saying is take seven objects and make four copies of them so for
instance on the right we have those seven balls that we started with and then we have made four copies of them so
if we want to know how many balls are here then we have seven from the first group seven from the second group and so
on so we have four groups of seven and this is if we add it up going to be 28 so in general this is how we multiply
when we take a number M and multiply it by n what we are doing is we are making n copies of M so we are taking M plus M
plus M n times so in this sense multiplication is repeated addition so we often use this
time sign the X sign for multiplication but this is often cumbersome when we write out the equations so sometimes we
replace this time sign by a dot and sometimes we write nothing at all so if we just write two symbols together we
don't write this normally for numbers because imagine that if I write seven four like this then you don't know
whether it's the number 74 or it's seven times four so if we have numbers we will normally write a dot explicitly between
them like seven times three but when we have names like M or n standing for numbers then if we write m n we assume
that it is one number M multiplied by another number n now we have mintages and integers have signs they are
positive and negative numbers so we have to remember that when we multiply numbers with signs the resulting number
also has a sign and there is a sign rule which basically says that if we have one negative number multiplied by one
positive number then the result is a negative number so minus M so let us assume that M is a positive number so
minus M is a negative number so say -7 times 4 would be minus 28 on the other hand if I take minus 7 and x minus 4
then the two negations will cancel and I will get plus 28 so if you have an even number of minus signs you get a positive
number if you have an odd number of minus signs you get a negative number now just like we have repeated addition
we can also do repeated multiplication so instead of M plus M we can take M times M and this is called M squared and
the reason that is called M Squared is in the picture here so we have now here six balls and six balls so we have six
times six right so this means that we can arrange these six times six balls in a square and this is why we call this
square so this notation M to the power two stands to the fact that M is multiplied by itself twice now if you
multiply it by self three times then we get a cube so here for instance we have three balls by three balls and then we
have a height a stack of three such balls so we have a square of three by three nine balls and we have three
stacks of these one on top of the other so this naturally forms a cube so M times M times M is written M cubed now
unfortunately we live in a three-dimensional world and we can't imagine objects which have more than
three dimensions so our vocabulary star stops with cube so in general if we have M to the power K then we write M times M
times M K times and we just say it's m to the power K we don't have a fancy name for it we just say it is the K
power of M so to emphasize multiplication is repeated addition and exponentiation as we have seen is
repeated multiplication so now let's come to division so you would have seen this familiar problem in school you have
a certain number of objects and you want to divide them among certain number of people so for example supposing you have
20 mangoes and you want to give them to five friends so how many mangoes does each friend get so here on the right we
have this picture and then what you do is well you start by distributing one mango to each friend right so you take
out five mangos and you give them to each of your friends so now you have given away five mangos and you have only
15 mangos left so you repeat the process among the 15 mangos you give away five to your friends one each and now your
fifteen mangos have become ten and do it one more time and your 10 mangos have become five do it a third time a fourth
time rather and the five mangos are now gone so after four rounds of distributing mangos each time giving one
mango each so five mangos per round you have got rid of your twenty mangos so 20 divided by 5 is 4 so here as we
have illustrated division is actually repeated subtraction you keep
subtracting by the number you are trying to divide and finally if you hit zero then you have divided it exactly well
what if you had only 19 mangoes now you know very well that 19 mangoes cannot be evenly divided into 4 into 5 groups so
if you start distributing like we had above the first 3 rounds would go fine you would come from 9 20 19 to 14 from
14 to 9 and then you will come from 9 to 4 and now you have only 4 mangos left and you have 5 friends so you can't give
one each so we have managed to distribute 3 times and we have 4 left over so formally this is written as
saying that the quotient the number of times you can actually divide without getting into a fractional part is 3 and
the remainder that is after you have a little bit left over which you cannot subtract one more time is the remainder
is 4 so 19 divided by 5 the quotient is 3 and the remainder is 4 now very often we will need to use this remainder and
there is a notation for remainder so this is this notation called modulus so modulus is another word for remainder
and it's written as mod so 19 mod 5 is the same as the remainder when 19 is divided by 5 so instead of saying the
remainder of 19 divided by 5 is 4 we will often say 19 mod 5 is 4 so with this notation we can now define what is
a factor so a factor is a number which divides a bigger number evenly without any remainder so a divides B if B mod a
is 0 remember what this mean is means is that if B is divided by a there is no remainder and we write this with this
vertical bar so on the left is the smaller number on the right is a bigger number so a divides B this is what this
is supposed to say and the other way of thinking about it is that B is some multiple of a so if a divides B then a
times some K is equal to B so we have some multiple some number of times that a goes into B
so therefore B is a multiple of it so here are some examples we have already seen that 4 divides 20 because 4 times 5
is 20 7 divides 63 because 7 times 9 is 63 32 divides thousand 24 because 32 times 32 is 1,024 and so on now the
symbol that we use for not being a divisor is just to put a stroke across a vertical line so 4 does not divide 19
because there is no way to multiply anything by 4 and get 19 similarly 9 does not divide hundred
evenly because we get 9 11th and 99 and then we go 208 so we say formally that a is a factor of B if a divides B so a
divides B is the same as saying that a is a factor of B and it's easy to see that factors must come in pairs because
if a divides B then a goes in to be some K times so K also divides B right so K times a is equal to B so both K is a
factor and a is a factor so for instance if you take a number 12 then 1 is a factor because 1 divides everything and
in fact for every number n1 times n is n so the pair for 1 is always the number itself now in this case 12 is divisible
by 2 and 2 goes in 6 times so the pair 2 6 formed two factors 6 times 2 is 12 2 times 6 is 12 and similarly 3 times 4
now of course there is an important site condition which is that sometimes the pair is the same as the number itself
and this happens when the number actually happens to be a perfect square that is it is some number multiplied by
itself so for instance consider 36 so 36 is 6 times 6 so if we look at the factors of 36 and group them in pairs
then we have 1 and 36 we have 2 and 18 we have 3 and 12 we have 4 and 9 and finally we have the factor 6 but 6 is
multiplied by 6 so 6 doesn't produce a new factor as its pair it's just itself so another way of thinking about it is
that if you have something which is not a square you will have an even number of factors you will have 2 plus 2 plus 2
plus 2 if something is a square you'll have an odd number of factors we'll have 2 plus 2 plus 2 and finally
when you come to the number of which it is a square that number will come only once in the list of factors so once we
talk about factors we come to a very interesting class of numbers which are the prime numbers so prime number is 1
which has no factors other than 1 and itself so 1 is a factor always and 1 times n is 1 so 4 we usually write P for
a prime number so a prime number has only two factors 1 and P now it's important that it must have two factors
two separate factors so one technically is not a prime because it has only one factor one itself because one times one
is one and so the only factor that one has is 1 so the smallest prime actually is 2
because it has two factors 1 and itself - and no other factors 3 is also a prime because it has only two factors 1 and 3
2 doesn't go into 3 and so on so we are all familiar with the smaller prime numbers so 2 is the first prime number 3
is the next prime number then 5 then 7 notice that after 2 no even numbers can be primes because they are all multiples
of 2 and so 2 divides them now we come to 9 and 9 is not a prime number because it's a multiple of 3 but 11 is a prime
number and so on so there is actually one clever way which is called the sieve of eratosthenes to generate prime
numbers which is whenever you discover a prime you knock off all the numbers which are multiples of it so we can do
this for instance to get all the prime numbers from 1 200 so what we do is we first lay out a grid like this right we
know that 1 is not a prime so the first prime that we have as a candidate is 2 right so this is how the sieve of
eratosthenes works you lay out the numbers in a grid and now we can try and mark off all the prime numbers which are
up to hundred so we know that 1 is not a prime so we leave one off the grid and we start with 2 so 2 is our first prime
number and what the sieve of eratosthenes is you knock off all multiples of 2 so you knock off all the
even numbers and of course now you can do it in one shot so you can knock off this whole column this whole call them
so all these numbers are not prime so now once you have you have a target so we are looking only up to 100 so up
to 100 we have knocked off all the powers of two or all the multiples of two so now we look at the first number
which has not been marked off and we notice that 3 is a prime because 3 is not yet marked off so now we start
marking multiples of 3 some of them are already marked off because they are multiples of 2 so 6 is already gone but
9 is also gone 12 is already gone but 15 is also gone and so on so we can mark off all the other multiples of 2 which
are not multiples of 3 and so on right so we get this kind of a picture and now having done this assuming we have done
it all the way then we will come and find that 5 is a prime right so this is the process by which if you hunt and
count all the primes up to a certain number n you can write out all the numbers up to N and starting at the left
you can take the first unmarked number call it a prime and mark all its multiples to the right as non primes and
the next unmarked number will be the next prime and so on now this is not necessarily an efficient way to do the
prime numbers but this is a good way to generate them without missing out any one of the important facts that we use
all the time is that every number cannot only be factorized as we have seen into a number of different pairs of factors
it can actually factorize uniquely into the prime numbers that form it so for instance if we look at 12 we said that
12 was 2 times 6 it was also 4 times 3 it was 1 times 12 and so on but fundamentally it has 3 prime factors 2 2
again and 3 so depending on how we combine them for instance we can get 4 times 3 or we can get 2 times 6 and so
on but 2 times 2 times 3 is the absolute unique way of writing 12 as a product of prime numbers and using our
exponentiation notation we can condense this and put the two twos together and say it is 2 to the power 2 or 2 squared
times 3 similarly if we take a number like 126 then it is 2 times 3 6 times 3 18 times 7 so the prime factors are
precisely 2 3 twice and 7 and we can write this as 2 into 3 squared into 7 so this is very important because we use
it implicitly along a lot and we will see later how we use this so this is called the prime factorization right so
every integer can be decomposed into a product of primes in a unique way so to summarize we started with the natural
numbers which we use for counting which are the numbers 0 1 2 3 4 and so on then we extended these numbers with the
negative numbers and this gave us the set of integers so the integers include all the natural numbers as well as the
negative numbers 0 1 2 3 and so on minus 1 minus 2 minus 3 and so on we saw some basic arithmetic operations
on these the usual addition subtraction multiplication division and exponentiation we also looked at what
happens when we divide integers and we don't want to look at fractions then we talked about the quotient which is the
integer number of times that the dividend goes into the number and the remainder is also written as a mod B so
using this notation of a mod B we can talk about divisibility which we write with a vertical bar so a divides B if a
mod B is 0 so the factors of a number are those numbers which divide it and a prime number has exactly two factors 1
and itself and we can always decompose any integer uniquely into the list of factors prime factors that multiply out
to form that number
Natural numbers are abstract quantities used for counting, traditionally written as N. This course includes 0 in the set because zero is essential for representing the absence of objects and making the place-value number system work. Some textbooks exclude 0, so the course may use notation like N0 to be clear.
To find the prime factorization of 126, break it down into prime factors: 126 equals 2 × 63, and 63 equals 3 × 21, which further equals 3 × 7. So the unique factorization is 2 × 3 × 3 × 7, which can be written as 2 × 3² × 7.
The Sieve of Eratosthenes is a method to generate all prime numbers up to a set limit, such as 100. Start by writing numbers in a grid from 1 to 100, remove 1 (not prime), then circle the first unmarked number (2) as prime and mark all its multiples (4, 6, 8, ...) as non-prime. Repeat with the next unmarked number (3), marking its remaining multiples, and continue with 5, 7, and so on until only primes remain.
In integer arithmetic, 'a divides b' (written as a | b) means that b divided by a leaves no remainder, i.e., b mod a = 0. Equivalently, there exists an integer k such that b = a × k, making b a multiple of a. For example, 4 | 20 because 20 ÷ 4 = 5 exactly, but 4 ∤ 19 because 19 ÷ 4 leaves a remainder of 3.
1 is not prime because a prime number is defined as having exactly two distinct positive factors: 1 and itself. The number 1 has only one factor (itself), so it does not meet the definition. The smallest prime is 2, followed by 3, 5, 7, 11, and so on. No even number greater than 2 can be prime because it is divisible by 2.
Factors come in pairs: if a divides b, then b = a × k, and k is also a factor. For non-square numbers like 12, factors occur in distinct pairs (1,12), (2,6), (3,4), giving an even total (6 factors). In contrast, a perfect square like 36 has a middle factor (6) that pairs with itself, resulting in an odd number of factors (9 factors for 36).
The sign rule states: one negative factor makes the product negative; two negatives make it positive. In general, an even number of minus signs gives a positive result, while an odd number gives a negative result. This rule extends to exponentiation: raising a negative base to an even power yields a positive number (e.g., (-3)² = 9), while an odd power yields a negative number (e.g., (-3)³ = -27).
Keep this summary
Save it to LunaNotes and it becomes a real note in your library — editable, searchable, and ready to turn into flashcards or a diagram. Free to start.
Save to LunaNotesOr summarise for another video.
This summary and transcript were automatically generated using AI with the Free YouTube Transcript Summary Tool by LunaNotes.
Related summaries
Understanding the Real Number System: Key Concepts and Definitions
Explore the fundamentals of the real number system, including natural numbers, whole numbers, and irrational numbers.
Statistics for Data Science: The Complete Beginner's Guide
Master the essential statistics needed to become a data scientist. This comprehensive tutorial covers descriptive, predictive, and prescriptive analytics, probability distributions like binomial and Poisson, and key concepts like correlation, covariance, and the Central Limit Theorem, all explained with practical examples.
Understanding Addition and Subtraction: Basics of Arithmetic
Explore the foundational concepts of addition and subtraction, the first arithmetic operations developed by humans. Learn how these operations work, their symbolic representations, and key properties like commutativity and associativity.
Class 10 Maths Half Yearly Marathon: Complete Revision of 8 Chapters
Join Ritik Mishra for an intensive Class 10 Maths half-yearly exam marathon. This session provides a rapid revision of 8 key chapters, including Real Numbers, Polynomials, Pair of Linear Equations, Quadratic Equations, Arithmetic Progressions, Triangles, Coordinate Geometry, and Trigonometry, with important exam-focused questions.
Probability & Statistics: The Ultimate Guide to Modeling Uncertainty (Course Intro)
Professor Steve Brunton launches an exciting new short course on probability and statistics. This introductory overview explains why probability is a foundational tool for data science and machine learning, provides real-world examples from thermodynamics to weather, and outlines what you will learn in the first 10 hours dedicated to probability.
Most viewed summaries
A Comprehensive Guide to Using Stable Diffusion Forge UI
Explore the Stable Diffusion Forge UI, customizable settings, models, and more to enhance your image generation experience.
Kolonyalismo at Imperyalismo: Ang Kasaysayan ng Pagsakop sa Pilipinas
Tuklasin ang kasaysayan ng kolonyalismo at imperyalismo sa Pilipinas sa pamamagitan ni Ferdinand Magellan.
Mastering Inpainting with Stable Diffusion: Fix Mistakes and Enhance Your Images
Learn to fix mistakes and enhance images with Stable Diffusion's inpainting features effectively.
Pamamaraan at Patakarang Kolonyal ng mga Espanyol sa Pilipinas
Tuklasin ang mga pamamaraan at patakaran ng mga Espanyol sa Pilipinas, at ang epekto nito sa mga Pilipino.
How to Install and Configure Forge: A New Stable Diffusion Web UI
Learn to install and configure the new Forge web UI for Stable Diffusion, with tips on models and settings.
Found this summary useful?
Take it with you. One click puts it in your own LunaNotes library.
Save to LunaNotes