What is the meaning of      the angels prostrating to Adam and Yoosuf’s brothers prostrating to him?
Question

Why did Allah tell the angels to bow to Adam? I thought boing was only allowed for Allah alone. The same goes for Prophet Yusuf, why did his brothers bow to him?
Praise be to Allah.Prostrating is of two kinds:
 It may an act of veneration and drawing closer to the one to whom one prostrates. This kind of prostration is worship, and should only be done for Allah, according to the laws of the Prophets.
 The second type is a kind of greeting and honouring a person. This is the kind of prostration which Allah commanded the angels to do in the case of Adam, so they prostrated to him as an act of honouring him. It was an act of worship towards Allah on their part, because they were obeying His command to prostrate to Adam.
 The prostration of Yoosuf’s parents and brothers was also a prostration of greeting and honouring, which was permissible according to the law (of Allah) at that time. But according to the sharee’ah brought by the Seal of the Prophets, Muhammad (peace and blessings of Allah be upon him), it is not permissible to prostrate to anyone at all except Allah. Hence the Prophet (peace and blessings of Allah be upon him) said: “If I were to have commanded anyone to prostrate to anyone else, I would have commanded women to prostrate to their husbands.” The Prophet (peace and blessings of Allah be upon him) forbade Mu’aadh to prostrate to him when he (Mu’aadh) said that the People of the Book prostrated to the great ones among them, and he mentioned the hadeeth quoted above. The prohibition in this sharee’ah against prostrating to anyone at all except Allah is an aspect of its perfection in achieving true Tawheed. It is the perfect sharee’ah whose perfection is manifested in all its rulings. Allah says (interpretation of the meaning):
“This day, I have perfected your religion for you, completed My Favour upon you, and have chosen for you Islam as your religion” [al-Maa’idah 5:3]