Theory:

Comparing two numbers and determine which number is lesser, and which one is greater is useful in many fields. We can compare quantities such as points scored by a tennis player, income of the family, expense of the family, etc.,
Important!
'\(<\)' and '\(>\)' are the symbols used to denote which number is lesser, and which is greater than the other number.
There are two cases in comparing the two numbers. They are as follows:
 
Case (i): Suppose the two numbers in the sequence have a different number of digits then the number with the larger number of digits is greater than the other number.

Case (ii):
Suppose the two numbers in the sequence have an equal number of digits then follow these steps:
 
Step 1: Compare the digits at the leftmost place in both the numbers.

Step 2: If both the numbers have the same digit at the leftmost place, compare their second digit from the left.

Step 3: If the first, as well as the second digit from the left, are equal, then compare their third digit from the left.
Arranging the numbers from the least to the greatest is called ascending order.
Example:
Suppose we have a set of numbers say \(5387, 6865, 6625, 2568, 2129\).
 
Let us follow the procedure to arrange the number with an equal number of digits.
  
Step 1: By comparing the leftmost digit of the numbers, it is clear that the numbers \(2\)568 and \(2\)129 have the same leftmost digit.
 
Step 2: Now compare their second digit from the left. The second digits of 2\(5\)68 and 2\(1\)29 are \(5\) and \(1\). Thus, \(2129\) is the smallest.
 
Step 3: In the same way, the next smallest is \(2568\). The next one is in \(5387\). The remaining will be in the order \(6625\) and at last \(6865\).
 
Therefore, the ascending order of the set of values is \(2129, 2568, 5387, 6625, 6865\).
Arranging the numbers from the greatest to the least is called descending order.
Example:
Consider the same set of numbers \(5387, 6865, 6625, 2568, 2129\).
 
As the descending order is greatest to least, let us arrange it in reverse order.
 
That is, the descending order of the set of values is \(6865, 6625, 5387, 2568, 2129.\)