What is the purpose of rank and file in Shogun 2 units? You can adjust the rank and file on the units and I'm not sure what they're for. I'm assuming for reserve or for offensive, but I'm not sure.
Rank and file refer to the depth and length of a formation. Deeper formations have more staying power - for example, a unit of cavalry might easily charge and emerge on the other side of a line three men deep, while a square formation will leave them stuck in the middle, exposed to a lot of danger. In general, shallow formations are also much more susceptible to being routed. Part of this is due to the intensity of fighting - a squad of 150 with 15 lines of 5 men each will only fight using 5-10 men at a time, thus greatly limiting casualties and morale swings. A squad of 150 with 3 lines of 50 men each will have almost every member at risk, suffering (and inflicting) casualties at a much greater rate, and thus causing much greater morale swings.
In short, use shallow formations to inflict damage and outflank your opponent if you lack a numerical advantage, and use deep formations to stall and defend chokepoints.
Usually, you'd be setting formation shape by right clicking and pulling. The buttons are rarely used, and mostly serve to allow you to quickly make minor changes, particularly if you need a formation to be just a teeny bit deeper or longer.