Overview
A linear function is a rule that produces outputs with a constant rate of change relative to its inputs. In elementary algebra a linear function of one variable is usually written y = mx + b, whose graph is a straight line in the Cartesian plane. In more advanced settings, the term often refers to a linear mapping between vector spaces that preserves addition and scalar multiplication.
Key characteristics
For the familiar one-variable form y = mx + b:
- slope (m): the constant rate of change or steepness of the line;
- y-intercept (b): the value of y when x = 0, shifting the line up or down;
- domain and range are typically all real numbers unless restricted.
For a linear mapping f between vector spaces, linearity means f(u + v) = f(u) + f(v) and f(cu) = c f(u). Such maps always send the zero vector to zero and can be represented by matrices once bases are chosen. See a basic definition: basic definition and a more formal treatment: linear mapping.
Examples and distinctions
Examples: y = 2x - 1 is a straight line but not a linear map in linear-algebra sense because it does not send 0 to 0. The function y = 3x is both a degree-1 polynomial and a linear map of R to R. Constant functions y = c are affine; only y = 0 is a linear map. A vertical line x = a is a linear relation but not a function y(x).
History and uses
Representing relationships by straight lines dates to analytic geometry developed by René Descartes and Pierre de Fermat. Linear functions serve as elementary models in physics, economics, and statistics (e.g., linear regression) and underpin much of linear algebra, which generalizes the idea to higher dimensions and systems of linear equations.
Notable facts
- Terminology varies: secondary sources may call degree‑one polynomials "linear" while linear algebra requires homogeneity.
- Systems of linear functions lead to matrices, determinants, eigenvalues and broad applications in science and engineering.


