Origin

Old Englishtemprian 'bring something into the required condition by mixing it with something else', from Latintemperare 'mingle, restrain oneself'. Sense development was probably influenced by Old Frenchtemprer 'to temper, moderate'. The noun originally denoted a proportionate mixture of elements or qualities, also the combination of the four bodily humors, believed in medieval times to be the basis of temperament, hence sense 1 of the noun ( late Middle English). Compare with temperament.

The first sense of temper was ‘a person's state of mind’, either angry or calm. The word goes back ultimately to Latin temperare ‘to mingle’, and in medieval times the noun referred to the right balance in a mixture of elements or qualities, still used of metals. It was particularly associated with the thought of the combination of the four bodily humours ( see humour) believed to control whether you were naturally calm, optimistic, melancholy, or irritable. This dictated what kind of temperament you had, a Late Middle English term from the Latin for ‘correct mixture’.