A function is called linear if it consists of a sum of multiples of the variables themselves, possibly plus a constant. For example, \(f(x)=3x-2\), \(f(x,y)=2x+3y-\frac12\) and \(f(x)=4\) are all linear functions, but \(f(x)=x^2+x+1\), \(f(x)=\frac1x\) and \(f(x,y)=xy\) are all non-linear.

A linear function \(f(x)\) of one variable can be represented by the straight-line graph \(y=f(x)\) (hence the name “linear”), and a linear function \(f(x,y)\) of two variables can be represented by the two-dimensional plane \(z=f(x,y)\) in three-dimensional space.

See also linear operator for a subtly different use of the term “linear”.