In architecture, tracery is the stonework elements that support the glass in a Gothic window. The term probably derives from the 'tracing floors' on which the complex patterns of late Gothic windows were laid out. There are two main types, plate tracery and the later bar tracery.The evolving style from Romanesque to Gothic architecture and changing features, like the thinning of lateral walls and enlarging of windows lead to the innovation of tracery. The earliest form of tracery, called plate tracery, began as openings that were pierced from a stone slab. Bar tracery was then implemented, having derived from the plate tracery. However instead of a slab, the windows were defined by molded stone mullions which were lighter and allowed for more openings and intricate designs. Other notable styles of tracery to follow include geometrical tracery and curvilinear (flowing) tracery. 
The earliest form of window tracery, typical of Gothic architecture prior to the early 13th century, is known as plate tracery because the individual lights (the glazed openings in the window) have the appearance of being cut out of a flat plate of masonry. Romanesque church windows were normally quite small, somewhat taller than wide and with a simple round-headed ('segmental') arch at the top. From around the 1140s, the pointed-arch Gothic window (employed by Abbot Suger for the redesign of the choir at St Denis) started to take over.
As the buttressing systems of early Gothic architecture reduced the structural need for broad expanses of thick walls, window openings grew progressively larger and instead of having just one very large window per bay division (which would create problems with supporting the glass), the typical early-Gothic 'twin lancet plus oculus' form of plate tracery developed. This consists of two (sometimes three) tall thin lights topped with pointed arches, with a round or trefoil opening placed above them, often contained within a blind arch which gives the whole assemblage a pointed lancet shape (see the example from Soissons Cathedral, right). With this type of design, the spandrels (i.e. the spaces between the tops of the lancet windows and the oculus) are just blank wall. The practicalities of building window tracery in this way severely limited the complexity of designs that could be produced and although plate tracery designs evolved over the course of the 12th and early 13th centuries, in practice, the only real variation was in the number and size of lancets and in the trefoils, quatrefoils and oculi used to fill the spaces above them.
The rose windows of early- and high-Gothic cathedrals, such as the example in the north transept of Laon Cathedral (1170's) or the west facade at Chartres (c. 1210), also employed plate tracery. This greatly limited the overall amount of light admitted to the interior by these windows, as well as restricting the complexity of patterns that could be created.
The earliest bar tracery designs were made for the aisle windows at Reims around 1215. The Reims windows still used the same 'two lancets plus oculus' pattern (as in the Soissons example above) but now the glass panels were held between narrow stone mullions made up of carefully shaped lengths of masonry (fitted together with mortar and metal pins) quite distinct from the wall surrounding them. These mullions were much more slender than the corresponding elements in plate tracery windows and crucially, the previously solid wall areas such as the spandrels could also now be glazed, greatly increasing the amount of light admitted.
The cross-section of each mullion or tracery bar was important both for the structural integrity of the window and for the visual effect. As can be seen in Viollet-le-Duc's diagram (right) there was normally a roll-moulding on both the inside and outside of the windows, which made the mullions appear even more slender than they actually were. The shoulder marked 'B' on the diagram is the glazing slot, into which the metal frame (armature) of the window glass is mounted. Unlike with plate tracery, where each stone had to be individually shaped, the elements of bar tracery could be mass-produced to standard templates in the mason's yard – work that could continue even when it was too cold for lime mortar to set. The technical aspects of the windows at Reims clearly fascinated Villard de Honnecourt, who visited the construction site, probably in the 1220s, and made a detailed sketch of the various templates, using a key to show how they fitted into the different parts of the window (the templates are in the lower half of folio 32 recto; the symbols besides the templates match similar ones on the detailed drawing of the Reims elevations on the facing page, folio 31 verso).
Geometrical tracery is identified by the circular openings at the head of the arch of the window. A common composition is three lights beneath two circles and a third at the point of the arch, such an example can be seen along the aisle at the Lincoln Cathedral in England. Also at the Lincoln Cathedral, the east window is an expanded version of this idea with two interior arches, a total of eight lower lights, four small circular lights topped with two larger circles to fill out the interior arches, and finally above all one large circular shape filled with seven smaller circular lights. Geometrical tracery, in its early stages, had a rule of equilateral law, where the tracery design follows the shape of the arch in an equilateral manor. Additional decorative elements can be implemented, such as foliation or the "spherical triangle". The use of spherical triangles is a later adaption and likely reflects religious significance. 
Starting in the late thirteenth century and at the beginning of the fourteenth century tracery took on more fluid characteristics and thusly was called flowing or curvilinear tracery. A common shape that was used in curvilinear tracery was that of the ogee, which was too weak for structural application and was instead used as a decorative element. The use of the ogee in curvilinear tracery can be seen in the west window of St. Mary's parish church in Cottingham, East Riding of Yorkshire.  A secondary style considered related to curvilinear tracery is called reticulated tracery. Reticulated tracery fills the head of the arch with repeated forms creating the appearance of a net-like pattern.
As bar tracery opened the way for more complex patterns, masons started applying those same patterns to other surfaces as well as the actual window openings. When used on an otherwise solid walls, such motifs are known as blind tracery, a decorative effect first applied on the west facade of the church of St Nicaise at Reims (1230's). Conversely, tracery was also constructed as openwork screens, which could either match the window tracery behind them (e.g. the Basilica of Saint Urbain, Troyes) or create a visual counterpoint to it, as on the exterior of the west facade of Strasbourg Cathedral. Open tracery in particular was a key feature of the later phases of Rayonnant Gothic.
Most 19th-century histories of Gothic architectural style used a series of typological categories based on the evolution of the dominant patterns of window tracery. In terms of the overall development of Gothic architecture, the crucial development was not so much the use of any particular tracery patterns but the transition from plate- to bar-tracery, which was what made the Rayonnant and subsequent styles possible.
As the complexity of tracery increased, so did the need for masons to draw out their designs in advance, either as a way of experimenting with patterns or as a way of communicating their designs to other craftsmen or to their patrons. Because of the cost and size limitations of parchment sheets, such designs would normally be drawn by incising onto a whitewashed board or a conveniently placed section of flat wall. In the latter case, the wall would be prepared with a thin layer of plaster, which would show the design more clearly.
A number of churches and cathedrals still show the faint remains of these tracings (or épures as they are known in France), from where the mason's compass points scratched through the plaster and into the masonry below. (Examples include some experimental 14th century window tracery patterns at the eastern end of the south wall inside the Galillee porch of Ely Cathedral, or the extensive series of tracings on the flat aisle roofs of Clermont-Ferrand Cathedral.) A number of major building sites (including Westminster Abbey, Wells Cathedral and York Minster) originally had dedicated tracery chambers, where the architects could prepare their designs in relative comfort. The availability of a large flat floor surface meant that designs could be drawn life-size and the individual elements of bar tracery laid out on the plan to test their goodness of fit, before hoisting them up the scaffolding for installation in the actual window openings. This also meant that masons could carry on working through the winter season, when building work would normally grind to a halt.
The tracing floors themselves were covered with plaster of paris, which could be relaid and smoothed down after each set of designs were finished with. The 14th-century tracing house at York (also known as the Mason's Loft) survives to this day on the upper storey of the corridor leading to the Chapter House, the complex web of lines and curves scratched into the floor serving as witnesses to the countless different designs that were worked out in there. The high-quality carpentry and the inclusion of a garderobe and fireplace in the York tracing house also give an indication of the rising status of the architect around the 14th century.