We have performed an ab initio theoretical study of the stability, atomic geometry, and electronic structure of the self-organized Bi lines on the Si(001) surface. We have examined the two currently proposed models and two new hybrid models for the structure of Bi lines. Our results confirm the model proposed by Miki et al., in which the Bi lines are formed by Bi dimers parallel to the surrounding Si dimers, with a missing dimer row between the Bi dimers. However, in contrast to the proposal of symmetrically disposed surface Si dimers (i.e., with no buckling) by Miki et al., our total-energy calculations indicate that the buckling of the Si dimers is an exothermic process, reducing the surface total energy by 0.11 eV/dimer. Our theoretically simulated scanning tunneling microscopy results suggest a low density of states close to the valence-band maximum, localized on the Bi lines, supporting the recently proposed model of quantum antiwire systems for Bi lines on the Si(001) surface.