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.
By the 1830s the Westminster system of government (or cabinet government) had emerged; the Prime Minister had become primus inter pares or the first among equals in the Cabinet and the head of government in the United Kingdom. The political position of Prime Minister was enhanced by the development of modern political parties, the introduction of mass communication (inexpensive newspapers, radio, television and the internet), and photography. By the start of the 20th century the modern premiership had emerged; the office had become the pre-eminent position in the constitutional hierarchy vis-à-vis the Sovereign, Parliament and Cabinet.
Prior to 1902, the Prime Minister sometimes came from the House of Lords, provided that his government could form a majority in the Commons. However as the power of the aristocracy waned during the 19th century the convention developed that the Prime Minister should always sit in the lower house. As leader of the House of Commons, the Prime Minister's authority was further enhanced by the Parliament Act of 1911 which marginalised the influence of the House of Lords in the law-making process.
To date two of the Prime Ministers have been Women; Margaret Thatcher and Theresa May.
The Prime Minister is ex officio also First Lord of the Treasury and Minister for the Civil Service. Certain privileges, such as residency of 10 Downing Street, are accorded to Prime Ministers by virtue of their position as First Lord of the Treasury.