A linear function is a mathematical function that can be written in the form y equals k x plus b, where k and b are constants and k is not equal to zero. The graph of a linear function is always a straight line. In this example, we have y equals 2x plus 1, where k equals 2 and b equals 1.