TITLE: Is there a function for every possible line?
QUESTION [15 upvotes]: I'm currently in Pre-Calculus (High School), and I have a relatively simple question that crossed my mind earlier today. If I were to take a graph and draw a random line of any finite length, in which no two points along this line had the same $x$ coordinate, would there be some function that could represent this line? If so, is there a way we can prove this?

REPLY [4 votes]: The only straight lines in the $x$-$y$ plane that are not functions are those that are perfectly vertical.  Those are of the form $x=c$, where $c$ is a constant.  
All other lines can be expressed in the form $y =f (x)= mx + b$ where $m $ is the slope of the line and $b $ is the $y$-intercept-- the $y$ value when $x$ is $0$.
Given any two points on the line we can find this formula, and given its formula we can find any point on the line.
Such a function is called a linear function.