Imagine the real line, on the left of the 0 are the negative numbers, on the right of the 0 are the positive numbers. In the line, the negative number which is closer to the 0 is the greater, in this case the number -40 is closer to the 0 than the others, therefore is the greatest.