# Linear function (calculus)

1. REDIRECTTemplate:Distinguish Template:R from alternate name
Graph of the linear function: y(x) = −x + 2

In calculus and related areas of mathematics, a linear function from the real numbers to the real numbers is a function whose graph (in Cartesian coordinates with uniform scales) is a line in the plane.[1] Their characteristic property that when the value of the input variable is changed, the change in the output is a constant multiple of the change in the input variable.

Linear functions are related to linear equations.

## Properties

A linear function is a polynomial function in which the variable Template:Mvar has degree at most one, which means it is of the form[2]

f(x) = ax + b.

Here Template:Mvar is the variable. The graph of a linear function, that is, the set of all points whose coordinates have the form (x, f(x)), is a line on the Cartesian plane (if over real numbers). That is why this type of function is called linear. Some authors, for various reasons, also require that the coefficient of the variable (the Template:Mvar in ax + b) should not be zero.[3] This requirement can also be expressed by saying that the degree of the polynomial defining the function is exactly one, or by saying that the line which is the graph of a linear function is a slanted line (neither vertical nor horizontal). This requirement will not be imposed in this article, thus constant functions, f(x) = b, will be considered to be linear functions (their graphs are horizontal lines).

The domain or set of allowed values for Template:Mvar of a linear function is the entire set of real numbers R, or whatever field that is in use. This means that any (real) number can be substituted for Template:Mvar.

Because two different points determine a line, it is enough to substitute two different values for Template:Mvar in the linear function and determine f(x) for each of these values. This will give the coordinates of two different points that lie on the line. Because Template:Mvar is a function, this line will not be vertical. If the value of either or both of the coefficient letters Template:Mvar and Template:Mvar are changed, a different line is obtained.

Since the graph of a linear function is a nonvertical line, this line has exactly one intersection point with the Template:Mvar-axis. This point is (0, b).

The graph of a nonconstant linear function has exactly one intersection point with the Template:Mvar-axis. This point is ({{ safesubst:#invoke:Unsubst||$B=b/a}}, 0). From this, it follows that a nonconstant linear function has exactly one zero or root. That is, there is exactly one solution to the equation ax + b = 0. The zero is x = {{ safesubst:#invoke:Unsubst||$B=b/a}}.

## Slope

The slope of a line is the ratio between a change in Template:Mvar, denoted Δx, and the corresponding change in Template:Mvar, denoted Δy

The slope of a nonvertical line is a number that measures how steeply the line is slanted. The first derivative of a linear function, in the sense of calculus, is exactly this slope of the graph of the function. For f(x) = ax + b, this slope and derivative is given by the constant Template:Mvar. Linear functions can be characterized as the only real-valued functions that are defined on the entire real line and have a constant derivative.

The derivative of a function, in general, measures its rate of change. Because a linear function f(x) = ax + b has a constant rate of change Template:Mvar, it has the property that whenever the input Template:Mvar is increased by one unit, the output changes by Template:Mvar units. If Template:Mvar is positive, this will cause the value of the function to increase, while if Template:Mvar is negative it will cause the value to decrease. More generally, if the input increases by some other amount, Template:Mvar, the output changes by ca.

## Relationship with linear equations

The points on a line have coordinates which can also be thought of as the solutions of linear equations in two variables (the equation of the line). These solution sets define functions which are linear functions. This connection between linear equations and linear functions provides the most common way to produce linear functions.

The equation y = ax + b is referred to as the slope-intercept form of a linear equation. In this form, the variable is Template:Mvar, and Template:Mvar, is the value of the function. It also has two coefficients, Template:Mvar and Template:Mvar. In this instance, the fact that the values of Template:Mvar depend on the values of Template:Mvar is an expression of the functional relationship between them. To be very explicit, the linear equation is expressing the equality of values of the dependent variable Template:Mvar with the functional values of the linear function f(x) = ax + b, in other words y = f(x) for this particular linear function Template:Mvar.

If the linear function Template:Mvar is given, the linear equation of the graph of this function is obtained by defining the variable Template:Mvar to be the functional value f(x), that is, setting y = f(x) = ax + b and suppressing the functional notation in the middle. Starting with a linear equation, one can create linear functions, but this is a more subtle operation and must be done with care. Why this is so is not immediately apparent when the linear equation has the slope-intercept form, so this discussion will be postponed. For the moment observe that if the linear equation has the slope-intercept form, then the expression that the dependent variable Template:Mvar is equal to is the linear function whose graph is the line satisfying the linear equation.

The constant Template:Mvar is the so-called Template:Mvar-intercept. It is the Template:Mvar-value at which the line intersects the Template:Mvar-axis. The coefficient Template:Mvar is the slope of the line. This measures of the rate of change of the linear function associated with the line. Since Template:Mvar is a constant, this rate of change is constant. Moving from any point on the line to the right by one unit (that is, increasing Template:Mvar by 1), the Template:Mvar-value of the point's coordinate changes by Template:Mvar. This is expressed functionally by the statement that f(x + 1) = f(x) + a when f(x) = ax + b.

For example, the slope-intercept form y = −2x + 4 has a = −2 and b = 4. The point (0, b) = (0, 4) is the intersection of the line and the Template:Mvar-axis, the point ({{ safesubst:#invoke:Unsubst||$B=b/a}}, 0) = ({{ safesubst:#invoke:Unsubst||$B=−4/−2}}, 0) = (2, 0) is the intersection of the line and the Template:Mvar-axis, and a = −2 is the slope of the line. For every step to the right (Template:Mvar increases by 1), the value of Template:Mvar changes by −2 (goes down).

If the linear equation in the general form

Ax + By = C.

has B ≠ 0, then it may be solved for the variable Template:Mvar and thus used to define a linear function, namely, y = −({{ safesubst:#invoke:Unsubst||$B=A/B}})x + ({{ safesubst:#invoke:Unsubst||$B=C/B}}) = f(x). While all lines have equations in the general form, only the non-vertical lines have equations which can give rise to linear functions.

## Relationship with other classes of functions

If the coefficient of the variable is not zero (a ≠ 0), then a linear function is represented by a degree 1 polynomial (also called a linear polynomial), otherwise it is a constant function – also a polynomial function, but of zero degree.

A straight line, when drawn in a different kind of coordinate system may represent other functions.

For example, it may represent an exponential function when its values are expressed in the logarithmic scale. It means that when log(g(x)) is a linear function of Template:Mvar, the function Template:Mvar is exponential. With linear functions, increasing the input by one unit causes the output to increase by a fixed amount, which is the slope of the graph of the function. With exponential functions, increasing the input by one unit causes the output to increase by a fixed multiple, which is known as the base of the exponential function.

If both arguments and values of a function are in the logarithmic scale (i.e., when log(y) is a linear function of log(x)), then the straight line represents a power law:

${\displaystyle \log _{r}y=a\log _{r}x+b\quad \Rightarrow \quad y=r^{b}\cdot x^{a}}$

On the other hand, the graph of a linear function in terms of polar coordinates:

${\displaystyle r=f(\varphi )=a\varphi +b}$

is an Archimedean spiral if ${\displaystyle a\neq 0}$ and a circle otherwise.

## Notes

1. Stewart 2012, p. 23
2. Stewart 2012, p. 24
3. Template:Harvnb is but one of many well known references that could be cited.

## References

• James Stewart (2012), Calculus: Early Transcendentals, edition 7E, Brooks/Cole. ISBN 978-0-538-49790-9
• {{#invoke:citation/CS1|citation

|CitationClass=citation }}