Is it permissible to greet a non-Muslim teacher in the classroom or outside?
Praise be to Allaah.
It was narrated that the Prophet (peace and blessings of Allaah be upon him) said: “Do not initiate the greeting to the Jews and Christians.” (Narrated by Muslim, Kitaab al-Salaam). The Jews used to pass by the Prophet (peace and blessings of Allaah be upon him) and say “Al-saam ‘alaykum” meaning death. So the Prophet (peace and blessings of Allaah be upon him) told us to say “Wa ‘alaykum (and also to you).” (Narrated by al-Bukhaari, Kitaab al-Adaab; Muslim, Kitaab al-Salaam).
So you should not initiate the greeting, but if he greets you and initiates the greeting, then say, “Wa ‘alaykum.” But Ibn al-Qayyim (may Allaah have mercy on him) mentioned in Ahkaam Ahl al-Dhimmah that if we know for sure that a kaafir has said “Al-salaamu ‘alaykum,” then we may say, “Wa ‘alaykum al-salaam.”