word-forming element meaning "not, opposite of, without" (also im-, il-, ir- by assimilation of -n- with following consonant, a tendency which began in later Latin), from Latin in- "not," cognate with Greek an-, Old English un-, all from PIE root *ne- "not."
In Old French and Middle English often en-, but most of these forms have not survived in Modern English, and the few that do (enemy, for instance) no longer are felt as negative. The rule of thumb in English has been to use in- with obviously Latin elements, un- with native or nativized ones.
late 14c., "heedful, observant" (implied in attentively), from Old French atentif "expectant, hopeful," from past-participle stem of Latin attendere "give heed to" (see attend). Sense of "actively ministering to the needs and wants" (of another person) is from early 16c.
<a href="https://www.etymonline.com/word/inattentive">Etymology of inattentive by etymonline</a>
Harper, D. (n.d.). Etymology of inattentive. Online Etymology Dictionary. Retrieved $(datetime), from https://www.etymonline.com/word/inattentive