(Photo: herval)


Questions based on the modulus function or absolute value are common in the Common Admission Test (CAT) and other management entrance exams. In simple terms, modulus or the mod is just the non-negative value of the number inside the function. It is often represented as |x|. For example, |5| will be the same as |-5|, which will be 5. It is the distance of the number from the origin. If we have a value like |x – k|, it can be considered as the distance of x from point k on the number line. For example, |x – 2| = 5 is essentially looking for points which are at a distance of 5 units from 2. These points would be -3 and 7.


With one modulus function

If you understand the above idea, you should be able to solve the following questions easily. Let us try them out together.

|x – 7|

  • x is at a distance of less than 3 units from 7
  • So, x will lie between 3 units less of 7 and 3 units more than 7
  • 4
  • To solve it algebraically, we could have considered it as -3
  • 7 – 3
  • 4

|x – 5| > 2

  • x is at a distance of more than 2 units from 5
  • So, x will lie either 2 units more than 5 or below 2 units less than 5
  • x > 7 or x
  • To solve it algebraically, we could have considered x – 5 > 2 or x – 5
  • x > 5 + 2 or x
  • x > 7 or x

When we have an inequality where the coefficient of x is not 1, we can first divide the equation to make the coefficient 1 and then use the above ideas to solve it.

With multiple modulus functions

If we have questions which have values like |x – a| + |x – b|, it is essentially talking about the sum of the distance of x from a and b. If x lies between a and b, then the sum will be a constant b – a, and in all other cases it would be more than that. Let us say, that your home and office are 12 km apart. Imagine that you are you are standing at a point between your home and office. From your location the home and the office would be at separate distances, but the sum of those distances will be 12 km. It is possible that 3 km from your house and 9 km from the office. If you are 8 km from your house, then you are 4 km from the office. If you want the sum of the distances to be more than 12 km, you will need to go beyond the office. Let us take this with a few numbers.

|x – 3| + |x – 7| = 6

  • Now, this essentially means that the sum of the distances of x from 3 and 7 is 6.
  • The gap between them is 4 units, so the minimum possible sum of distances is also 4 units.
  • If you want to have the sum of distance as 6, you need to go 2 units extra.
  • These 2 extra units can be achieved by going 1 unit extra in either direction i.e. by going behind of 3 by 1 unit or by going ahead of 7 by 1 unit.
  • x = 3 – 1 or x = 7 + 1
  • x = 2 or 8

Finding Minimum Value

If you have to find out the minimum value of |x – k(1)| + |x – k(2)| + |x – k(3)|… +… |x – k(n)|, all you need to do is that you arrange the values in an increasing order. I am assuming that k(1)

If n is odd, the minimum value will be [k(n) + k(n-1) + k(n-2)…k(mid + 1)] – [k(mid – 1) + … k(3) + k(2) + k(1)] and it will occur at x = middle value.

If n is even, the minimum value will be [k(n) + k(n-1) + k(n-2)…k(n/2 + 1)] – [k(n/2) + … k(3) + k(2) + k(1)] and it will occur when x lies between the two middle values.

If you are wondering why it happens this way, break down the problem into multiple parts. Minimum value of |x – k(1)| + |x – k(n)| will be k(n) – k(1) and will occur at all points between them. Minimum value of |x – k(2)| + |x – k(n-1)| will be k(n-1) – k(2)

I hope with this you will be able to solve problems on modulus functions and absolute value easily. There is another common type of problems on modulus functions where we are asked to plot the necessary region and find out the area or the number of integral points in the region – but that is probably a topic for another post.


Author Ravi Handa has taught Quantitative Aptitude at IMS for six years. An alumnus of IIT Kharagpur where he studied a dual-degree in computer science, he currently runs www.handakafunda.com and an online CAT coaching course.

Write Comment