For multilayered materials, reflectivity depends on the complex dielectric function of all the constituent layers, and a detailed analysis is required to separate them. Furthermore, for some cases, new quantum states can occur at the interface which may change the optical properties of the material. In this paper, we discuss various aspects of such analysis, and present a self-consistent iteration procedure, a versatile method to extract and separate the complex dielectric function of each individual layer of a multilayered system. As a case study, we apply this method to LaAlO3/SrTiO3 heterostructure in which we are able to separate the effects of the interface from the LaAlO3 film and the SrTiO3 substrate. Our method can be applied to other complex multilayered systems with various numbers of layers.