A membrane-bound organelle that envelops particles of magnetic iron minerals in magnetotactic bacteria. Magnetosomes form linear chains that align along the cellular motility axis at midcell and function in bacterial navigation along the Earth's magnetic field. They are formed by invagination of the cell inner membrane; in some species they remain connected to the inner membrane, in others they pinch off to form independent intracellular vesicles.