# Ordering integers

#### Complete Python Prime Pack

9 Courses     2 eBooks

#### Artificial Intelligence & Machine Learning Prime Pack

6 Courses     1 eBooks

#### Java Prime Pack

9 Courses     2 eBooks

Integers − The set of whole numbers and their opposites (No decimals or fractions)

Positive Integers − Integers greater than zero are positive integers. On the number line, the positive integers are to the right of 0.

Negative Integers − Integers less than zero are negative integers. On the number line, the negative integers are to the left of 0.

Zero is neither positive nor negative.

### Comparing and ordering integers

We compare integers two at a time. Using the number line, we take the integer on the left as smaller to the integer on the right. For example: -7 and 22

We find that -7 lies to the left of zero and 22 lies to the right of zero on the number line. So, -7 < 22

Similarly, we compare say 15 and 31. We find that 15 lies on left while 31 lies on the right on the number line. So, 15 < 31

We know that positive integers on the number line keep increasing towards right. Similarly, the negative integers on the number line keep decreasing towards the left. Any integer to the right on the number line is relatively greater than any integer on its left.

For example, we order the integers given below from least to greatest

−3, 6, 14, −8,

Comparing −3 and −8, −8 <−3; comparing 6 and 14, 6 < 14 as it lies to the left of 14 so ordering the four integers we write as follows

−8 < −3 < 6 < 14

Order the following integers from least to the greatest:

9, −5, 7, 2, 5

### Solution

Step 1:

The smallest number = −5; The largest number = 9

Step 2:

Comparing the integers two at a time and ordering them from least to greatest we get −5 < 2 < 5 < 7 < 9

Order the following integers from the greatest to the least:

27, 12, −13, −10, 0

### Solution

Step 1:

The smallest number = −13; The largest number = 27

Step 2:

Comparing the integers two at a time and ordering them from greatest to least we get 27 > 12 > 0 > −10 > −13