The dependencies on strain and oxygen vacancies of the ferroelectric polarization and the weak ferromagnetic magnetization in the multiferroic material bismuth ferrite, BiFeO3, are investigated using first principles density functional theory calculations. The electric polarization is found to be rather independent of strain, in striking contrast to most conventional perovskite ferroelectrics. It is also not significantly affected by oxygen vacancies, or by the combined presence of strain and oxygen vacancies. The magnetization is also unaffected by strain, however, the incorporation of oxygen vacancies can alter the magnetization slightly, and also leads to the formation of Fe2+. These results are discussed in light of recent experiments on epitaxial films of BiFeO3, which reported a strong thickness dependence of both magnetization and polarization.