late 14c., "due proportion of elements or qualities," from temper (v.). The sense of "characteristic state of mind, inclination, disposition" is first recorded 1590s; that of "calm state of mind, tranquility" in c. 1600; and that of "angry state of mind" (for bad temper) in 1828. Meaning "degree of hardness and resiliency in steel" is from late 15c.
"authority to command the national military forces," in extended use "an empire," 1650s, from Latin imperium "command, supreme authority, power" (see empire). Hence Latin phrase imperium in imperio "a state within a state."