The electronic structure of optimized GanPm(n+m=5, 17, 29, 35) isomers and Ga13P4 cluster in SiO2 matrix and sodalite cage has been studied by Hartree-Fock theory to find out the effect of cluster size and Ga-O bonds on the optical energy gap between LUMO and HOMO. It was found that the optical energy gap of Gal? clusters can be regulated by both the cluster size and the Ga-O interface satisfied by either SiO2 matrix or sodalite cage. The energy gap between LUMO and HOMO of Ga13P4 (in sodalite) cluster has been found to be closer to the visible light range than that of the Ga13P4 (in SiO2) cluster. (C) 2004 Elsevier B.V. All rights reserved.