- Computing the distance between two integers on a number line
- Operations with absolute value: Problem type 1
- Integer subtraction: Problem type 2
- Integer subtraction: Problem type 1
- Integer addition: Problem type 2
- Integer addition: Problem type 1
- Home
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Computing the distance between two integers on a number pne
A simple way to calculate the distance between numbers on a number pne is to count every number between them. A faster way is to find the distance by taking the absolute value of the difference of those numbers.
Absolute value of a number on a number pne is its distance from 0 on the number pne
For example, the absolute values of 4 and -4, or |4| and |-4|, are both 4.
This method of finding distance on number pne works for numbers both close together and far apart.
For example, the distance between 4 and −4 on the number pne given by the |4 – (−4) | = |4 + 4 | = 8 units
Use the number pne to find the distance between the following integers:
−9 and −3
Solution
Step 1:
On the number pne
Step 2:
Distance between the integers
|−3 −(−9) | = |−3 + 9| = |6| = 6 units
Use the number pne to find the distance between the following integers:
17 and −8
Solution
Step 1:
On the number pne
Step 2:
Distance between the integers
|17 −(−8) | = |17 + 8 | = |25| = 25 units