Bhagavad Gita Chapter 10, Text 20

Bg 10.20

aham atma gudakesa
sarva-bhutasaya-sthitah
aham adis ca madhyam ca
bhutanam anta eva ca

Word for word: 
aham — I; atma — the soul; gudakesa — O Arjuna; sarva-bhuta — of all living entities; asaya-sthitah — situated within the heart; aham — I am; adih — the origin; ca — also; madhyam — middle; ca — also; bhutanam — of all living entities; antah — end; eva — certainly; ca — and.

Translation by His Divine Grace A. C. Bhaktivedanta Swami Srila Prabhupada:
I am the Supersoul, O Arjuna, seated in the hearts of all living entities. I am the beginning, the middle and the end of all beings.

Purport by His Divine Grace A. C. Bhaktivedanta Swami Srila Prabhupada:
In this verse Arjuna is addressed as Gudakesa, which means “one who has conquered the darkness of sleep.” For those who are sleeping in the darkness of ignorance, it is not possible to understand how the Supreme Personality of Godhead manifests Himself in various ways in the material and spiritual worlds. Thus this address by Krishna to Arjuna is significant. Because Arjuna is above such darkness, the Personality of Godhead agrees to describe His various opulences.

Krishna first informs Arjuna that He is the soul of the entire cosmic manifestation by dint of His primary expansion. Before the material creation, the Supreme Lord, by His plenary expansion, accepts the purusa incarnation, and from Him everything begins. Therefore He is atma, the soul of the mahat-tattva, the universal elements. The total material energy is not the cause of the creation; actually the Maha-visnu enters into the mahat-tattva, the total material energy. He is the soul. When Maha-visnu enters into the manifested universes, He again manifests Himself as the Supersoul in each and every entity. We have experience that the personal body of the living entity exists due to the presence of the spiritual spark. Without the existence of the spiritual spark, the body cannot develop. Similarly, the material manifestation cannot develop unless the Supreme Soul, Krishna, enters. As stated in the Subala Upanisad, prakrty-adi-sarva-bhutantar-yami sarva-sesi ca narayanah: “The Supreme Personality of Godhead is existing as the Supersoul in all manifested universes.”

The three purusa-avataras are described in Srimad-Bhagavatam. They are also described in the Narada Pancaratra, one of the Satvata-tantras. Visnos tu trini rupani purusakhyany atho viduh: the Supreme Personality of Godhead manifests three features – as Karanodaka-sayi Visnu, Garbhodaka-sayi Visnu and Ksirodaka-sayi Visnu – in this material manifestation. The Maha-visnu, or Karanodaka-sayi Visnu, is described in the Brahma-samhita (5.47). Yah karanarnava-jale bhajati sma yoga-nidram: the Supreme Lord, Krishna, the cause of all causes, lies down in the cosmic ocean as Maha-visnu. Therefore the Supreme Personality of Godhead is the beginning of this universe, the maintainer of the universal manifestations, and the end of all energy.