Elementary flux modes (direct reaction routes) are minimal sets of enzymes that can operate at steady state, with all irreversible reactions used in the appropriate direction. They can be interpreted as component pathways of a (bio)chemical reaction network. Here, two different definitions of elementary modes are given and their equivalence is proved. Several algebraic properties of elementary modes are then presented and proved. This concerns, amongst other features, the minimal number of enzymes of the network not used in an elementary mode and the situations where irreversible reactions are replaced by reversible ones. Based on these properties, a refined algorithm is presented, and it is formally proved that this algorithm will exclusively generate all the elementary flux modes of an arbitrary network containing reversible or irreversible reactions or both. The algorithm is illustrated by a biochemical example relevant in nucleotide metabolism. The computer implementation in two different programming languages is discussed.