Law is the set of rules enforced through social or governmental institutions to regulate behavior. Its precise definition is a subject of longstanding debate. It has been described as an art or a science, and it is generally seen to involve the application of rationality to human affairs in a way that aims to ensure fairness and justice. Its principal purposes are establishing standards, maintaining order, resolving disputes and protecting liberties and rights.
It is largely through legal regulation that the modern state controls most aspects of life, from economic activity to personal freedoms, such as the right to travel or to marry. This regulation takes many forms, from the civil laws that govern contracts and property to the criminal laws that punish crimes such as murder or robbery. It also covers a variety of public services, such as energy, gas and water supply.
The sources of law can be codifications, such as statutes passed by the legislature and regulations issued by the executive, or judicial decisions. In “common law” systems, judges’ decisions bind lower courts through the doctrine of stare decisis. In many countries, however, legislation and judicial decisions are on equal footing, resulting in what is often called civil law.
Law shapes politics, economy, history and society in various ways. It is the source of scholarly inquiry into such topics as legal history, philosophy, sociology and economic analysis. Law raises important and complex questions of equality, fairness and justice.