Punishment is the imposition of an undesirable or unpleasant outcome upon a group or individual, meted out by an authority—in contexts ranging from child discipline to criminal law—as a response and deterrent to a particular action or behaviour that is deemed undesirable or unacceptable. The reasoning may be to condition a child to avoid self-endangerment, to impose social conformity (in particular, in the contexts of compulsory education or military discipline), to defend norms, to protect against future harms (in particular, those from violent crime), and to maintain the law—and respect for rule of law—under which the social group is governed.