The geometrical structures,band structures,density of states(DOS) and optical properties of undoped and doped rare earth elements(Y,La) in ZnO have been calculated from the first principles of plane wave ultra-soft pseudo-potential method based on density functional theory. After doping,the stability of structures are enhanced and the band gap becomes wider. When doped with Y(La), the Fermi energy of the system goes into the conduction band,the system shows metallicity and transforms into degenerate semiconductor. Furthermore, the change of optical properties after doping have been analyzed.