A troop sergeant major (TSM) is the senior non-commissioned officer in a Royal Artillery troop of the British Army, usually holding the rank of warrant officer class 2.
This differs from a cavalry troop or infantry platoon, in which the highest-ranking non-commissioned officer (NCO) is usually a sergeant.
The rank was formerly current in British cavalry units. It was introduced in 1813 to replace the quartermaster as the senior NCO of a troop, and was roughly equivalent to a colour sergeant in the infantry. As the squadron replaced the troop as the main tactical and administrative division of the regiment, so the squadron sergeant major superseded the troop sergeant major.
It was revived in 1938 as an appointment of the short-lived rank of warrant officer class III (WOIII). The new troop sergeant major, and his infantry counterpart, the platoon sergeant major, were part of an experiment in giving experienced NCOs command of units formerly reserved for commissioned officers (troops and platoons). The experiment was not considered a success, and no promotions were made to the rank after 1940: most existing WOIIIs were commissioned as lieutenants.
The old appointment is presumably why staff sergeants are referred to and addressed as "Sergeant Major" in British cavalry regiments. A staff sergeant can command a cavalry troop, in the same way as the old WOIII troop sergeant majors.