Linearity is the property of a mathematical relationship (function) that can be graphically represented as a straight line. Linearity is closely related to proportionality. Examples in physics include rectilinear motion, the linear relationship of voltage and current in an electrical conductor (Ohm's law), and the relationship of mass and weight. By contrast, more complicated relationships are nonlinear. Generalized for functions in more than one dimension, linearity means the property of a function of being compatible with addition and scaling, also known as the superposition principle.