Yoga Sutras of Patanjali 2.6
दृग्दर्शनशक्त्योरेकात्मतेवास्मिता ॥
drig-darshana-shaktyoh ekatmata-iva-asmita
Egoism is the identification of the power of seeing with the power of the instrument of seeing.
दृक् (द्रष्टा) और दर्शन-शक्ति (बुद्धि) का एकात्म-सदृश भाव — यही अस्मिता है।