definite article, late Old English þe, nominative masculine form of the demonstrative pronoun and adjective. After c.950, it replaced earlier se (masc.), seo (fem.), þæt (neuter), and probably represents se altered by the th- form which was used in all the masculine oblique cases.
Old English se is from PIE root *so- "this, that" (source also of Sanskrit sa, Avestan ha, Greek ho, he "the," Irish and Gaelic so "this"). For the þ- forms, see that. The s- forms were entirely superseded in English by mid-13c., excepting a slightly longer dialectal survival in Kent. Old English used 10 different words for "the" (see table), but did not distinguish "the" from "that." That survived for a time as a definite article before vowels (that one or that other).
Adverbial use in the more the merrier, the sooner the better, etc. is a relic of Old English þy, the instrumentive case of the neuter demonstrative (see that).