Abstract The band structure, chemical bonding, optical and Raman properties of the low pressure orthorhombic ( lpo ) and high pressure hexagonal ( hph ) phases of CsMgH 3 are extensively studied using first-principles calculations based on the density-functional theory. Total energy calculations are performed to understand the structural stability of the two polymorphs under pressure. The phase transformation of orthorhombic to hexagonal is calculated to occur at 0.8 GPa. Moreover, the current band structure calculation suggests that the lpo - and hph -CsMgH 3 are insulators with indirect and direct energy gaps of 3.3 and 3.6 eV, respectively. A detailed study of the electronic density of states and the charge density redistribution reveals the ionic/covalent mixing bonding features between Mg and H atom for both phases. Optical response calculation suggests that the imaginary part of dielectric function spectra is assigned to be the interband transition. Furthermore, the other optical properties of the lpo - and hph -CsMgH 3 are also presented. From the calculation of the zone-center ( Γ ) phonon frequencies, eigenvectors, and the dynamical matrix § ( Γ ), we obtained irreducible representations of allowed Raman-active and infrared-active phonons for both structures.