prefix of reversal, deprivation, or removal (as in unhand, undo, unbutton), Old English on-, un-, from Proto-Germanic *andi- (source also of Old Saxon ant-, Old Norse and-, Dutch ont-, Old High German ant-, German ent-, Gothic and- "against"), from PIE *anti "facing opposite, near, in front of, before, against" (from PIE root *ant- "front, forehead," with derivatives meaning "in front of, before").
More or less confused with un- (1) through similarity in the notions of "negation" and "reversal;" an adjective such as unlocked might represent "not locked" (un- (1)) or the past tense of unlock (un- (2)).
tangle v.
mid-14c., nasalized variant of tagilen "to involve in a difficult situation, entangle," from a Scandinavian source (compare dialectal Swedish taggla "to disorder," Old Norse þongull "seaweed"), from Proto-Germanic *thangul- (source also of Frisian tung, Dutch tang, German Tang "seaweed"); thus the original sense of the root evidently was "seaweed" as something that entangles (itself, or oars, or fishes, or nets). "The development of such a verb from a noun of limited use like tangle 1 is somewhat remarkable, and needs confirmation" [Century Dictionary]. In reference to material things, from c. 1500. Meaning "to fight with" is American English, first recorded 1928. Related: Tangled; tangling. Tanglefoot (1859) was Western American English slang for "strong whiskey."