Recently, the perovskite BiCoO$_3$ has been shown experimentally to be
isostructural with PbTiO$_3$, while simultaneously the $d^6$ Co$^{3+}$ ion has
a high spin ground state with $C$-type antiferromagnetic ordering. Using hybrid
density functional calculations, we investigate the atomic, electronic and
magnetic structure of BiCoO$_3$ to elucidate the origin of the multiferroic
state. To begin with, we perform a qualitative trend sudy of the role of $d$
electrons in affecting the tendency for perovskite materials to exhibit a
ferroelectric distortion; this work initially explores a qualitative trend
study in artificial cubic and tetragonal LaBO$_3$ perovskites. We choose La as
the A-cation so as to remove the effects of Bi $6s$ hybridization. Through
first-principles calculations of the LaBO$_3$ series, where B is a $d^0 - d^8$
cation from the $3d$-block, the trend study reveals that increasing the $d$
orbital occupation initially removes the tendency for a polar distortion, as
expected. However, for high spin $d^5-d^7$ and $d^8$ cations a strong
ferroelectric instability is recovered. We explained this effect in terms of
the pseudo Jahn-Teller theory for ferroelectricity. It is shown that, in some
cases, unpaired electron spins actually drive ferroelectricity, rather than
inhibit it, which represents a shift in the understanding of how
ferroelectricity and magnetism interact in perovskite oxides. It follows, that
for the case of BiCoO$_3$, the Co$^{3+}$ ion plays a major role in the
ferroelectric lattice instability. Importantly, the ferroelectric polarization
is greatly enhanced when the Co$^{3+}$ ion is in the high spin state, when
compared to the nonmagnetic, low spin state, and a large coupling of the
electrical and magnetic polarization is present. Importantly, it is
demonstrated that the ground spin state is switched by reducing the internal
ferroelectric polarization