Law is a set of rules created and enforced by social or governmental institutions to regulate behavior. Its precise definition is a subject of longstanding debate. It has been variously described as a science and as an art of justice.
It is also a concept or idea that is very difficult to prove. Law depends on the shape of the world and the limitations inherent in it. It cannot mandate behaviours which are beyond human capability nor force people to do things which would violate the sanctity of their bodies and minds. Law can serve a number of purposes, such as keeping peace and maintaining the status quo in a nation; however it can also be used to oppress minorities or impose social change at the expense of individual freedoms.
The most basic function of law is to act as a mediator between different groups within society, such as family, business, or community. A societal need for law arises when one group’s actions interfere with another group’s rights or interests. The law is designed to balance these competing interests through a system of courts and tribunals.
Legal systems vary, with some based on religious precepts (e.g. Jewish Halakha and Islamic Sharia), others relying on human elaboration through reasoning (Qiyas and Ijma) and precedent. In the modern world, there is a growing trend towards consolidation of laws across jurisdictions through the development of civil codes and common law. This aims to simplify the law and make it more easily understandable.