Here's how the legendary B-2 bomber's stealth works

Air Force crew chiefs perform a phase inspection on a B-2 Spirit bomber at Whiteman Air Force Base, July 12, 2012.US Air Force photo

The B-2 Spirit is one of the most clandestine and rare planes in the world.

Only 21 were ever built, and they reportedly have a stealth profile similar to that of a large bird despite their 170-foot wingspan. And they're invisible to many infrared seekers, despite four large engines.

Here's how engineers made a massive plane with large engines nearly invisible to systems designed to detect threats exactly like the B-2.

The B-2's stealth profile is the result of extensive computer testing that wasn't possible before its design. While the F-117 and B-1 were stealth aircraft, they were designed by nerds with slide rules and minimal computer modeling because the technology and the computers necessary simply didn't exist.

But when it was time to design the B-2, the all-powerful nerds had super computers and leveraged them to create a model that had no flat surfaces with which to reflect radar directly back to the sensor. While a machine with no flat surfaces is harder to manufacture, the increase in stealth was deemed worthy of extra costs.

If the B-2 were flying directly towards the radar, most of the waves would actually be reflected 90 degrees away from the receiver, giving the radar operators next to nothing to work with.

A B-2 Spirit takes off at Nellis Air Force Base, Nevada, January 28, 2014. US Airforce

But of course, the flying wing would lose most of its stealth if the engines were mounted outside of its high-tech form. So the engines were mounted inside with special openings for intake and exhaust that, again, would not reflect radar waves back to the dish.

It has a few (mostly classified) systems to help with this. The exact shape of the exhaust helps a lot, but it also cools its exhaust and mixes it with the outside air to create a final exhaust that is at nearly the same temperature as the air flowing into the intake.

This greatly frustrates pursuing missiles and fighters, but obviously still leaves it vulnerable if someone spots the plane and talks fighters into the vicinity to hunt it.

Anyone who has worked with most other jets knows that you can typically hear them before you see them, often by a matter of hundreds of feet. It's the sound that lets you know to look for the plane, but the B-2's tiny acoustic signature means that most observers on the ground won't know there's anything in the sky to look for.

Combined, this makes the B-2 a plane with little radar observability, that's too quiet for most people on the ground to notice it flying nearby, and it gives off little heat, frustrating missiles and fighters sent to down it.

All of this still requires good pilots and planning. Determined defenders could use low-frequency radar waves and skilled fighters to hunt down a B-2 following a too-populated or well-defended route. But the last element of B-2 stealth comes from good intelligence, allowing pilots and planners to send the bombers in through relatively undefended routes or through routes the B-2 can defeat.

Because that's a big part of the B-2's mission. It's not supposed to act as the primary bomber in most circumstances. It's a first-wave attacker, clearing the air defenses on the ground and opening "alleys" for less stealthy aircraft.

Ideally, they get a picture of the air defenses they will attack from reconnaissance aircraft like the RC-135 and are then able to dismantle them piece by piece.

A US Air Force B-2 Spirit takes off from Nellis Air Force Base, Nevada, June 1, 2017. US Air National Guard

But the B-2 can and has been sent against other targets, including bunkers in Iraq housing command and control elements during the invasion of that country. This is particularly useful when planners need to eliminate a target too early in the timeline to dismantle the air network first.

After all, if an enemy commander shows himself at a rally in the capital during an air campaign, you aren't going to wait for the B-2s to finish opening the air corridors, you're just going to send in B-2s to the final target (or you send B-1s if the B-2s can't get there in time). You can get the radars later.

And that's what's so great about the B-2. While the plane costs more dollars per hour of flight than many others and carries fewer bombs than planes like the B-52 and B-1, it can hit targets that few other platforms can, largely because of its amazing stealth.