Units can add to or reduce the depth of their formation by a single rank at a penalty of half their Movement rate, or by two ranks if they remain stationary. A rear rank still counts as a rank even if it only contains one model, although no close combat benefit is conferred unless it contains at least four models.
The units in Fig. 1 are each deployed in two ranks, although only the third unit has sufficient rear rankers to earn a combat resolution bonus because the rank has four models.
In Fig. 2, there is a unit of 15 models arranged in three ranks, and the same unit redeployed into two and four ranks. In both cases the centre front model remains in place (the ideal position for the unit's champion) whilst the length of the line is reduced or expanded as evenly as possible about this centre point.
Often, as in this case, you will have to decide whether to move models from the left or right side as the number of models in the line shifts from odd to even, but you must still try to keep the centre front rank model as close to the centre as possible.
The easiest way to reduce a rank is to remove an entire rank from the unit's formation, and then rearrange the models evenly to the each side.
When adding a rank remove a file from one end of the formation and line it up at the back, then, if there is sufficient room, remove the file from the other side of the formation and line it up - and so on until there is no room left to rearrange a whole file.
When adding or reducing ranks you must be careful to ensure that there is room for the models to fit into their new formation.
The formation change is not permitted if space is blocked by other models or impassable terrain or buildings, if the edges of a line should creep into difficult terrain the unit does not already occupy, or if models must move over an obstacle.