In this thesis, the band structure and partial density of state (PDOS) of CdS, and TMxCd1-xS (TM = Ti2+, Cr2+, Mn2+, Fe2+, Co2+, Ni2+, x = 0.03, 0.25) were analysed by first-principles calculations based on density functional theory. The band gap of 8-atoms CdS compound is 1.20 eV, and Cr2+0.25Cd0.75S compound has the smallest band gap of 0.71 eV. In addition, the band gap of 64-atoms CdS compound is 0.50 eV, and Cr2+0.03Cd0.97S compound also has the smallest band gap of 0.22 eV among all the TM doped into CdS compound. The analytic results from HOMO and LUMO reported Cr2+0.03Cd0.97S produced three defect levels which are dominated by Cr-3d and S-3p between valence-band and conduction-band of CdS. Therefore, the results told us Cr2+0.03Cd0....