The law, also called jurisprudence, is the discipline and profession concerned with a body of rules and customs that are recognized as binding by a community and enforced by a controlling authority. It includes a legal system, which defines how things are done and what rights people have, and a code of conduct that describes what is and is not acceptable behaviour.
Law is an important tool for ensuring that the needs, wants and values of different people in society are met, but it is not always easy to balance competing demands. For example, some people have a strong desire for equality — for example of gender or social class — which is not necessarily compatible with the goal of maintaining order and addressing criminal activity.
Another key function of law is to provide a formal means for resolving disputes between individuals and groups, and between government and citizens. Disputes may arise over issues such as taxes, immigration, censorship, family law and the use of force by police.
Scholars have different views on the purpose of law. Some, such as Max Weber, see it as a form of social engineering, while others like John Salmond define it as an instrument for securing justice. This could be either distributive or corrective justice, depending on whether a society seeks to distribute benefits or to make up for wrongdoing.