[SIZE=+1]Guru granth defines khalsa as :
ਪਰਿਓ ਕਾਲੁ ਸਭੈ ਜਗ ਊਪਰ ਮਾਹਿ ਲਿਖੇ ਭ੍ਰਮ ਗਿਆਨੀ ॥
[/SIZE][SIZE=+1]ਕਹੁ ਕਬੀਰ ਜਨ ਭਏ ਖਾਲਸੇ ਪ੍ਰੇਮ ਭਗਤਿ ਜਿਹ ਜਾਨੀ ॥੪॥੩॥[/SIZE] kabeer ji
Defination of khalsa from dasam granth
ਜਾਗਤਿ ਜੋਤ ਜਪੈ ਨਿਸ ਬਾਸੁਰ ਏਕ ਬਿਨਾ ਮਨ ਨੈਕ ਨ ਆਨੈ ॥ ਪੂਰਨ ਪ੍ਰੇਮ ਪ੍ਰਤੀਤ ਸਜੈ ਬ੍ਰਤ ਗੋਰ ਮੜੀ ਮਟ ਭੂਲ ਨ ਮਾਨੈ ॥
"He who keeps alight the unquenchable torch of truth, and never swerves from the thought of One God; he who has full love and confidence in God and does not put his faith, even by mistake, in fasting or the graves of Muslim saints, Hindu crematoriums, or Jogis places of sepulchre;
ਤੀਰਥ ਦਾਨ ਦਇਆ ਤਪ ਸੰਜਮ ਏਕ ਬਿਨਾ ਨਹ ਏਕ ਪਛਾਨੈ ॥ ਪੂਰਨ ਜੋਤ ਜਗੈ ਘਟ ਮੈ ਤਬ ਖਾਲਸ ਤਾਹਿ ਨਖਾਲਸ ਜਾਨੈ ॥੧॥
He does not recognize anyone else except One Lord, not even the bestowal of charities, performance of merciful acts, austerities and restraint on pilgrim-stations; the perfect light of the Lord illuminates his heart, then consider him as the immaculate Khalsa.1. written by patshai 10
Defination of khalsa from sarb loh
ਖ਼ਾਲਸਾ ਮੇਰੋ ਰੂਪ ਹੈ ਖ਼ਾਸ ॥ਖ਼ਾਲਸੇ ਮਹਿ ਹੌ ਕਰੌ ਨਿਵਾਸ ॥ ਖ਼ਾਲਸਾ ਮੇਰੋ ਮੁਖ ਹੈ ਅੰਗਾ ॥ ਖ਼ਾਲਸੇ ਕੇ ਹੌਂ ਸਦ ਸਦ ਸੰਗਾ॥ ਖ਼ਾਲਸਾ ਮੇਰੋ ਇਸ਼† ਸੁਹਿਰਦ ॥ ਖ਼ਾਲਸਾ ਮੇਰੋ ਕਹੀਅਤ ਬਿਰਦ ॥ ਖ਼ਾਲਸਾ ਮੇਰੋ ਪਛ ਅਰ ਪਾਤਾ ॥ ਖ਼ਾਲਸਾ ਮੇਰੋ ਸੁਖ ਅਹਿਲਾਦਾ ॥ ਖ਼ਾਲਸਾ ਮੇਰੋ ਮਿੱਤਰ ਸਖਾਈ ॥ ਖ਼ਾਲਸਾ ਮਾਤ ਪਿਤਾ ਸੁਖਦਾਈ ॥ ਖ਼ਾਲਸਾ ਮੇਰੀ ਸੋਭਾ ਸੀਲਾ ॥ ਖ਼ਾਲਸਾ ਬੰਧ ਸਖਾ ਸਦ ਡੀਲਾ ॥ ਖ਼ਾਲਸਾ ਮੇਰੀ ਜਾਤ ਅਰ ਪਤ ॥ ਖ਼ਾਲਸਾ ਸੋ ਮਾ ਕੋ ਉਤਪਤ ॥ ਖ਼ਾਲਸਾ ਮੇਰੋ ਭਵਨ ਭੰਡਾਰਾ ॥ ਖ਼ਾਲਸੇ ਕਰ ਮੇਰੋ ਸਤਿਕਾਰਾ ॥ ਖ਼ਾਲਸਾ ਮੇਰੋ ਸ੍ਵਜਨ ਪ੍ਰਵਾਰਾ ॥ ਖ਼ਾਲਸਾ ਮੇਰੋ ਕਰਤ ਉਧਾਰਾ ॥ ਖ਼ਾਲਸਾ ਮੇਰੋ ਪਿੰਡ ਪਰਾਨ ॥ ਖ਼ਾਲਸਾ ਮੇਰੀ ਜਾਨ ਕੀ ਜਾਨ ॥ ਮਾਨ ਮਹਤ ਮੇਰੀ ਖ਼ਾਲਸਾ ਸਹੀ ॥ ਖ਼ਾਲਸਾ ਮੇਰੋ ਸ੍ਵਾਰਥ ਸਹੀ ॥ ਖ਼ਾਲਸਾ ਮੇਰੋ ਕਰੇ ਨਿਰਬਾਹ ॥ ਖ਼ਾਲਸਾ ਮੇਰੋ ਦੇਹ ਅਰ ਸਾਹ ॥ ਖ਼ਾਲਸਾ ਮੇਰੋ ਧਰਮ ਅਰ ਕਰਮ ॥ ਖ਼ਾਲਸਾ ਮੇਰੋ ਭੇਦ ਨਿਜ ਮਰਮ ॥ ਖ਼ਾਲਸਾ ਮੇਰੋ ਸਤਿਗੁਰ ਪੂਰਾ ॥ ਖ਼ਾਲਸਾ ਮੇਰੋ ਸੱਜਨ ਸੂਰਾ ॥ ਖ਼ਾਲਸਾ ਮੇਰੋ ਬੁਧ ਅਰ ਗਿਆਨ ॥ ਖ਼ਾਲਸੇ ਕਾ ਹੋ ਧਰੋ ਧਿਆਨ ॥ ਉਪਮਾ ਖ਼ਾਲਸੇ ਜਾਤ ਨ ਕਹੀ ॥ ਜਿਹਵਾ ਏਕ ਪਾਰ ਨਹਿ ਲਹੀ ॥ ਸੇਸ ਰਸਨ ਸਾਰਦ ਸੀ ਬੁਧਿ ॥ ਤਦਪ ਨ ਉਪਮਾ ਬਰਨਤ ਸੁਧ ॥ ਯਾ ਮੈ ਰੰਚ ਨ ਮਿਥਿਆ ਭਾਖੀ ॥ ਪਾਰਬ੍ਰਹਮ ਗੁਰ ਨਾਨਕ ਸਾਖੀ ॥ ਰੋਮ ਰੋਮ ਜੇ ਰਸਨਾ ਪਾਂਊ ॥ ਤਦਪ ਖ਼ਾਲਸਾ ਜਸ ਤਹਿ ਗਾਊਂ ॥ ਹੌ ਖ਼ਾਲਸੇ ਕੋ ਖ਼ਾਲਸਾ ਮੇਰੋ ॥ ਓਤ ਪੋਤਿ ਸਾਗਰ ਬੂੰਦੇਰੋ ॥ ਖ਼ਾਲਸਾ ਅਕਾਲ ਪੁਰਖ ਕੀ ਫ਼ੌਜ ॥ ਪ੍ਰਗਟਿਓ ਖ਼ਾਲਸਾ ਪ੍ਰਮਾਤਮ ਕੀ ਮੌਜ ॥ recited by patshai 10
WARNING TO THE KHALSA
ਜਬ ਲਗ ਖ਼ਾਲਸਾ ਰਹੇ ਨਿਆਰਾ ॥ ਤਬ ਲਗ ਤੇਜ ਕੀਉ ਮੈਂ ਸਾਰਾ ॥ ਜਬ ਇਹ ਗਹੈ ਬਿਪਰਨ ਕੀ ਰੀਤ ॥ ਮੈਂ ਨ ਕਰੋਂ ਇਨ ਕੀ ਪ੍ਰਤੀਤ ॥
-------------------------------------------------------------
From above it can be concluded that khalsa is an institution.it is under god's command . khalsa finds god in-self through knowledge and love.
The word ਆਕੀ from bani which means (ਨਖਾਲਸ) that one who is not under hukam ,one who doesn't worship one true lord rather follow rituals like worshiping stones ,persons or thinks that god is only in one particular direction and making pilgrimages (hajj) is the way to achieve god.
The god's command(hukam) shall rule without any manmukh(nakhalas) left .