A pattern, from the French patron, is a type of theme of recurring events or objects, sometimes referred to as elements of a set of objects.
These elements repeat in a predictable manner. It can be a template or model which can be used to generate things or parts of a thing, especially if the things that are created have enough in common for the underlying pattern to be inferred, in which case the things are said to exhibit the unique pattern.
The most basic patterns, called Tessellations, are based on repetition and periodicity. A single template, tile, or cell, is combined with duplicates without change or modification. For example, simple harmonic oscillators produce repeated patterns of movement.
Other patterns, such as Penrose tiling and Pongal or Kolam patterns from India, use symmetry which is a form of finite repetition, instead of translation which can repeat to infinity. Fractal patterns also use magnification or scaling giving an effect known as self-similarity or scale invariance. Some plants, like Ferns, even generate a pattern using an affine transformation which combines translation, scaling, rotation and reflection.
Pattern matching is the act of checking for the presence of the constituents of a pattern, whereas the detecting for underlying patterns is referred to as pattern recognition. The question of how a pattern emerges is accomplished through the work of the scientific field of pattern formation.
Pattern recognition is more complex when templates are used to generate variants. For example, in English, sentences often follow the "N-VP" (noun - verb phrase) pattern, but some knowledge of the English language is required to detect the pattern. Computer science, ethology, and psychology are fields which study patterns.