What's the equation for a line segment? I already know that the standard equation for a line is $y=mx+b$, but what if I want the line to have specific endpoints and not go on forever? For example, the equation for a line beginning at $(3, 1)$ and ending at $(7, 2)$. Can you help me? 

What's the standard equation for this?
You can make a parametric equation:
$$x=tx_1+(1-t)x_2$$
&amp;
$$y=ty_1+(1-t)y_2$$
where t$\in[0,1]$. It is the internal section formula of a line, where i replaced m and n with t.
You can make a line segment like this:

-sqrt(x)² gives a line with a negative slope for which if x is negative, the function is undefined.

you can limit the values of y by doing: sqrt(-sqrt(x)²)² this way you cannot have any negative y values in your graph. all you have to do now is move your graph around.

for example try: -sqrt(-sqrt(x-1)²+2)²+3

Try playing around with the function to get a feel on how it works.