The law is a system of rules governing human conduct, created and enforced by people in a society. The law gives people a framework within which to live their lives and provides protection against the arbitrary exercise of power by individuals or groups. It is a fundamental part of any social order and shapes politics, economics, history and society in many ways. Laws can be formulated by a constitution, written or tacit, and can be made by legislative bodies or through court decisions. The study of law is a broad and multifaceted field that encompasses both the practice of defending rights, providing justice and interpreting legal history and philosophy.
In the modern world, most countries have a constitution that sets the overall framework for the nation and then makes further laws that provide details of how things should work. This includes defining what is legal to do and establishing the penalties for breaking the laws. Individuals generally have enough freedom to do what they wish as long as it is not illegal, and the laws are generally created with some degree of consensus by elected representatives or judicially enforced through courts.
The practice of law involves advising clients about their rights, representing them in court and giving them decisions and punishments. Lawyers are typically regulated by the government or independent regulating bodies and have a distinct professional identity which can be verified through specified legal procedures. The legal profession itself has many sub-fields, such as criminal law; corporate law; family law; and property law.
Most societies use the law to govern their activities and promote societal peace and well-being. The four main purposes of the law are establishing standards, maintaining order, resolving disputes and protecting liberties and rights. In a well-ordered society, the law ensures that everyone has access to medical care, housing, education and employment, and protects their privacy.
Law can also limit the power of a government and prevent corruption by setting checks and balances on that power, such as a free press and democratic elections. The law can also provide guidance for people in conflict with each other by establishing principles that will be deemed fair in a dispute.
The law can be based on religious precepts, for example Jewish Halakha and Islamic Shari’ah or Christian canon law, which are then further elaborated by judges through interpretation, Qiyas (reasoning by analogy) and Ijma (consensus) to produce detailed legal systems. Other secular sources of law include the law of companies, which traces back to the medieval Lex Mercatoria; and common commercial law such as agency, insurance, bills of exchange, carriage of goods and sales law. All of these laws are then influenced by philosophical and ethical considerations, which have been reshaped by the works of philosophers such as Max Weber and Montesquieu. The law can also shape politics, economics, history and society by describing how people may or cannot change their environment through governmental regulation. See also censorship; crime and punishment; and war and armed forces.