From the most primitive tribe to today's most socially advanced cultures, there always exist some kind of law so it is diffuclt to pinpoint a beginning. However, the consensus is the Ancient Egyptians of 3000 BC, with their twelve-volumes of civil code inspired by their concept-goddess hybrid, Ma'at, may lay claim to the first formalized law system, though the Code of Ur Nammu from around 2100 BC of Mesopotamia is the earliest written code that remains intact today. Of course the Greeks developed laws of their own (see the Gortyn Codes), as did the Romans later, whose Twelve Tables evolved into Byzantine law in medieval Europe, forming the roots of modern law. Distinct legal traditions came about in other parts of the world too, including India's first document of what can be arguably called legal instruction, the Arthashastra, dating back to 250 BC and the famous Five Punishments of Imperial China.
The remains of the Gortyn Amplitheatre in which the Gortyn Codes were inscribed on the walls around 450 BC.
The modern study of legal history looks at more than just events however - it’s twin concerns are how law has changed and what has brought about these changes. The field is closely linked with the social history of civilization as well as jurisprudence, or the philosophy of law.
From Plato in Western philosophy to Confucius in the East, there has been much philosophical dialogue into the attitudes toward punishment with the Ancient Greek view being that it should be rehabilitative, retributory and act as a deterrent contrasting the Eastern idea that punishment should perhaps have no role at all in civilization - that the very necessity of it reflects a “failure of governance”1. In today’s world, the three main lines of opposing inquiry for legal philosophers are the concept of natural law, that the basic law structure is a result of fundamental human reasoning and as such has a rationale limit; legal positivism, arguing that laws arise from social conditions instead of morals and legal realism, which takes the view that legislation signifies nothing more than what its executors do with it.