How is the Prime Minister appointed?
The Prime Minister is appointed by the President and he cannot act arbitrarily in this appointment. According to the standard procedure, the President invites the leader of the majority party in the Lok Sabha to form the government. The members of the majority party choose their leader. This leader is then appointed as the Prime Minister.
However, when no single political party has attained an absolute majority in the Lok Sabha, the President may use some options in the appointment of the Prime Minister. Thus, the person wanting to become the Prime Minister needs to prove that he has the support of some smaller groups or parties to have a majority in the House. Once he is able to do so, the President appoints him as the Prime Minister.