An X-ray machine works by firing a focused beam of high-energy electromagnetic radiation through your body, where different tissues absorb different amounts of that radiation. What passes through hits a detector on the other side, creating a shadow-like image of your internal structures. The entire process, from electron to image, takes a fraction of a second.
Inside the X-Ray Tube
The heart of every X-ray machine is a vacuum-sealed glass tube containing two key components: a cathode (negative end) and an anode (positive end). When the machine is turned on, an electrical current heats a tungsten filament inside the cathode to extreme temperatures. That heat causes electrons to boil off the filament’s surface, a process called thermionic emission, similar in principle to how a hot stove element glows and radiates energy.
A high-voltage generator then creates a massive electrical difference between the cathode and anode, typically tens of thousands of volts. This voltage gap yanks the freed electrons across the vacuum tube at tremendous speed toward the anode target, which is also made of tungsten. Tungsten is the material of choice because it has an extremely high melting point and can withstand the intense heat generated by billions of electrons slamming into it.
How the Electrons Become X-Rays
When those fast-moving electrons crash into the tungsten anode, their energy converts into X-ray radiation through two distinct processes.
The first, and more common, is called braking radiation. As an incoming electron flies close to the nucleus of a tungsten atom, the strong positive charge of the nucleus pulls on it, slowing it down and bending its path. That lost kinetic energy doesn’t disappear. It gets released as an X-ray photon. Because each electron loses a different amount of energy depending on how close it passes to the nucleus, this process produces a wide spectrum of X-ray energies.
The second process creates what’s known as characteristic radiation. Here, an incoming electron collides directly with an inner-shell electron of a tungsten atom, knocking it out entirely. That leaves a gap in the atom’s inner electron shell. An electron from a higher shell drops down to fill the vacancy, and the energy difference between those two shells gets released as an X-ray photon with a very specific energy unique to tungsten. Think of it like a ball falling from a high shelf to a low shelf: the height of the drop determines exactly how much energy is released.
Only about 1% of the electron energy actually converts to X-rays. The remaining 99% becomes heat, which is why the anode must be engineered to dissipate enormous amounts of thermal energy, often by spinning the anode disk at high speed to spread the heat across a larger surface area.
What Happens When X-Rays Pass Through Your Body
Once generated, the X-ray beam travels out of the tube and through your body. Different tissues absorb X-rays at very different rates, and this is what makes the image possible. Dense materials like bone contain atoms with higher atomic numbers (particularly calcium), which are far more effective at absorbing X-ray photons. Soft tissues like muscle and fat absorb less. Air, such as in your lungs, absorbs almost none.
The relationship between an atom’s size and its ability to block X-rays is dramatic. Absorption increases roughly with the fourth power of an atom’s atomic number, meaning a small increase in atomic density causes a huge jump in X-ray absorption. This is why bone shows up bright white on an X-ray (very few photons got through), lungs appear nearly black (most photons passed through), and soft tissues fall somewhere in the gray range between.
Contrast Agents for Soft Tissue
Soft tissues often look too similar to each other on a standard X-ray. To solve this, doctors use contrast agents: substances with high atomic numbers that absorb X-rays much more effectively than surrounding tissue. Iodine (atomic number 53) is commonly injected into blood vessels to visualize arteries and veins during procedures like angiography. Barium sulfate, given as a drink or enema, coats the lining of the digestive tract to reveal its shape and any abnormalities.
The machine’s energy can even be tuned to closely match the absorption properties of these specific atoms, maximizing the contrast between the agent and surrounding tissue.
How the Image Gets Created
The X-rays that make it through your body need to be captured and turned into a visible image. Older machines used film cassettes, much like photographic film. Modern machines use digital detectors, which fall into two main categories.
Direct conversion detectors use a layer of a semiconductor material (typically amorphous selenium) that converts X-ray photons straight into electrical charges. An electric field applied across the selenium layer pulls these charges to collection electrodes, where they’re read out as a digital signal. Because the charges travel in a straight vertical path with very little lateral spread, these detectors produce images with excellent sharpness.
Indirect conversion detectors take a two-step approach. First, a scintillator layer (often made of cesium iodide) converts X-ray photons into visible light. Then, an array of tiny photodiodes converts that light into electrical signals. Each tiny detector element in the array corresponds to a pixel in the final image.
In both cases, the electrical signal at each pixel is proportional to the number of X-ray photons that reached it. A computer assembles these signals into a grayscale image, where brightness corresponds to how many X-rays passed through that part of your body. The result appears on screen within seconds.
How Operators Control Image Quality
Technologists adjust two main settings to get the best image for each body part. The first is kilovoltage peak (kVp), which controls the maximum energy of the X-ray beam. Higher kVp means more penetrating X-rays, which is necessary for thick or dense body parts like the abdomen or spine. Lower kVp produces less penetrating X-rays but creates sharper contrast between tissues, useful for extremities or areas with subtle density differences.
The second setting is milliampere-seconds (mAs), which controls the total number of X-ray photons produced. Higher mAs means more photons, which reduces graininess in the image but also increases the radiation dose to the patient in a direct, linear relationship. Double the mAs, double the dose. Skilled technologists balance these two settings to get a diagnostic-quality image at the lowest possible radiation exposure.
Keeping Radiation Exposure Low
A standard chest X-ray delivers about 0.1 millisieverts (mSv) of radiation. For perspective, the average person in the United States absorbs about 3.1 mSv per year just from natural background sources like cosmic rays and radon in soil. A single chest X-ray is roughly equivalent to about 12 days of that natural background exposure.
Several design features keep doses as low as possible. Collimators, adjustable metal shutters mounted at the tube’s exit point, restrict the X-ray beam to only the body region being imaged. Proper collimation reduces dose to nearby sensitive organs like the thyroid, eye lenses, and reproductive organs. It also reduces scattered radiation, stray photons that bounce off tissues in random directions and degrade image quality.
The broader safety principle used in radiology is known as ALARA: As Low As Reasonably Achievable. It rests on three pillars. Time: minimize how long the X-ray beam is on. Distance: increase the space between the radiation source and anyone not being imaged. Shielding: use lead aprons or barriers to block stray radiation. Together with modern digital detectors that need fewer photons to create a usable image, these measures have steadily reduced patient doses over the decades.

