A clever technique and an ultrafast electron microscope have caught an image of light behaving as both particle and wave at the same time. Here, the wave nature is demonstrated in the wavy upper portion, while the particle behavior is revealed below, in the outlines showing energy quantization.

It's a wave. It's a particle. It's … both.

Scientists have long known that light can act as a particle or a wave, depending on the experiment. But for the first time, scientists have captured a glimpse of light acting as both a wave and particles at the same time. This strange behavior is a consequence of quantum mechanics, bizarre rules of physics that govern the behavior of subatomic particles.

"This experiment demonstrates that, for the first time ever, we can film quantum mechanics — and its paradoxical nature — directly," study co-author Fabrizio Carbone, a researcher at the École Polytechnique Fédérale de Lausanne in Switzerland, said in a statement.

The spooky behavior was captured on camera using an ultrafast microscope.

Dual nature

Since the early 1900s, scientists have known that light had a dual nature. For instance, if scientists aim a beam of light at a screen with one slit open, the light behaves as a stream of particles — a single line of brightness. But if two slits are open, the light acts as a wave and goes through both openings simultaneously, creating a characteristic pattern of light and dark fringes, called an interference pattern. This pattern occurs because peaks in the light wave at one point sometimes add up with the valleys in the wave at other points, creating regions of dark, while places where two peaks intersect create extra-bright spots. [Twisted Physics: 7 Mind-Blowing Findings]

But in the double-slit experiments, the wave and particle nature of light is demonstrated in two separate experimental setups, not at the same time.

To catch this particle-wave duality in real time, Carbone and his colleagues shot a beam of laser light at charged electrons inside a nanoscale wire, giving the charged particles a boost in energy. This energy bump caused the particles to vibrate, which, in turn, created an electromagnetic field that forced the light to go back and forth along the wire.

When the two waves traveling in opposite directions collided, they formed a stationary wave.

From there, the research team fired electrons at the wire. As the electrons approached the wire, the electrons bumped into the light particles, or photons, in the standing wave, which then changed the speed of the electrons. But the photons changed speed (sped up or slowed down) in finite amounts called quanta or "packets" of energy, according to the statement. These packets of energy show that the light was acting as a particle.

Because the whole interaction was caught in images by an ultrafast electron microscope, the lightning-quick changes in electron speed were captured in real time.

The findings were published yesterday (March 2) in the journal Nature Communications.

Follow Tia Ghose on Twitter and Google+. Follow Live Science @livescience, Facebook & Google+. Originally published on Live Science.