Law is a set of rules that are created and are enforceable through social or governmental institutions to regulate behavior. Its precise definition is a matter of longstanding debate and it has been variously described as a science and as the art of justice. Laws can be based on a variety of sources, including empirical (such as the law of gravity) or social science (such as the law of supply and demand in economics). They may be codified through legislation resulting in statutes, interpreted by judges through case law, or established by custom or tradition.
Laws can be either private or public. The former includes contracts, property, family and inheritance, and criminal laws. These may be governed by state or non-state actors, and include private entities such as corporations, associations, and trusts. They are usually enforceable by contract, but their validity and effect is determined by the legal system in which they are created and enforced.
Private laws can also be influenced by ethical principles. For example, tort law aims to ensure that those who act negligently do not cause harm to others. It is a form of public law, although it differs from other forms of public law in that the purpose of tort law is to protect individual rights rather than to promote general welfare.
The development of law as a discipline is largely due to the efforts of scholars who have studied it. The law as an academic field is distinct from the study of other sciences, such as physics, because its normative statements lack the descriptive or causal character found in the scientific fields. This is because the laws of physics describe the natural world and explain what happens, but do not tell us why it occurs; in contrast, laws that govern the behavior of humans tell us how people should behave or should not behave, but they do not provide the causes for this behavior.
Historically, the law has been a highly complex subject. In the ancient world, legal texts such as the Code of Hammurabi were compiled and codified. Roman law was extensively based on Greek philosophy and incorporated detailed rules for many aspects of daily life. In the medieval period, a more formal body of law was developed through the research and compilation of case law by professional jurists.
Modern legal systems generally fall into one of two broad categories, civil or common law. The civil law tradition, which is based on Roman and canon law, is still prevalent in countries that were once colonized by continental European nations. It is also found in other parts of the world, such as Africa and Asia. In mixed jurisdictions, civil law coexists with other legal systems such as the common law or religious law based on scripture. For example, the United States has both common and civil law systems. Despite its complexity, the law is an extremely important part of human society. Its existence allows freedom of speech, the right to privacy, and protection from interference with or attacks on personal honour and reputation.