The law is a body of rules that regulates conduct in a society and is enforced by a controlling authority through penalties. It serves many purposes, but four are particularly important: establishing standards; maintaining order; resolving disputes; and protecting liberties and rights.
The laws of a particular country are usually derived from statutes or, as in the United States, from judicial decisions that are then codified as case law. Some countries, such as Japan, have a civil law system in which codes outline the rules judges must follow when making their decisions.
Law also covers a wide range of specific topics, such as tax law, banking law, insurance law and medical jurisprudence. Moreover, it has a special framework that shapes politics, economics, history and society. The laws of a nation are shaped by the constitution, whether written or tacit; and they shape power dynamics in society through institutions, communities and partnerships.
The laws of a nation are influenced by religious precepts as well. For example, the Jewish Halakha and Islamic Sharia are explicitly based on divine guidance. Similarly, Christian canon law survives in some church communities as the basis for their laws. However, the law is largely a human invention and even within a given jurisdiction there are considerable differences in how the law is created. Interactions between common law, constitutional law and statutory law give rise to complex systems of law.