For a number of years, iMacs have supported a feature known as target display mode, which allows them to serve as external displays for other computers, but as pointed out by TechCrunch's Matthew Panzarino yesterday, the new Retina 5K iMac does not support this mode.
The probable reason for this is also likely the reason why Apple did not announce a standalone Retina Thunderbolt Display yesterday: bandwidth limitations. The current DisplayPort 1.2 specification used over Thunderbolt 2 on Apple's latest Macs simply isn't capable of handling the bandwidth necessary for 5K video over a single cable.
As a result, no current Mac, including the Mac Pro and Retina MacBook Pro models that do support 4K displays, can currently drive a 5K external display. Technically, Apple could allow another Mac to output video at a lower resolution and have the Retina iMac scale the content up to fit its display, but this would not be ideal and Apple has apparently elected not to support it as an option.
As noted by Marco Arment, simple plug-and-play support for 5K external displays over a single cable will need the new DisplayPort 1.3 standard, but that won't be an option until Intel's Skylake platform, the successor to the upcoming Broadwell family, is launched.
Doing it right will require waiting until DisplayPort 1.3 in Thunderbolt 3 on Broadwell’s successor, Skylake, which isn’t supposed to come out for at least another year — and Intel is even worse at estimating ship dates than I am, so it’s likely to be longer. [...]Arment points out that Dell's upcoming 5K display uses dual DisplayPort 1.2 cables for connectivity but that no current Macs appear to support the setup and even if they did performance would likely not be ideal.
I’d estimate — granted, I’m wrong a lot — that Apple won’t ship a standalone 5K display until at least 2016, and it won’t work with any of today’s Macs, including the 2013 Mac Pro.
Another potential product on the horizon is a Retina 21.5-inch iMac likely at 3840 x 2160 pixels, although it is unclear when Apple plans to launch such a machine. KGI Securities analyst Ming-Chi Kuo predicts a second half of 2015 launch for the machine in a similar pattern to that seen with the MacBook Pro, where the larger 15-inch model received a Retina display option a number of months before the 13-inch model followed suit.