First-principles calculations have been performed on perovskite-type Sc Rh3 Bx in order to understand the variation in the structural properties and bulk modulus as a function of the boron concentration. We use the projected augmented wave method with a supercell to treat different configurations of vacancies and boron atoms. The generalized gradient approximation is used for the exchange-correlation functional. The calculated lattice constants are found to be in excellent agreement with the experimental results. Maximum bulk modulus is realized surprisingly at x=0.5, contrary to the expectation that vacancies reduce the number of chemical bonds and hence the strength of the compounds. This is explained by examining the changes in the atomic and electronic structures upon B doping. We find that the doping enhances the cohesive energy monotonically due to the strong covalent bonding between B 2p and Rh 4d states. However, at x=0.5 a configuration is achieved in which each boron is surrounded by vacancies at the cube centers and vice versa. This reduces strain in the structure and the Rh-B bonds are short, leading to a maximum in the bulk modulus. The density of states at the Fermi energy is also minimum for x=0.5 which adds further stability to the structure. {\textcopyright} 2006 The American Physical Society.