  Density-functional calculations are carried out to investigate incommensurate
magnetic structures and ferroelectric polarization in newly discovered
multiferroic material MnI$_2$. The exchange interactions among local moments on
Mn are parameterized by mapping the mean-field Heisenberg model on to total
energy difference of several magnetic ordering states. The experimentally
observed noncollinear magnetic states are well reproduced by using this model
and exchange interaction parameters. The direction of polarization
experimentally measured is also consistent with the result derived from the
symmetry analysis of the magnetically ordered state. In particular, we find
that the inter-plane magnetic exchange coupling is pivotal to the emergence of
the spiral magnetic structure. This noncollinear magnetic structure, combined
with spin-orbit coupling mainly from I ions, is responsible for the appearance
of ferroelectric polarization.
