late 14c., refleccioun, reflexioun, reflectioun, of surfaces or bodies, "the action of throwing back light or heat," from Old French reflexion, refleccion, and directly from Late Latin reflexionem (nominative reflexio) "a reflection," literally "a bending back," noun of action from past-participle stem of Latin reflectere "to bend back, bend backwards, turn away," from re- "back" (see re-) + flectere "to bend" (see flexible).
Meaning "an image produced by the action of a mirror, etc." is from 1580s. Of the mind, "turning of the thought back upon past experiences or ideas," from 1670s. Meaning "remark made after turning back one's thought on some subject" is from 1640s. Spelling with -ct- recorded from late 14c., established 18c., by influence of the verb. OED considers the version with -x- to be "the etymological spelling," but Fowler (1926) points out that -ct- is usual in the general senses and even technical ones.
A clear differentiation being out of the question, & the variation of form being without essential significance, the best thing to do is to use the commoner spelling, reflection, in all senses. [Fowler, "Modern English Usage," 1926]