The notion of a modular is introduced as follows. A (metric) modular on a set X is a function w : ( 0 , ∞ ) × X × X → [ 0 , ∞ ] satisfying, for all x , y , z ∈ X , the following three properties: x = y if and only if w ( λ , x , y ) = 0 for all λ > 0 ; w ( λ , x , y ) = w ( λ , y , x ) for all λ > 0 ; w ( λ + μ , x , y ) ≤ w ( λ , x , z ) + w ( μ , y , z ) for all λ , μ > 0 . We show that, given x 0 ∈ X , the set X w = { x ∈ X : lim λ → ∞ w ( λ , x , x 0 ) = 0 } is a metric space with metric d w ∘ ( x , y ) = inf { λ > 0 : w ( λ , x , y ) ≤ λ } , called a modular space. The modular w is said to be convex if ( λ , x , y ) ↦ λ w ( λ , x , y ) is also a modular on X . In this case X w coincides with the set of all x ∈ X such that w ( λ , x , x 0 ) < ∞ for some λ = λ ( x ) > 0 and is metrizable by d w ∗ ( x , y ) = inf { λ > 0 : w ( λ , x , y ) ≤ 1 } . Moreover, if d w ∘ ( x , y ) < 1 or d w ∗ ( x , y ) < 1 , then ( d w ∘ ( x , y ) ) 2 ≤ d w ∗ ( x , y ) ≤ d w ∘ ( x , y ) ; otherwise, the reverse inequalities hold. We develop the theory of metric spaces, generated by modulars, and extend the results by H. Nakano, J. Musielak, W. Orlicz, Ph. Turpin and others for modulars on linear spaces.