before vowels electr-, word-forming element meaning "electrical, electricity," Latinized form of Greek ēlektro-, combining form of ēlektron "amber" (see electric). As a stand-alone, formerly often short for electrotype, electroplate.
"variety of magnetite characterized by its power of attracting iron and steel," mid-15c. (earlier magnes, late 14c.), from Old French magnete "magnetite, magnet, lodestone," and directly from Latin magnetum (nominative magnes) "lodestone," from Greek ho Magnes lithos "the Magnesian stone," from Magnesia (see magnesia), region in Thessaly where magnetized ore was obtained. Figurative sense of "something which attracts" is from 1650s.
It has spread from Latin to most Western European languages (German and Danish magnet, Dutch magneet, Italian, Spanish, Portuguese magnete), but it was superseded in French by aimant (from Latin adamas; see adamant (n.)). Italian calamita "magnet" (13c.), French calamite (by 16c., said to be from Italian), Spanish caramida (15c., probably from Italian) apparently is from Latin calamus "reed, stalk or straw of wheat" (see shawm) "the needle being inserted in a stalk or piece of cork so as to float on water" [Donkin]. Chick magnet attested from 1989.
<a href="https://www.etymonline.com/word/electromagnet">Etymology of electromagnet by etymonline</a>
Harper, D. (n.d.). Etymology of electromagnet. Online Etymology Dictionary. Retrieved $(datetime), from https://www.etymonline.com/word/electromagnet