This article is about law in science, for law as it refers to the legal system see: law

A physical law or a law of nature is a scientific generalization based on empirical observations. It is different from a theory which is a framework designed to make predictions and to explain physical laws. Laws of nature are different from legal code (see law). Legal code is the creation of man, sometimes perhaps inspired by higher beings. Laws of nature are conclusions from scientific experiments. Some of the more famous laws of nature are Isaac Newton's theories of (now) classical mechanics, presented in his Principia Mathematica and Albert Einstein's theory of relativity.

Within most fields of study, and in science in particular, the elevation of some principle of that field to the status of "law" usually takes place after a very long time during which the principle is used and tested and verified. Though in some fields of study such laws are simply postulated as a foundation and assumed.

Mathematical laws are something in between: they are often arbitrary and unproven in themselves, but they are then judged by how useful they are in making predictions about the real world.