What exactly is duality? I came across the notion of duality recently to explain a physical concept.


*

*What is duality? 

*Why does it occur? 

*How do I know if two things are dual? 
 A: Duality between two different theories means that these two theories when applied to a problem yield the same answers. The dualities can be approximate or exact (ex: the gauge/gravity duality, string dualities etc.) depending on whether the calculations performed using the two different theories agree exactly or only up to a certain limit.
Dualities are usually a characteristic feature of the underlying mathematical logic and structure. As a vague example, just because you can explain effectively say the structure of stars using hydrodynamics and quantum mechanics separately, does not mean that hydrodynamics is dual to quantum mechanics. The duality occurs because the underlying mathematical structure between the two objects end up calculating the exact same thing or reduce to the same quantity in certain limits. Of course, there are some dualities which are well understood mathematically like mirror symmetry while some others which are still well accepted conjectures (from a mathematical framepoint) like the holographic duality. But there are dualities in physics and given their mathematical origin, they must also exist in mathematics, and they do. 
Knowing two things are dual requires you to understand how to construct and calculate quantities precisely using the theories between which you want to describe a duality. However, proving two things are dual is much more mathematical. 
A: Duality arises in physics when two different aspects of nature are apparently related to each other by a common underlying theory. There are various examples of dualities in physics. eg Wave particle duality, electric field/ magnetic field duality, gauge/ gravity duality. Usually it appears when the underlying theory is viewed from two different limits.
In order to verify if the two or more aspects of nature are dual or not, you need to know about the basic underlying theory, and see whether the aspects manifest themselves as the limits of the theory / or are sub-parts of the full theory. 
A: A quantum system exhibits duality when it possesses two (or more) equivalent classical descriptions, say, $${\cal D},\, \,{\cal D}'$$ seemingly dissimilar but whose components (fields, couplings, etc.) have an exact mathematical relationship (for brevity I will restrict the answer to exact dualities only).
Dualities provide dictionaries between these descriptions - although correspondences are often devilishly complicated (the most interesting ones are, to put it mildly, highly non-trivial).
A few important features are:

*

*Given that the quantum system itself is unique, the homeomorphism between ${\cal D}$ $\mapsto$ ${\cal D}'$ only represents a shift in perspective. This implies that both descriptions are experimentally indistinguishable, and neither is more fundamental (we have one physical system merely described through distinct "viewpoints").


*They help decrease redundancies. Quoting Polchinski, "duality points to a great unity in the structure of theoretical physics."


*Though dualities occur in many areas of physics besides strings, it must be noted that superstring theory has revealed itself to be an outstanding “duality generator,” remarkably useful in predicting and analyzing dualities in other areas.


*As noted by Vafa, dualities change the nature of the problem: “solving the problem” becomes “finding the right dual description to solve it.”


*Duality is one of the most potent techniques provided by physics to mathematics: dual physical models may be constructed using completely different mathematical structures. A model may be expressed in the language of algebraic geometry, while its dual may involve objects in number theory, topology, etc. Hence, dualities may lead to completely unexpected correspondences between areas of mathematics!


*In many physical systems, dualities and Fourier transforms have remarkable similarities. In a Fourier transform, the unified framework (which explains the dual connection) having f(x) and F(p) as two different limits (duality frames) is a Schwartz (or tempered) distribution $u \in {\cal D}’(R^n)$ defined by duality from the space of test functions of rapid decrease.
The so-called S-dualities (one of the most interesting kinds) describe quantum systems $({\cal D},\lambda)\,\, \& \,\,({\cal D}',\lambda')$ where $\lambda = \frac{1}{\lambda'}$. Note that this property can be extremely useful: terribly difficult strongly coupled theories often become easy to work with!
In S-dualities, elementary particles are mapped into composite ones (usually solitons which are particle-like, larger and heavier, constituted by several quanta, and found even classically) and vice versa. The equivalence of descriptions implies that elementary and composite entities are interchangeable: particle classification becomes meaningless, essentially a convenience choice - divisions such as “basic constituents” or “elementary particles” become ill-defined  (Sidney Coleman termed this state of affairs  “nuclear democracy”).
However, there are very few proofs of dualities. E.g., to prove S-duality requires making computations using strongly coupled theories. The evidence, however, is overwhelming.
