Prime Minister of the United Kingdom

The office is not established by any statute or constitutional document but exists only by long-established convention, which stipulates that the monarch must appoint as Prime Minister the person most likely to command the confidence of the House of Commons; this individual is typically the leader of the political party or coalition of parties that holds the largest number of seats in that chamber. The position of Prime Minister was not created; it evolved slowly and erratically over three hundred years due to numerous acts of Parliament, political developments, and accidents of history. The office is therefore best understood from a historical perspective. The origins of the position are found in constitutional changes that occurred during the Revolutionary Settlement (1688--1720) and the resulting shift of political power from the Sovereign to Parliament. Although the Sovereign was not stripped of the ancient prerogative powers and legally remained the head of government, politically it gradually became necessary for him or her to govern through a Prime Minister who could command a majority in Parliament.

Question: does prime minister have to be an mp
Answer: no