Law is the system of rules created and enforced through social or governmental institutions to regulate behaviour, ensure order and protect individuals and communities. Law can be created by a collective legislature and enacted as statutes, decreed by the executive and implemented through regulations, or set by judges through precedent in common law jurisdictions. The laws of a state are also shaped by its constitution, written or tacit, and the rights encoded within it.
Laws can cover a wide range of areas, including criminal law and family and labour law. They can also be framed by regulatory or administrative systems, such as water law and environmental protection laws. Laws can be influenced by the history of a society, for example Roman law was adapted and codified during the medieval period when it was rediscovered by scholars using Latin legal maxims for guidance. The law can also be influenced by the sociology of society and by philosophers, for example Max Weber reshaped thinking on how a state extends its power in ways that Locke or Montesquieu could not have foreseen.
One way to understand the law is through a historical analysis of how it was created and used in different societies. The study of law can therefore provide valuable insight into how a society functions, why it develops in certain ways and how it might change.
The law can be a powerful tool for good or evil. It can help to create peace, preserve the status quo and enable social progress; it can also stifle freedom, oppress minorities and prevent social justice. Consequently, there is constant debate about how a legal system should be balanced between its competing interests.
A basic question is whether the law should reflect morality. The answer to this has been a matter of intense philosophical and scientific debate since ancient times. Utilitarian philosophers, like Jeremy Bentham, argued that the law should be commandments backed by threat of sanction from a sovereign to whom people have a habit of obedience; natural lawyers, such as Jean-Jacques Rousseau, on the other hand, argued that the law reflects an essentially moral and unchangeable set of principles.
The laws of a state are often influenced by the political landscape, which is vastly different from nation to nation. For instance, an authoritarian government may keep the peace and maintain the status quo but it will probably fail to fulfil other core functions of the law, such as ensuring individual rights and promoting social justice (e.g. in Burma or Zimbabwe). In addition, there is the issue of the relationship between law and power. This can be a source of controversy when questions are raised about the extent to which judges and other legal professionals should be able to apply their own sense of justice when interpreting the law or deciding cases. This issue is further discussed in the articles on the legal profession and legal education.