Complex
mid 17th century (in the sense ‘group of related elements’): from Latin complexus, past participle (used as a noun) of complectere ‘embrace, comprise’, later associated with complexus ‘plaited’; the adjective is partly via French complexe .
wiktionary
From French complexe, from Latin complexus, past participle of complectī(“to entwine, encircle, compass, infold”), from com-(“together”) and plectere(“to weave, braid”). May be analyzed as con-(“ com-”) + -plex. See complect. Doublet of complexus.
etymonline
complex (adj.)
1650s, "composed of interconnected parts, formed by a combination of simple things or elements," from French complexe "complicated, complex, intricate" (17c.), from Latin complexus "surrounding, encompassing," past participle of complecti "to encircle, embrace," in transferred use, "to hold fast, master, comprehend," from com "with, together" (see com-) + plectere "to weave, braid, twine, entwine," from PIE *plek-to-, suffixed form of root *plek- "to plait."
The meaning "involved, intricate, complicated, not easily analyzed" is first recorded 1715. Complex sentence, for one containing one or more subordinate clauses in addition to the principal clause, is attested from 1776.
complex (n.)
1650s, "a whole comprised of interconnected parts," from complex (adj.). Latin completus as a noun meant "a surrounding, embracing, connection, relation." Psychological sense of "connected group of repressed ideas" was established by C.G. Jung, 1907.