In megabar shock waves, materials compress and undergo a phase transition to a dense charged-particle system that is dominated by strong correlations and quantum effects. This complex state, known as warm dense matter, exists in planetary interiors and many laboratory experiments (for example, during high-power laser interactions with solids or the compression phase of inertial confinement fusion implosions). Here, we apply record peak brightness X-rays at the Linac Coherent Light Source to resolve ionic interactions at atomic (ångström) scale lengths and to determine their physical properties. Our in situ measurements characterize the compressed lattice and resolve the transition to warm dense matter, demonstrating that short-range repulsion between ions must be accounted for to obtain accurate structure factor and equation of state data. In addition, the unique properties of the X-ray laser provide plasmon spectra that yield the temperature and density with unprecedented precision at micrometre-scale resolution in dynamic compression experiments. M aterials exposed to high pressures of 1 Mbar and above have recently been the subject of increased attention due to their importance for the physics of planetary formation 1-3 , for material science 4 and for inertial confinement fusion research 5 . The behaviour of shock-compressed aluminium is of particular interest because it has been proposed as a standard for shock-wave experiments 6 and is widely used for equation-of-state 7,8 and warm dense matter (WDM) 9,10 studies. At room temperature, aluminium has three delocalized electrons, so it provides a prototype for an ideal electron fluid. As temperatures and pressures increase, compressing and breaking ionic lattice bonds, strong ionic forces remain, resulting in significant deviations from a simple fluid.Simulations using density functional theory coupled to manyparticle molecular dynamics (DFT-MD) have evolved into an ab initio tool to explore this regime of high-pressure physics 11,12 . To date, these simulations have been used to predict physical properties derived from optical observations of particle and shock velocities. Studies of structural properties that are sensitive to many-particle electron-ion and ion-ion interaction physics 13 have been challenging 14 , although recent progress has been made using X-ray absorption spectroscopy 15,16 . Early experiments on fourth-generation light sources 17 have made use of X-ray diffraction and measured the structural evolution from elastic to plastic states 18 . However, pressures in the Mbar regime, as required for melting many solids, have only recently become available at the Matter in Extreme Conditions (MEC) instrument at the Linac Coherent Light Source (LCLS).Here we visualize, for the first time, the evolution of compressed matter across the melting line and the coexistence regime into a WDM state. The combination of high-power optical lasers and the X-ray beam at MEC provides high-resolution X-ray scattering at multi-Mbar pressures. Our data provide the io...