  The results of the LSDA+U calculations for pyroxenes with diverse magnetic
properties (Li,Na)TM(Si,Ge)$_2$O$_6$, where TM is the transition metal ion
(Ti,V,Cr,Mn,Fe), are presented. We show that the anisotropic orbital ordering
results in the spin-gap formation in NaTiSi$_2$O$_6$. The detailed analysis of
different contributions to the intrachain exchange interactions for pyroxenes
is performed both analytically using perturbation theory and basing on the
results of the band structure calculations. The antiferromagnetic
$t_{2g}-t_{2g}$ exchange is found to decrease gradually in going from Ti to Fe.
It turns out to be nearly compensated by ferromagnetic interaction between
half-filled $t_{2g}$ and empty $e_g$ orbitals in Cr-based pyroxenes. The
fine-tuning of the interaction parameters by the crystal structure results in
the ferromagnetism for NaCrGe$_2$O$_6$. Further increase of the total number of
electrons and occupation of $e_g$ sub-shell makes the $t_{2g}-e_g$ contribution
and total exchange interaction antiferromagnetic for Mn- and Fe-based
pyroxenes. Strong oxygen polarization was found in Fe-based pyroxenes. It is
shown that this effect leads to a considerable reduction of antiferromagnetic
intrachain exchange. The obtained results may serve as a basis for the analysis
of diverse magnetic properties of pyroxenes, including those with recently
discovered multiferroic behavior.
