Linear functions and equations.

ƒ(x) = mx + b   

A subclass of polynomial function where the variable x is only in the first power (i.e. a degree-one polynomial in one variable (i.e. univariate)). m and b are any real numbers. In polynomial-ish form: ƒ(x) = a1x1 + a0
All other functions are non-linear.

And/or equivalently,    y = mx + b    a linear equation of two variables.

m is the slope.
b is the y-intercept.

Its graph in the xy Cartesian plane is a (straight) line. This is why linear functions are called line-ar.
A line has the same shape everywhere; and same direction. Infinite is both directions.
(A graph shows all the points (i.e. pairs of x and y values) that make the equation true. And shows, for each value of x, its corresponding ƒ(x) (i.e. y) function value.)
NB. A line (and a curve) are 1D objects; they only have length, no width or thickness but in order to see them we need to thicken them with pixels, ink, or toner.
Linear functions are the simplest functions; but very useful.
The domain of every linear function is R. The range is R too, except for the special case of constant (horizontal) functions whose range is just one number.

Slope is the steepness/shallowness, grade, gradient, tilt, pitch, slant, incline/decline of the line. The slope is the same at all points of the line. Slope is how much the function is increasing or decreasing, i.e. its rate of change, which is how much the real-world process/activity is changing. A linear function's rate of change is unchanging, i.e. it is the same, it is a steady rate. Linear means wherever the x is (e.g. near 0 or -∞ or +∞) the change of y is the same for the same change of x.
A line has the same shape everywhere; and same direction.
Between any two points: the slope is
--the rise over the run;
--the change in the vertical divided by the change in the horizontal.
m = Δy / Δx = (y2-y1)/(x2-x1) = (y1-y2)/(x1-x2) for every pair of points on the line.
The change in y per one unit change in x, i.e. the rate of change of the y, the unit rate of y's per 1 x.
Ex. a slope of 2 means for a one unit increase of X the Y increases by 2.
Ex. a slope of -2 means for a one unit increase of X the Y decreases by 2.
The change in y as a percentage of x: %=m*100% (e.g. y=2x y=200%x; y=1/2x y=50%x)


Slope Explorer demos slope.

Slope is a kind of angle the line makes with the horizontal. It is interconvertible to angle via trig functions:
If α is an angle in radians: m=tan(α) and m=tan(angle°*(π/180))
α=arctan(m) and angle°=arctan(m)*(180/π)
Exs. m=0 α=0°
m=1 α=45°
m=2 α=63.4°
m=3 α=71.6°
m=4 α=76.0°
Ironically, slope m is not a linear function of degree.

Line crosses the y axis at the y-intercept: (0,b).
If b is 0, graph crosses origin (0,0).
A nonzero b is an offset from the origin, often representing an initial value.

Line crosses the x axis at the x-intercept, also called the zero of the function: (-b/m,0). X-intercept's x coordinate is the solution to the linear equation mx+b=0.

Every linear function's line crosses both axes. (Except the special case of horizontal lines, see below).
One end goes up to +∞, the other goes down to -∞.
There are no extrema, turning points, inflection points.

A line through the origin has x-intercept and y-intercept at the same point, i.e. (0,0).
A line through the origin is symmetric about the origin, i.e. an odd function. I.e. ƒ(-x)= -ƒ(x) [m(-x)=-mx] and ƒ(x)= -ƒ(-x) [mx=-m(-x)].

A line not through the origin is neither odd nor even.

Increasing line not thru origin (m>0) ↔ x and y intercepts opposite signs.
Decreasing line not thru origin (m<0) ↔ x and y intercepts same signs.

|m|<1 ↔ |xi|>|yi|
|m|>1 ↔ |xi|<|yi|
|m|=1 ↔ |xi|=|yi|

Given slope m and y-intercept b, the x-intercept/zero/root z is -b/m.
Given slope m and x-intercept/zero/root z, the y-intercept b is -mz.
Given x-intercept/zero/root z and y-intercept b, the slope m is -b/z.

Linear function as all multiples of m.


Varying the (positive) slope m, holding b at 0 (i.e. y-intercept is (0,0)).
Positive slope m means function is increasing (rising when going from left to right on graph). As x increases, y increases. "Going uphill".

The larger the slope m, the steeper the line, the faster it rises/grows.
If m=1, line is the main diagonal, 45°. (this y=x is the identity function ƒ(x)=x.)
If m>1, line is >45°. If m<1, line is <45°
Varying the (negative) slope m, holding b at 0 (i.e. y-intercept is (0,0) )
Negative slope m means function is decreasing (falling when going from left to right on graph). As x increases, y decreases. "Going downhill".

The larger the slope |m|, the steeper the line, the faster it falls.
If m=-1, line is the other diagonal, y=-x.

Varying the y-intercept b only, holding slope m at 1. Positive b raises/shifts the line vertically up, negative b lowers it.
Varying both the slope and the y-intercept: y = ±2x ± 3


Special case: any horizontal (flat) line has function ƒ(x)=b or y=b, where b is y-intercept. There is no x term, so some people don't consider this a linear function. Or it is a degree 0 polynomial function. Slope m is 0: y=0x+b, which is y=b. The function is neither increasing nor decreasing. There is no change in the y. For every x, the function outputs b. It's a constant function, the simplest kind of function, always the same, never changing. Whatever the x input is, the output is the same, b. It doesn't do any arithmetic. The range is a single number.
Special special case: ƒ(x)=0 or y=0, the zero function.   Is horizontal line at/on the x-axis. Is the no-degree polynomial function. Is the only function that is both even and odd.

Extra Special case: any vertical line is not even a function. The graph does not pass the vertical line test. Its equation is x=c. A vertical line passing through c on the x axis.
Slope is undefined (there is no change in the x, so the slope equation would be m=(y2-y1)/0, which would be infinite).

Parallel lines (i.e. don't intersect; no points in common) have same slope m. Linear functions with same slope m are parallel lines. They differ in their y-intercept b.
The distance of the gap between two parallel lines is:
cos(arctan(m))*|b1-b2|, and also
|b1-b2| / √(m2+1)
Between two parallel lines are an infinite number of parallel lines.

Perpendicular lines (i.e. lines that meet at right angles) have slopes that are the negative reciprocal of each other (if the slope of a line is m, then all lines perpendicular to it have slopes -1/m). i.e. product of slopes of two perpendicular lines is -1.

Every horizontal line is perpendicular to every vertical line, and vice versa.

Various lines:

The sum, difference, and composition of two linear functions is a linear function.
Multiplying or dividing two linear functions takes you non-linear into quadratic and rational functions, respectively.


Is a point on a line? Substitute the x and y coordinates of the point into the x and y of the line's expression/equation; if result is true, yes.

Distance between two points (x1,y1) and (x2,y2), i.e. the length of the line segment connecting the points:
d = √((x1-x2)2+(y1-y2)2)
i.e. the square root of the sum of the squares of the differences of the coordinates.
From Pythagorean theorem: length of hypotenuse is square root of sum of sides squared: h = √(a2+b2)
Horizontal line: |x1-x2|
Vertical line: |y1-y2|
* Line segment distance and midpoint calculator

Midpoint of a line segment:
(xm,ym) = ((x1+x2)/2,(y1+y2)/2)
i.e. = (average of the x's, average of the y's)

Intersection point (xi,yi) of two lines y=m1x+b1 and y=m2x+b2:
Equate the two expressions: m1x+b1 = m2x+b2 and solve for the x coordinate, then evaluate either expression at that solution for the y coordinate.
Formulae, too:
xi = (b2-b1)/(m1-m2) = (b1-b2)/(m2-m1)
yi = m1xi + b1    =    m2xi + b2

Given a line y=mx+b and a point (x1,y1) not on the line, the line perpendicular to the given line and going through the point is:
y = -1/m x + (x1/m + y1)

Given a line y=mx+b and a point (x1,y1) not on the line, the line parallel to the given line and going through the point is:
y = mx + (-x1/m + y1)

Given a line y=mx+b and a point (x1,y1) on the line, the two points on the line a distance d from the given point
(x1±d/√(1+m2), y1±dm/√(1+m2))

Given two lines y=m1x+b1 and y=m2x+b2, the angle between them is:
|arctan(m1) - arctan(m2)| * 180/π
(Do the calculator in radians mode)


Identity function: f(x) = x or id(x)=x or I(x)=x


The input is the output. Whatever goes in, comes out. No arithmetic is done.
If a function ƒ has an inverse ƒ-1, then their composition equals the identity function: ƒ ∘ ƒ-1 = id(x)


Two non-parallel lines m1x+b1 and m2x+b2 intersect where
the two expressions are equal: xi=(b2-b1)/(m1-m2)
     


Secant line: On the curve of a function ƒ the slope of the secant line connecting any two points (a,ƒ(a)) and (b,ƒ(b)) is the average rate of change over the interval [a,b]. (On a curve, the rate of change changes, or differs, at every point.)

Ex. Price of thing/stock/commodity/index. From each point to the "next" is a % change, a rate of change. Over an interval [a,b] (day, week, year): average change (%) per x time unit. Going on the secant line and its rate would also get you from f(a) to f(b). [stock and commodity price can change (%) in ms.]
Ex. Motion (distance from start). Rate of change is velocity. Secant line is average velocity over the trip from a to b.
Ex. Velocity. Rate of change is acceleration. Secant line is average acceleration over the trip from a to b.


Tangent line to a curve at a point; the one line just touching the curve at that point. (tangent, tangible = touchable). Every point on a curve has one tangent line; each point's tangent line is different than the tangent lines of all other [nearby] points on the curve; the tangent line is on the convex side of the curve. Slope of the tangent line is the instantaneous change of that function at that point, i.e. how much it is changing at that point, its rate of change. (Some points' different tangent lines might have the same slope.)
   
Calculus's differentiation of the function ƒ is the function ƒ' (called the derivative of ƒ) whose evaluation for each x yields the slope of the tangent line at the (x,y) point on the curve of ƒ.
ƒ(x) = y    points on the curve of ƒ. Graph above: f(x)=x2-1
ƒ'(x) = m    slope of the line tangent to curve at (x,ƒ(x)). Graph above: ƒ'(x)=2x
Exs. points on f(x)=x2-1:
    at (1,0), slope of tangent line = ƒ'(x)= 2(1) = 2
    at (2,3), slope of tangent line = ƒ'(x)= 2(2) = 4
    at (0,-1), slope of tangent line = ƒ'(x)= 2(0) = 0
    at (-1,0), slope of tangent line = ƒ'(x)= 2(-1) = -2

Ex. Motion (distance from start). Rate of change of distance is velocity. Slope of tangent line at (x,f(x)) is the velocity at that point. Derivative of distance function is velocity function.
Ex. Velocity. Rate of change of velocity is acceleration. Slope of tangent line at (x,f(x)) is the acceleration at that point. Derivative of velocity function is acceleration function.


Linear approximation. Use a line (simple) to approximate a [complicated] curve (over a short interval).


Linear regression line through a bunch of points (paired data): is the "best" line for approximating the linear relationship between the X and Y variables.
Can be used for interpolation/estimation.


Asymptote: a line that a curve approaches but never reaches.
Vertical where x is not in domain of the function (typically that would make the denominator 0).
horizontal as x approaches +∞ and/or -∞
slant/oblique
           

Examples of linear functions
Systems of linear equations
Inverses of linear functions
Slope Explorer
Correlation and linear regression line
Symmetry
Transformations

Worksheets. Identify all the functions and equations: