Where Do X-Rays Come From: Machines, Space & More

X-rays come from high-speed electrons suddenly losing energy. Whether that happens inside a medical imaging machine, on the surface of the sun, or near a black hole, the underlying physics is the same: when electrons are violently slowed down or knocked between energy levels inside an atom, they release energy in the form of x-ray photons. These photons carry far more energy than visible light, with wavelengths smaller than the size of an atom.

How X-Rays Are Created at the Atomic Level

There are two fundamental ways x-rays get produced, and both involve electrons interacting with atoms.

The first is called braking radiation. When a fast-moving electron flies close to the nucleus of a heavy atom, the strong positive charge of the nucleus pulls on the electron and forces it to slow down or change direction. That lost kinetic energy doesn’t just disappear. It gets converted into an x-ray photon. The closer the electron passes to the nucleus, the more it decelerates and the more energetic the resulting x-ray. Because electrons can lose varying amounts of energy in these encounters, this process produces x-rays across a broad range of energies.

The second mechanism is more precise. When a fast electron strikes an atom hard enough to knock out one of its inner-shell electrons, it leaves a vacancy. An electron from a higher energy level drops down to fill that gap, and the energy difference between the two levels gets released as an x-ray photon. Because those energy levels are fixed and unique to each element, the x-rays produced this way have very specific, predictable energies. Physicists call these “characteristic x-rays” because they act like a fingerprint for the element that produced them.

Inside an X-Ray Machine

The most familiar source of x-rays is the machine at your dentist’s office or hospital. These devices, called x-ray tubes, are surprisingly straightforward. A heated wire filament (the cathode) releases electrons through extreme heat. A high voltage, typically between 60 and 120 thousand volts depending on the body part being imaged, accelerates those electrons across a vacuum toward a tungsten target (the anode). Tungsten is used because it’s dense, has a high melting point, and its heavy nucleus is excellent at converting electron energy into x-rays.

When the electrons slam into the tungsten at tremendous speed, both mechanisms kick in simultaneously. Some electrons get braked by tungsten nuclei and produce a spread of x-ray energies. Others knock out inner-shell electrons in the tungsten atoms, generating characteristic x-rays at energies unique to tungsten. The combined output forms the x-ray beam that passes through your body and onto a detector to create an image. Denser tissues like bone absorb more x-rays than soft tissue, which is why bones appear white on the resulting image.

Different imaging tasks require different voltages. Abdominal and pelvic imaging works well around 70,000 volts, while spinal imaging typically uses around 100,000 volts to penetrate thicker, denser structures.

X-Rays From Space

Long before humans built x-ray machines, the universe was producing them on a colossal scale. The sun generates x-rays during solar flares, when superheated plasma accelerates electrons to extreme speeds. Stars much more massive than the sun produce x-rays as matter falls toward neutron stars or black holes, heating to millions of degrees in the process.

Some of the most dramatic x-ray sources in the cosmos are binary systems where a compact object like a neutron star or black hole is pulling material off a companion star. As that material spirals inward and accelerates, it emits intense x-ray radiation. Astronomers at the Harvard-Smithsonian Center for Astrophysics have discovered objects that flare to a hundred times their normal x-ray brightness in less than a minute, producing hundreds to thousands of times more x-rays than typical binary systems. These bursts last roughly an hour before fading. Young neutron stars with exceptionally powerful magnetic fields, called magnetars, also produce rapid x-ray flares, though through a different mechanism involving the sudden rearrangement of their magnetic fields.

Earth’s atmosphere blocks virtually all cosmic x-rays from reaching the ground, which is why x-ray astronomy requires space-based telescopes orbiting above the atmosphere.

Particle Accelerators and Research Sources

For scientific research that demands extremely bright, precisely tuned x-rays, scientists use particle accelerators. Synchrotron light sources are large circular facilities where electrons travel at nearly the speed of light. When magnets force these electrons to curve along the ring, the change in direction causes them to emit x-rays, the same braking radiation principle that operates inside an x-ray tube, just at far higher energies.

An even more powerful version is the x-ray free-electron laser. These facilities use a long linear accelerator to produce bunches of electrons traveling in a straight line through a series of alternating magnets called a wiggler or undulator. The magnets force the electrons to oscillate back and forth, emitting x-rays as they go. Through a process where the electrons naturally cluster into thin periodic slices spaced exactly one wavelength apart, their emissions synchronize and amplify each other. The result is x-ray pulses that can be nine billion times brighter at peak intensity than what a synchrotron produces, compressed into bursts lasting fractions of a femtosecond (a millionth of a billionth of a second). Researchers use these pulses to capture molecular processes in real time, essentially making movies of chemical reactions and protein movements.

How X-Rays Were Discovered

X-rays were found by accident. On November 8, 1895, the German physicist Wilhelm Röntgen was experimenting with a cathode ray tube in his laboratory when he noticed something unexpected: a fluorescent screen coated with a barium compound, sitting far from the covered tube, was glowing. Something invisible was traveling from the tube across the room and causing the screen to fluoresce. Röntgen called the unknown radiation “X-rays,” using “X” for its mysterious, unidentified nature. Within weeks, he produced the first medical x-ray image, a photograph of his wife’s hand showing her bones and wedding ring. The discovery earned him the first Nobel Prize in Physics in 1901, and the name stuck.

What Makes X-Rays Different From Other Light

X-rays are electromagnetic radiation, the same fundamental phenomenon as visible light, radio waves, and ultraviolet light. What sets them apart is their energy. X-ray photons carry between about 1 and over 100 thousand electron volts of energy, placing them between ultraviolet light and gamma rays on the electromagnetic spectrum. Their wavelengths are on the order of the size of atoms or smaller, which is exactly why they’re so useful: they can interact with matter at the atomic scale, passing through soft tissue while being absorbed by denser materials. This property makes them invaluable not just for medical imaging but for studying crystal structures, inspecting welds in pipelines, scanning luggage at airports, and probing the atomic architecture of proteins.