This article needs additional citations for verification. (June 2018)
A flash is a device used in photography that produces a brief burst of light (typically lasting 1/1000 to 1/200 of a second) at a color temperature of about 5500 Kelvin [ citation needed] to help illuminate a scene. A major purpose of a flash is to illuminate a dark scene. Other uses are capturing quickly moving objects or changing the quality of light. Flash refers either to the flash of light itself or to the electronic flash unit discharging the light. Most current flash units are electronic, having evolved from single-use flashbulbs and flammable powders. Modern cameras often activate flash units automatically.
Flash units are commonly built directly into a camera. Some cameras allow separate flash units to be mounted via a standardized accessory mount bracket (a hot shoe). In professional studio equipment, flashes may be large, standalone units, or studio strobes, powered by special battery packs or connected to mains power. They are either synchronized with the camera using a flash synchronization cable or radio signal, or are light-triggered, meaning that only one flash unit needs to be synchronized with the camera, and in turn triggers the other units, called slaves.
Studies of magnesium by Bunsen and Roscoe in 1859 showed that burning this metal produced a light with similar qualities to daylight. The potential application to photography inspired Edward Sonstadt to investigate methods of manufacturing magnesium so that it would burn reliably for this use. He applied for patents in 1862 and by 1864 had started the Manchester Magnesium Company with Edward Mellor. With the help of engineer William Mather, who was also a director of the company, they produced flat magnesium ribbon, which was said to burn more consistently and completely so giving better illumination than round wire. It also had the benefit of being a simpler and cheaper process than making round wire.  Mather was also credited with the invention of a holder for the ribbon, which formed a lamp to burn it in.  A variety of magnesium ribbon holders were produced by other manufacturers, such as the Pistol Flashmeter,  which incorporated an inscribed ruler that allowed the photographer to use the correct length of ribbon for the exposure they needed. The packaging also implies that the magnesium ribbon was not necessarily broken off before being ignited.
An alternative to magnesium ribbon was flash powder, a mixture of magnesium powder and potassium chlorate, was introduced by its German inventors Adolf Miethe and Johannes Gaedicke in 1887. A measured amount was put into a pan or trough and ignited by hand, producing a brief brilliant flash of light, along with the smoke and noise that might be expected from such an explosive event. This could be a life-threatening activity, especially if the flash powder was damp.  An electrically triggered flash lamp was invented by Joshua Lionel Cowen in 1899. His patent describes a device for igniting photographers' flash powder by using dry cell batteries to heat a wire fuse. Variations and alternatives were touted from time to time and a few found a measure of success, especially for amateur use. In 1905, one French photographer was using intense non-explosive flashes produced by a special mechanized carbon arc lamp to photograph subjects in his studio,  but more portable and less expensive devices prevailed. On through the 1920s, flash photography normally meant a professional photographer sprinkling powder into the trough of a T-shaped flash lamp, holding it aloft, then triggering a brief and (usually) harmless bit of pyrotechnics.
The use of flash powder in an open lamp was replaced by flashbulbs; magnesium filaments were contained in bulbs filled with oxygen gas, and electrically ignited by a contact in the camera shutter.  Manufactured flashbulbs were first produced commercially in Germany in 1929.  Such a bulb could only be used once, and was too hot to handle immediately after use, but the confinement of what would otherwise have amounted to a small explosion was an important advance. A later innovation was the coating of flashbulbs with a plastic film to maintain bulb integrity in the event of the glass shattering during the flash. A blue plastic film was introduced as an option to match the spectral quality of the flash to daylight-balanced colour film. Subsequently, the magnesium was replaced by zirconium, which produced a brighter flash.
There was a significant delay after ignition for a flashbulb to reach full brightness, and the bulb burned for a relatively long time, compared to shutter speeds required to stop motion and not display camera shake. Slower shutter speeds (typically from 1/10 to 1/50 of a second) were initially used on cameras to ensure proper synchronization and to make use of all the bulb's light output. Cameras with flash sync triggered the flashbulb a fraction of a second before opening the shutter to allow it to reach full brightness, allowing faster shutter speeds. A flashbulb widely used during the 1960s was the Press 25, the 25-millimetre (1 in) flashbulb often used by newspapermen in period movies, usually attached to a press camera or a twin-lens reflex camera. Its peak light output was around a million lumens. Other flashbulbs in common use were the M-series, M-2, M-3 etc., which had a small ("miniature") metal bayonet base fused to the glass bulb. The largest flashbulb ever produced was the GE Mazda No. 75, being over eight inches long with a girth of 14 inches, initially developed for nighttime aerial photography during World War II. 
The all-glass PF1 bulb was introduced in 1954.  Eliminating the metal base and the multiple manufacturing steps needed to attach it to the glass bulb cut the cost substantially compared to the larger M series bulbs. The design required a fibre ring around the base to hold the contact wires against the side of the glass base. An adapter was available allowing the bulb to fit into flash guns made for bayonet-capped bulbs. The PF1 (along with the M2) had a faster ignition time (less delay between shutter contact and peak output), so it could be used with X synch below 1/30 of a second—while most bulbs require a shutter speed of 1/15 on X synch to keep the shutter open long enough for the bulb to ignite and burn. A smaller version which was not as bright but did not require the fibre ring, the AG-1, was introduced in 1958; it was cheaper, and rapidly supplanted the PF1.
A flashcube was a module with four expendable flashbulbs, each mounted at 90° from the others in its own reflector. For use it was mounted atop the camera with an electrical connection to the shutter release and a battery inside the camera. After each flash exposure, the film advance mechanism also rotated the flashcube 90° to a fresh bulb. This arrangement allowed the user to take four images in rapid succession before inserting a new flashcube.
The later Magicube (or X-Cube) by General Electric retained the four-bulb format, but did not require electrical power. It was not interchangeable with the original Flashcube. Each bulb in a Magicube was set off by releasing one of four cocked wire springs within the cube. The spring struck a primer tube at the base of the bulb, which contained a fulminate, which in turn ignited shredded zirconium foil in the flash. A Magicube could also be fired using a key or paper clip to trip the spring manually. X-cube was an alternate name for Magicubes, indicating the appearance of the camera's socket.
Other common flashbulb-based devices were the Flashbar and Flipflash, which provided ten flashes from a single unit. The bulbs in a Flipflash were set in a vertical array, putting a distance between the bulb and the lens, eliminating red eye. The Flipflash name derived from the fact that once half the flashbulbs had been used, the unit had to be flipped over and re-inserted to use the remaining bulbs. In many Flipflash cameras, the bulbs were ignited by electrical currents produced when a piezoelectric crystal was struck mechanically by a spring-loaded striker, which was cocked each time the film was advanced.
The electronic flash tube was introduced by Harold Eugene Edgerton in 1931.  The electronic flash reaches full brightness almost instantaneously, and is of very short duration. Edgerton took advantage of the short duration to make several iconic photographs, such as one of a bullet bursting through an apple. The large photographic company Kodak was initially reluctant to take up the idea.  Electronic flash, often called "strobe" in the US following Edgerton's use of the technique for stroboscopy, came into some use in the late 1950s, although flashbulbs remained dominant in amateur photography until the mid 1970s. Early units were expensive, and often large and heavy; the power unit was separate from the flash head and was powered by a large lead-acid battery carried with a shoulder strap. Towards the end of the 1960s electronic flashguns of similar size to conventional bulb guns became available; the price, although it had dropped, was still high. The electronic flash system eventually superseded bulb guns as prices came down. Already in the early 1970s, amateur electronic flashes were available for less than $100.
A typical electronic flash unit has electronic circuitry to charge a high-capacitance capacitor to several hundred volts. When the flash is triggered by the shutter's flash synchronization contact, the capacitor is discharged rapidly through a permanent flash tube, producing an immediate flash lasting typically less than 1/1000 of a second, shorter than shutter speeds used, with full brightness before the shutter has started to close, allowing easy synchronization of maximum shutter opening with full flash brightness, unlike flashbulbs which were slower to reach full brightness and burned for a longer time, typically 1/30 of a second.
A single electronic flash unit is often mounted on a camera's accessory shoe or a bracket; many inexpensive cameras have an electronic flash unit built in. For more sophisticated and longer-range lighting several synchronised flash units at different positions may be used.
In a photographic studio, more powerful and flexible studio flash systems are used. They usually contain a modelling light, a lamp close to the flash tube; the continuous illumination of the modelling light lets the photographer visualize the effect of the flash. LED lamps are replacing the previous incandescent light bulbs in new designs, modelling lights typically being proportionately variable to flash power require dimmable LEDs and suitable circuitry in the head. Multiple flashes may be synchronised for multi-source lighting.
The strength of a flash device is often indicated in terms of a guide number designed to simplify exposure setting. The energy released by larger studio flash units, such as monolights, is indicated in watt-seconds.
Canon names its electronic flash units Speedlite, and Nikon uses Speedlight; these terms are frequently used as generic terms for electronic flash units designed to be mounted on, and triggered by, a camera hot shoe.
An air-gap flash is a high-voltage device that discharges a flash of light with an exceptionally short duration, often much less than one microsecond. These are commonly used by scientists or engineers for examining extremely fast-moving objects or reactions, famous for producing images of bullets tearing through light bulbs and balloons (see Harold Eugene Edgerton). An example of a process by which to create a high speed flash is the exploding wire method.
A camera that implements multiple flashes can be used to find depth edges or create stylized images. Such a camera has been developed by researchers at the Mitsubishi Electric Research Laboratories (MERL). Successive flashing of strategically placed flash mechanisms results in shadows along the depths of the scene. This information can be manipulated to suppress or enhance details or capture the intricate geometric features of a scene (even those hidden from the eye), to create a non-photorealistic image form. Such images could be useful in technical or medical imaging. 
Unlike flashbulbs, the intensity of an electronic flash can be adjusted on some units. To do this, smaller flash units typically vary the capacitor discharge time, whereas larger (e.g., higher power, studio) units typically vary the capacitor charge. Color temperature can change as a result of varying the capacitor charge, making color correction necessary. Constant-color-temperature flash can be achieved by using appropriate circuitry. 
Flash intensity is typically measured in stops or in fractions (1, 1/2, 1/4, 1/8 etc.). Some monolights display an "EV Number", so that a photographer can know the difference in brightness between different flash units with different watt-second ratings. EV10.0 is defined as 6400 watt-seconds, and EV9.0 is one stop lower, i.e. 3200 watt-seconds. 
Flash duration is commonly described by two numbers that are expressed in fractions of a second:
For example, a single flash event might have a t.5 value of 1/1200 and t.1 of 1/450. These values determine the ability of a flash to "freeze" moving subjects in applications such as sports photography.
In cases where intensity is controlled by capacitor discharge time, t.5 and t.1 decrease with decreasing intensity. Conversely, in cases where intensity is controlled by capacitor charge, t.5 and t.1 increase with decreasing intensity due to the non-linearity of the capacitor's discharge curve.
High-current flash LEDs are used as flash sources in camera phones, although they are less bright than xenon flash tubes. Unlike xenon tubes, LEDs require only a low voltage. They are more energy-efficient, and very small. The LED flash can also be used for illumination of video recordings or as an autofocus assist lamp in low-light photography; it can also be used as a general-purpose non-photographic light source.
Electronic flash units have shutter speed limits with focal-plane shutters. Focal-plane shutters expose using two curtains that cross the sensor. The first one opens and the second curtain follows it after a delay equal to the nominal shutter speed. A typical modern focal-plane shutter on a full-frame or smaller sensor camera takes about 1/400 s to 1/300 s to cross the sensor, so at exposure times shorter than this only part of the sensor is uncovered at any one time.
The time available to fire a single flash which uniformly illuminates the image recorded on the sensor is the exposure time minus the shutter travel time. Equivalently, the minimum possible exposure time is the shutter travel time plus the flash duration (plus any delays in triggering the flash).
For example, a Nikon D850 has a shutter travel time of about 2.4ms.  A full-power flash from a modern built-in or hot shoe mounted electronic flash has a typical duration of about 1ms, or a little less, so the minimum possible exposure time for even exposure across the sensor with a full-power flash is about 2.4ms + 1.0 ms = 3.4ms, corresponding to a shutter speed of about 1/290 s. However some time is required to trigger the flash. At the maximum (standard) D850 X-sync shutter speed of 1/250 s, the exposure time is 1/250 s = 4.0ms, so about 4.0ms - 2.4ms = 1.6ms are available to trigger and fire the flash, and with a 1ms flash duration, 1.6ms - 1.0ms = 0.6ms are available to trigger the flash in this Nikon D850 example.
Mid- to high-end Nikon DSLRs with a maximum shutter speed of 1/8000 s (roughly D7000 or D800 and above) have an unusual menu-selectable feature which increases the maximum X-Sync speed to 1/320 s = 3.1ms with some electronic flashes. At 1/320 s only 3.1ms - 2.4ms = 0.7ms are available to trigger and fire the flash while achieving a uniform flash exposure, so the maximum flash duration, and therefore maximum flash output, must be, and is, reduced.
Contemporary (2018) focal-plane shutter cameras with full-frame or smaller sensors typically have maximum normal X-sync speeds of 1/200 s or 1/250 s. Some cameras are limited to 1/160 s. X-sync speeds for medium format cameras when using focal-plane shutters are somewhat slower, e.g. 1/125 s,  because of the greater shutter travel time required for a wider, heavier, shutter that travels farther across a larger sensor.
In the past, slow-burning single-use flash bulbs allowed the use of focal-plane shutters at maximum speed because they produced continuous light for the time taken for the exposing slit to cross the film gate. If these are found they cannot be used on modern cameras because the bulb must be fired *before* the first shutter curtain begins to move (M-sync); the X-sync used for electronic flash normally fires only when the first shutter curtain reaches the end of its travel.
High-end flash units address this problem by offering a mode, typically called FP sync or HSS ( High Speed Sync), which fires the flash tube multiple times during the time the slit traverses the sensor. Such units require communication with the camera and are thus dedicated to a particular camera make. The multiple flashes result in a significant decrease in guide number, since each is only a part of the total flash power, but it is all that illuminates any particular part of the sensor. In general, if s is the shutter speed, and t is the shutter traverse time, the guide number reduces by √. For example, if the guide number is 100, and the shutter traverse time is 5 ms (a shutter speed of 1/200s), and the shutter speed is set to 1/2000 s (0.5 ms), the guide number reduces by a factor of √, or about 3.16, so the resultant guide number at this speed would be about 32.
Current (2010) flash units frequently have much lower guide numbers in HSS mode than in normal modes, even at speeds below the shutter traverse time. For example, the Mecablitz 58 AF-1 digital flash unit has a guide number of 58 in normal operation, but only 20 in HSS mode, even at low speeds.
As well as dedicated studio use, flash may be used as the main light source where ambient light is inadequate, or as a supplementary source in more complex lighting situations. Basic flash lighting produces a hard, frontal light unless modified in some way.  Several techniques are used to soften light from the flash or provide other effects.
Softboxes, diffusers that cover the flash lamp, scatter direct light and reduce its harshness. Reflectors, including umbrellas, flat-white backgrounds, drapes and reflector cards are commonly used for this purpose (even with small hand-held flash units). Bounce flash is a related technique in which flash is directed onto a reflective surface, for example a white ceiling or a flash umbrella, which then reflects light onto the subject. It can be used as fill-flash or, if used indoors, as ambient lighting for the whole scene. Bouncing creates softer, less artificial-looking illumination than direct flash, often reducing overall contrast and expanding shadow and highlight detail, and typically requires more flash power than direct lighting.  Part of the bounced light can be also aimed directly on the subject by "bounce cards" attached to the flash unit which increase the efficiency of the flash and illuminate shadows cast by light coming from the ceiling. It is also possible to use one's own palm for that purpose, resulting in warmer tones on the picture, as well as eliminating the need to carry additional accessories.
Fill flash or "fill-in flash" describes flash used to supplement ambient light in order to illuminate a subject close to the camera that would otherwise be in shade relative to the rest of the scene. The flash unit is set to expose the subject correctly at a given aperture, while shutter speed is calculated to correctly expose for the background or ambient light at that aperture setting. Secondary or slave flash units may be synchronized to the master unit to provide light from additional directions. The slave units are electrically triggered by the light from the master flash. Many small flashes and studio monolights have optical slaves built in. Wireless radio transmitters, such as PocketWizards, allow the receiver unit to be around a corner, or at a distance too far to trigger using an optical sync.
To strobe, some high end units can be set to flash a specified number of times at a specified frequency. This allows action to be frozen multiple times in a single exposure. 
Colored gels can also be used to change the color of the flash. Correction gels are commonly used, so that the light of the flash is the same as tungsten lights (using a CTO gel) or fluorescent lights.
Open flash, free flash or manually-triggered flash refers to modes in which the photographer manually triggers the flash unit to fire independently of the shutter. 
Using on-camera flash will give a very harsh light, which results in a loss of shadows in the image, because the only lightsource is in practically the same place as the camera. Balancing the flash power and ambient lighting or using off-camera flash can help overcome these issues. Using an umbrella or softbox (the flash will have to be off-camera for this) makes softer shadows.
A typical problem with cameras using built-in flash units is the low intensity of the flash; the level of light produced will often not suffice for good pictures at distances of over 3 metres (10 ft) or so. Dark, murky pictures with excessive image noise or "grain" will result. In order to get good flash pictures with simple cameras, it is important not to exceed the recommended distance for flash pictures. Larger flashes, especially studio units and monoblocks, have sufficient power for larger distances, even through an umbrella, and can even be used against sunlight at short distances. Cameras which automatically flash in low light conditions often do not take into account the distance to the subject, causing them to fire even when the subject is several tens of metres away and unaffected by the flash. In crowds at sports matches, concerts and so on, the stands or the auditorium can be a constant sea of flashes, resulting in distraction to the performers or players and providing absolutely no benefit to the photographers.
The " red-eye effect" is another problem with on camera and ring flash units. Since the retina of the human eye reflects red light straight back in the direction it came from, pictures taken from straight in front of a face often exhibit this effect. It can be somewhat reduced by using the "red eye reduction" found on many cameras (a pre-flash that makes the subject's irises contract). However, very good results can be obtained only with a flash unit that is separated from the camera, sufficiently far from the optical axis, or by using bounce flash, where the flash head is angled to bounce light off a wall, ceiling or reflector.
On some cameras the flash exposure measuring logic fires a pre-flash very quickly before the real flash. In some camera/people combinations this will lead to shut eyes in every picture taken. The blink response time seems to be around 1/10 of a second. If the exposure flash is fired at approximately this interval after the TTL measuring flash, people will be squinting or have their eyes shut. One solution may be the FEL (flash exposure lock) offered on some more expensive cameras, which allows the photographer to fire the measuring flash at some earlier time, long (many seconds) before taking the real picture. Many camera manufacturers do not make the TTL pre-flash interval configurable.
Flash distracts people, limiting the number of pictures that can be taken without irritating them. Photographing with flash may not be permitted in some museums even after purchasing a permit for taking pictures. Flash equipment may take some time to set up, and like any grip equipment, may need to be carefully secured, especially if hanging overhead, so it does not fall on anyone. A small breeze can easily topple a flash with an umbrella on a lightstand if it is not tied down or sandbagged. Larger equipment (e.g., monoblocks) will need a supply of AC power.
Front and back views of an Agfa Tully flash attachment for AG-1 flashbulbs, 1960
Metz 171 mecablitz - Compact electronic flash. Made in Germany, Metz-Werke GmbH & Co. KG, 1967
Metz 171 mecablitz - compact electronic flash disassembled
Bauer E 251 - Compact automatic flash with built-in rechargeable battery Made in Germany, Robert Bosch Photokino GMBH, 1969
Bauer E 251 electronic flash disassembled
Front and back views of a Minolta Auto 28 electronic flashlamp ca 1978
The largest flashbulb, the mammoth GE Mazda Type 75, was initially developed to be used as a source of light for night time aerial photography during world war II. The Mazda 75 measured over eight inches long and had a girth of over four inches.