Origins
The prefix 'un-' is the most productive negating prefix in Modern English and one of the oldest word-forming elements continuously used in the language.βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ It descends from Proto-Germanic *un-, itself from Proto-Indo-European *nΜ₯-, the zero-grade of the negating particle *ne. The same root gave Latin 'in-,' Greek 'an-' (αΌΞ½-) and 'a-' (αΌ-), Sanskrit 'a-' and 'an-,' Lithuanian 'ne-,' Old Church Slavonic 'ne-,' and more β a witness to how deep the habit of negating with a nasal particle runs in the Indo-European family.
English in fact has two prefixes spelled 'un-' that merged in Old English and remain indistinguishable in modern spelling. The first is the negator: 'un-' meaning 'not,' as in 'unhappy,' 'unclean,' 'unknown,' 'unkind.' The second is the reversative: 'un-' meaning 'reverse the action of' or 'undo,' as in 'untie,' 'undress,' 'unlock,' 'unfold.' The negating 'un-' attaches to adjectives and the odd noun ('untruth'); the reversative 'un-' attaches to verbs. The two are historically distinct. The reversative 'un-' descends from Proto-Germanic *and- (against, opposite), cognate with German 'ent-' (as in 'entkleiden,' to undress) and Latin 'ante-.' In Old English it had the form 'on-' or 'and-' but fell together with the negator 'un-' both in spelling and in popular parsing.
In Old English (c. 500β1150) 'un-' was already the default way to form negated adjectives: 'uncΕ«ΓΎ' (unknown), 'unhΔl' (unwhole, ill), 'unlΔof' (unbeloved). The reversative prefix appears in verbs such as 'unbindan' (to unbind), 'untΘ³nan' (to unclose), and 'unscΔadan' (to separate). Both senses were inherited directly from common Germanic and appear across cognate languages: German 'un-,' Dutch 'on-,' Old Norse 'o-,' Gothic 'un-.'
Middle English
Middle English (1150β1500) saw the Norman influx bring Latin 'in-' into English via Anglo-Norman French. For several centuries 'un-' and 'in-' competed as negating prefixes, sometimes on the same base word. The general pattern that settled was: 'un-' attaches to native Germanic adjectives and to adjectives of any origin when the tone is informal or native-feeling, while 'in-' attaches to Latinate adjectives. Thus 'unkind' (native) versus 'inelegant' (Latinate), 'unhappy' versus 'insufficient,' 'unclean' versus 'inadequate.' But the rule is soft and 'un-' can attach to Latinate bases freely ('unacceptable,' 'unavailable,' 'uncomfortable,' 'unnecessary').
In Early Modern English (1500β1700) and Modern English, 'un-' has remained maximally productive. It is the default prefix for coining new negated adjectives and participles: 'unfollow,' 'unfriend,' 'unboxing,' 'undocumented,' 'unsubscribe,' 'unplug,' 'uninstall.' Every wave of new technology brings new 'un-' coinages. The reversative 'un-' is equally productive with verbs: 'unplug,' 'uninstall,' 'unpair,' 'unfollow,' 'unmatch.'
A characteristic of 'un-' is its extraordinary permissiveness. Unlike Latin 'in-,' it does not assimilate to the following consonant: we write 'unpopular' rather than 'umpopular,' 'unlawful' rather than 'ullawful,' 'unreal' rather than 'urreal.' It can attach to almost any adjective, participle, or verb, and speakers freely create new words with it that are understood without explanation.
Later History
Representative negating 'un-' words include: unable, unafraid, unaware, unbearable, unbelievable, uncertain, unclear, uncomfortable, uncommon, unconscious, undecided, undone, uneasy, unequal, unexpected, unfair, unfamiliar, unfinished, unfit, unfortunate, unfriendly, unhappy, unhealthy, unimportant, unjust, unkind, unknown, unlikely, unlimited, unlucky, unnatural, unnecessary, unpleasant, unpopular, unreal, unreasonable, unrelated, unreliable, unsafe, unseen, unstable, unsuccessful, unsure, untrue, unusual, unwilling, unwise, unworthy. Representative reversative 'un-' verbs include: unbind, unbuckle, unbutton, uncover, undo, undress, unearth, unfasten, unfold, unhook, unlatch, unleash, unlock, unmask, unpack, unplug, unroll, unscrew, unseal, untangle, untie, unwind, unwrap, unzip.
Some pairs distinguish 'un-' from 'in-' semantically. 'Unhuman' (rare, merely 'not human') contrasts with 'inhuman' (cruel, savage). 'Unartistic' (lacking artistic interest) contrasts with 'inartistic' (badly made). 'Unmoral' (outside the realm of morality, amoral) contrasts with 'immoral' (morally wrong). These doublets reflect the way 'un-' remained the neutral negator while 'in-' specialised for stronger, more Latinate, often disapproving senses.
A peculiarity of 'un-' is that it does not attach well to comparative or superlative adjectives ('unhappier' is marginal, 'unhappiest' likewise) and resists attachment to most nouns (but see 'untruth,' 'unrest,' 'unbirthday' as a Carrollian coinage). It strongly prefers adjectives and past participles.
Latin Roots
Because 'un-' is native Germanic, it is one of the surest markers that a word has been in English a long time, even if the base is Latinate. Words like 'uncomfortable,' 'undetermined,' 'unimaginable,' or 'unforgivable' use 'un-' on French- or Latin-derived bases, producing hybrid forms that have been completely naturalised. This free combination of native prefix with borrowed base is a hallmark of English vocabulary after the thirteenth century.