Law is a set of rules created and enforceable by social or governmental institutions to regulate behavior. Its precise definition is a matter of longstanding debate. Law has been variously described as a science and as the art of justice. In a nation, law can serve several purposes: (1) to keep the peace and maintain the status quo; (2) to preserve individual rights; (3) to protect minorities against majorities; (4) to promote social justice; and (5) to provide for orderly social change. The degree to which a law accomplishes these goals varies from nation to nation, and the nature of legal systems also varies. Governments range from autocratic to democratic, and the way in which they establish and enforce laws reflects their political and economic structures.

A key feature of the law is that it is a normative science, meaning that its statements about what people ought or should not do are deprived of descriptive characteristics (such as those of a physical law like the law of gravity) and are instead prescriptive in nature. However, this makes it difficult to use standard methods of empirical scientific research to test the content and effectiveness of a law.

Some scholars argue that a law can be evaluated only through its practical effects. In this view, a law’s function is to provide its citizens with certain minimum standards of human behaviour, such as not injuring other people or destroying their property. These standards are established by the legislature or by a legal institution, such as a court.

Other scholars have argued that the primary function of a law is to resolve conflicts between groups. This is the theory behind modern civil law jurisdictions, where a central legislative body sets the rules and judges interpret them. This is in contrast to common law jurisdictions, where judges create law through their decisions in a case-by-case manner.

Another important issue in law is determining the proper role of morality and values in a legal system. The philosopher Richard Posner has argued that a law can only be as valid as the values that supposedly support it. This has been called the moral impact theory of law. Some scholars argue that this theory has serious problems, and that it fails to account for the ways in which law can be abused by authoritarian governments. Others, including Salmond and Greenberg, have proposed other theories that can better account for the role of normative factors in a law’s content.