word-forming element, in English meaning usually "out of, from," but also "upwards, completely, deprive of, without," and "former;" from Latin ex "out of, from within; from which time, since; according to; in regard to," from PIE *eghs "out" (source also of Gaulish ex-, Old Irish ess-, Old Church Slavonic izu, Russian iz). In some cases also from Greek cognate ex, ek. PIE *eghs had comparative form *eks-tero and superlative *eks-t(e)r-emo-. Often reduced to e- before -b-, -d-, -g-, consonantal -i-, -l-, -m-, -n-, -v- (as in elude, emerge, evaporate, etc.).
1827, originally short for ex-Catholic; see ex-. Since 1929 as abbreviation for ex-wife, ex-husband, etc. Also used in some commercial compound words for "from, out of."
1650s, "physician; medical student," from Latin medicus "physician" (see medical (adj.)); modern sense of "serviceman in a military medical corps" is recorded by 1925.