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. Here we see an example: y equals 2x plus 1, where k equals 2 is the slope, and b equals 1 is the y-intercept.