Elegant things often exhibit refined grace and suggest maturity, and in the case of mathematics, a deep mastery of the subject matter.
Essential components of the concept include simplicity and consistency of design, focusing on the essential features of an object. In art of any kind one might also require dignified grace, or restrained beauty of style.
In the philosophy of science, there are two concepts referring to two aspects of simplicity: elegance (syntactic simplicity), which means the number and complexity of hypotheses, and parsimony (ontological simplicity), which is the number and complexity of things postulated.
In mathematical problem solving, the solution to a problem (such as a proof of a mathematical theorem) exhibits mathematical elegance if it is surprisingly simple and insightful yet effective and constructive. Such solutions might involve a minimal amount of assumptions and computations, while outlining an approach that is highly generalizable. Similarly, a computer program or algorithm is elegant if it uses a small amount of code to great effect.
In engineering, a solution may be considered elegant if it uses a non-obvious method to produce a solution which is highly effective and simple. An elegant solution may solve multiple problems at once, especially problems that are not thought to be inter-related. Elegance can arguably be measured for engineering problems as the ratio of problem complexity to that of solution complexity. Thus a simple (low complexity) solution to a problem of high complexity is seen as elegant. This measure does not advise of process to produce elegant solutions, and is merely a way of comparing between multiple solutions for elegance assessment.
In chemistry, chemists might look for elegance in theory, method, technique and procedure. For example, elegance might comprise creative parsimony and versatility in the utilization of resources, in the manipulation of materials, and in the effectiveness in syntheses and analysis.