They are terms in latin, that mean official. Maximum leader of the troop, field marshal, master of the military. It was a title established since Constantino I, to designate the maximum range of a military in ancient Rome.
Magister Militum: pattern of the soldiers, mariscal de campo, shogun, general commander, general captain of the Roman armies since Constantine I until the fall of the Western Roman Empire