mathgeometrycomputer-sciencecoordinate-transformationcomputer-science-theory

Are constant functions linear?


Linear functions in mathematics are those polynomials whose degree is 1 and hence they are straight in nature when plotted on a graph. But the constant functions like f(x) = 3, even though their degree is 0, are straight in nature when plotted on a graph. Can’t we call them linear?


Solution

  • I would say they are not. There is some confusion between the equation of a straight line and the concept of linearity.

    A linear function is additive, i.e. f(x+y) = f(x)+f(y), which is not true for a constant function.

    The equation of a straight line through the origin y = m.x is indeed linear, but the equation of a general line y = m.x + p is not.

    A linear function with an additional constant is called affine. Hence a constant function is affine.