Law is the system of rules that regulates the conduct of a society or community. Its chief purposes are to establish standards, maintain order, resolve disputes, and protect liberties and rights. The specifics of these are achieved by different legal systems in varying degrees. For example, in a civil law system, which is found on the majority of continents today, courts determine ownership disputes through the law rather than by fighting it out between competing claimants (like in a property dispute). This helps to prevent violence and provides a peaceful means for people to settle conflicts.
Law also provides a foundation for social change by providing a framework within which new situations may be tested and resolved. A modern democracy, for instance, is built on a constitutional legal system that ensures the separation of powers and participation in decision-making, while guaranteeing supremacy of law over executive and legislative branches. Such a constitutional system also promotes the rule of law, which refers to laws that are publicly promulgated, equally enforced, and independently adjudicated, and which are consistent with international human rights norms and standards.
In the past, a number of different types of legal systems existed around the world, with the most complex being developed in the ancient Roman Empire. Their detailed, enforceable rules were often inspired by Greek philosophy and underwent significant codification during the reigns of Theodosius II and Justinian I. This was an important step in the development of a global legal system, as these codes were adapted for other cultural contexts throughout the Middle Ages and early modern era.
The law is a social construct, and its development and application depends on many factors, including the culture in which it operates, the political system and its structure, and the way in which individuals interact with their environment. It is also a matter of philosophy, with theorists such as Aristotle arguing that law should be based on general principles of right and wrong.
Some forms of law are derived from religion, such as Jewish Halakha and Islamic Sharia, while Christian canon law survives in some church communities. However, most legal precepts are derived through human elaboration.
In the United States, for example, common law systems are based on decisions made by judges in cases that they hear. In contrast, continental European countries rely on civil law systems that are based on concepts and categories that were inherited from Roman and canon law, and which have been augmented by local custom and culture over time. In all legal systems, the fundamentals of law include rights and obligations, accountability to the law, fairness in its application, separation of powers, participatory democracy, and the protection of individual freedoms. See also: administrative law; censorship; crime and punishment; and police. Legal subjects include agency; air law; bankruptcy; carriage of goods; commercial transaction; constitutional law; criminal law; family law; labour law; maritime law; medical jurisprudence; and tort law. There is also a growing field of study devoted to the concept of law and morality, which explores the connection between laws and moral values such as truth, charity, and justice.