In basic mathematics, a linear function is a function whose graph is a straight line in 2-dimensions (2D, see images). An example is: y=2x–1. In higher mathematics, a linear function often refers to a linear mapping.