What is law? Good question actually. For it does not have one unequivocal answer. It fits in all these and other descriptions; it is a stream of thought, a literal depiction of bounded rationality, a societal instrument for regulating human behaviour, a means of social change, collective intelligence of a civilization, a code of best practices, etc. etc. etc.
The Dean of my
Then there is another description that 'law is a system of rules'. I quiet agree with this statement except for the fact that certain dimensions of law do not exactly fit in this description. For example, major portions of international law are not rules but just sought-after practices, which may or may not be honoured. Nonetheless it is appropriate to go ahead with this understanding and explore the concepts further, given the fact that there would be exceptions to any definition.
Now once we have a system of rules, what does it do? what is it meant for? why have this system of rules? The answer to them seem to be historic as well as the outcome of human interactions with each other. A law-less world can be best described as a potion of Darwin's theory which relates to the 'survival of fittest'. Thus there would be a position of might is right. Thus to evolve a better social system (ofcourse the use of the term 'better' here is a relative term, depending on the needs of the majority of social cross-section the system is meant for) there are brought in 'rules' which regulate the ways in which human interactions takes place.
A lot of this is explained by the 'social contract theory' which builds it premises on a hypothesis that the people (in a 'state of nature' i.e. the social order prior to the legal system coming into place) agreed to limit their own rights and confer them on an individual/group of individuals/institution (depending on which version you chose i.e. of Hobbes, Locke or Rousseau) which they conceived as a better protector of their rights and liberties.
Thus the society accepted towards positioning itself in a system where the rules would flow either from top (in a 'Kingship' type or similar based system) or bottom (in a 'democracy' type or similar system) and everyone would be abide by them. Initially there was a system that even the rule-maker(/s) would abide by them except for certain special rules which applied to him(/them) specifically but with passage of them most of these rule-maker(/s) came to place themselves in a position where they only made the rules for others and were not required to abide by any. [Thus is explained the hue-and-cry for 'good-governance' norms to be applied to these rule-making institutions.]
But as things became, they stand as thus, there exists a rule-making institution, called the 'sovereign' (which may be a single individual) which is the originator of these rules, meant to be followed to whom they are addressed and these rules are collectively termed as 'Law'.
This simplistic understand of law, when exposed to the special needs and circumstances and the subject matter it regulates, assumes hybrid and diagrammatically-opposite dimensions and becomes quiet complex. However what remains the same is this underlying of regulating human behaviour. Thus becomes 'law' as an institution in itself, permeating all self and affecting all.