Law is a collection of rules created and enforced by social or governmental institutions to regulate human conduct, and to protect people and property. Its precise definition is a matter of ongoing debate and many books have been written on the subject. It has been characterized as both a science and an art, though it is generally agreed that its proper role is to provide a framework for peaceful society and impose sanctions on those who violate its provisions. Law can be enacted by a group or a single legislature, resulting in statutes; by the executive, resulting in decrees and regulations; or by judges through judicial decisions, resulting in precedent. Government-enforced laws are usually based on a constitution, explicit or implicit, which codifies rights and privileges, sets out the limits of governmental power, and establishes the responsibilities of citizens. Private individuals can also create legal instruments to govern their own affairs, such as contracts and arbitration agreements.
Law is the study of these rules and the system of law that governs a nation or community, and it encompasses many different fields of study and specialisms. These include criminal law, international law and constitutional law; corporate law and intellectual property law; family law and labour law, among others. Law is a discipline with a long history, and many of its concepts and terms have been shaped by the vicissitudes of historical events and cultural contexts. The history of law has not been a linear progression from logical deduction; rather, it has reflected the felt necessities of particular societies, their prevailing moral and political theories, and even the prejudices – avowed or unconscious – that judges and their fellow citizens share.
Most countries employ some form of law, and there are significant differences in how these systems are structured. For example, the United States has a common law system in which laws are derived from judicial decisions, rather than being codified in statutes; this is known as case law. By contrast, other countries have civil law systems in which laws are compiled from a set of codes that define the rules by which a judge must decide a case. In either type of system, the guiding principles are clear: that all men are equal before the law; no one can be a judge in his own cause; a right is reciprocal to an obligation and so on. These maxims have a fundamental influence on the outcome of court cases, and are the basis of legal reasoning. They are not, however, a complete substitute for an analysis of the social and political circumstances in which the case has been brought to the court. This is a crucial component of the field of law known as legal theory.