For statistical topics which involve the assumption of linearity, for example, linear regression or linear mixed models, or for the discussion of linear algebra as applied to statistics.

A linear function (in the sense of calculus) is one of the form $$f(x)=ax+b $$ where $a$ and $b$ are constants. The constant $a$ is the slope and the constant $b$ is the intercept of the function. This type of linear function occurs, for example, in linear regression.

In linear algebra, a linear function is a map $f$ between two vector spaces which is compatible with addition and scalar multiplication: $$f(x+y) = f(x) + f(y), \quad \quad f(ax) = a f(x), $$ where $x$ and $y$ denote elements of a vector space and $a$ denotes a scalar.

Note: the first type of linear function mentioned above is closely related to the second kind, being a special case of what is called (in linear algebra) an affine function.