NASA has captured the first-ever images of the interaction of shockwaves from two aircraft flying at supersonic speeds.

The pictures show a pair of T-38s from the US Air Force Test Pilot School flying in formation.

"We never dreamt that it would be this clear, this beautiful," said physical scientist JT Heineck of NASA's Ames Research Centre in California.

Using the schlieren photography technique, NASA was able to capture the first air-to-air images of the interaction of shockwaves from two supersonic aircraft flying in formation. ( Supplied: NASA )

Scientists wanted to study the shockwaves as part of a bid to develop planes which can fly faster than the speed of sound without generating ear-splitting sonic booms.

Shockwaves produced by aircraft merge together as they travel through the atmosphere and are responsible for the sonic boom heard at ground level.

"I am ecstatic about how these images turned out," Mr Heineck said.

"With this upgraded system, we have, by an order of magnitude, improved both the speed and quality of our imagery from previous research."

In order to capture the photographs, which were taken in monochrome and later colourised, NASA flew a plane outfitted with an updated imaging system at about 30,000 feet while the T-38s stayed in formation while flying at supersonic speeds at the precise moment they were under the camera.

The cameras, which record for a total of three seconds, had to begin recording at the exact moment the T-38s came into frame.

When aircraft fly faster than the speed of sound, shockwaves travel away from the vehicle, and are heard on the ground as a sonic boom. ( Supplied: NASA )

The images were captured during the fourth phase of Air-to-Air Background Oriented Schlieren flights, or AirBOS, which took place at NASA's Armstrong Flight Research Center in Edwards, California.

"The biggest challenge was trying to get the timing correct to make sure we could get these images," said Heather Maliska, AirBOS sub-project manager.

"I'm absolutely happy with how the team was able to pull this off. Our operations team has done this type of manoeuvre before.

"They know how to get the manoeuvre lined up, and our NASA pilots and the Air Force pilots did a great job being where they needed to be.