Lecture 1.2 - Rational Numbers

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Rational numbers

Madhavan Mukund
https://www.cmi.ac.in/~madhavan

Mathematics for Data Science 1


Week 1
Rational numbers
Cannot represent 19 ÷ 5 as an integer
4
Fractions : 3 5
p
Rational number: , p and q are integers
q
Numerator p, denominator q
Use Q to denote rational numbers

The same number can be written in many ways


3 6 30
= = = ···
5 10 50
Useful to add, subtract, compare rationals
3 3 12 15 27
+ = + =
5 4 20 20 20
3 3 12 15
< because <
5 4 20 20
Madhavan Mukund Rational numbers Mathematics for Data Science 1, Week 1 2/5
Reduced form
Representation is not unique
3 6 30
= = = ···
5 10 50
p
Reduced form : ,
q
where p,q have no common factors
18 3
Reduced form of is
60 10
Greatest Common Divisor: gcd(18, 60) = 6
Recall prime factorization
18 = 2 · 3 · 3, 60 = 2 · 2 · 3 · 5
Common prime factors are 2 · 3
Can find gcd(m, n) more efficiently

Madhavan Mukund Rational numbers Mathematics for Data Science 1, Week 1 3/5
Density
For each integer, we have a next integer and a
previous integer
For m, next is m + 1, previous is m − 1

Next: No integer between m and m + 1


Previous: No integer between m − 1 and m
Not possible for rationals
Between any two rationals we can find
another one
m p
Suppose <
n q 
m p
Their average + /2 lies between them
n q
Rationals are dense, integers are discrete

Madhavan Mukund Rational numbers Mathematics for Data Science 1, Week 1 4/5
Summary

Q: rational numbers
p
, where p, q are integers
q
p n·p
Representation is not unique =
q n·q
Reduced form, gcd(p, q) = 1
Rationals are dense — cannot talk of next or
previous

Madhavan Mukund Rational numbers Mathematics for Data Science 1, Week 1 5/5

You might also like