Law is a system of rules that a society or government develops in order to deal with crime, business agreements and social relationships. It also refers to the people who work in this system, such as a judge or an attorney.

The core subjects of law are broadly divided into criminal and civil law, though they tend to overlap and intertwine in practice. Law is often seen as the expression of a country’s political ideology and values, but it can also be influenced by the broader culture of a community, such as in terms of a religion’s religious laws or a region’s cultural history.

In the modern sense of the term, law includes both written and unwritten rules that guide behaviour, from a country’s constitutional principles to its courtroom procedure. Historically, the concept of law has included both a body of written legal rules (such as the Jewish Halakha or Islamic Shari’a) and a more informal legal tradition developed through interpretations and precedent (such as the Jewish Talmud and Muslim Hadith).

An important part of the study of law is analysing the way it works, which involves understanding how different parts of the legal process function together. This is particularly important in areas such as criminal law, which involves a complex chain of events that can be difficult to trace, and family law, which concerns delicate issues like divorce or the custody of children.

Other areas of law involve the rules that courts must follow in a trial or hearing, and the types of evidence that may be used. A key area is the right to a fair trial, which is protected by a variety of laws and processes, including the constitutional right to appeal and the right to a public record of proceedings.

Another major area of law is the relationship between the state and its citizens. This covers the rights of citizens to property, contracts and justice, as well as the obligations and duties of the state in a democracy. In many countries, the power to create and enforce laws is vested in a single entity called a nation-state, and this often leads to disputes over who has the right to make or break the law.

Other important areas of law include tax law, which regulates the amount of taxes a company or individual must pay, and banking and financial regulation. Space law is a newer subject, covering the relations of nations in orbit and outer space, whilst copyright and patent law protect creative work. Criminal law covers the responsibilities of those who carry out crimes and the powers of police, courts and attorneys. The law is also informed by a broad range of academic fields, such as philosophy, religion and sociology. Max Weber has reshaped thinking on the role of law in modern society.