Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) said:
If it is asked: upon whom are salaams being sent?
The answer is that they said: If there is a group of others with him, then the salaam is upon them; if there is no group with him, then the salaam is upon the angels who are on his right and his left, so he says: As-salaamu ‘alaykum wa rahmat-Allah. End quote.
Ash-Sharh al-Mumti‘, 3/208
To sum up:
When saying the salaam at the end of the prayer, the worshipper intends three things:
- To exit the prayer
- To send salaams upon the recording angels
- To send salaams upon his fellow-worshippers.
If he is praying alone, then he intends when saying the salaam to exit the prayer and send salaams upon the recording angels.
Jazakallah khair Idris!
I believed it was due to saying salaams to the Angels (when praying alone). But then someone said it was saying salaams to the Jinn. I was confused.