Etiquette of offering Greetings
The Prophet (sal Allahu alaihi wa sallam) said, “The riding one should greet the walking one, and the walking one should greet the sitting one, and the small number of persons should greet the large number of persons.”
[Sahih Al-Bukhari and Muslim]
A narration in Sahih Al-Bukhari adds: “The young should greet the elderly.”
The Prophet (sal Allahu alaihi wa sallam) taught us from the above ahadith that:
- The one on a mount (riding) should greet the one walking.
- The one who is passing by should greet the one who is sitting.
- The young person should send greetings to the older the person.
- A small crowd should greet the larger crowd.
If there are different or contradicting situations from the above points you can change or reverse the sending of Salam (e.g. the young is sitting and the old is passing it does not matter if the older person sends Salam first), there is nothing wrong with this, but it is better to follow the above manners whenever we can.
And Allah knows best!