<s>[INST] Is there an equation that will graph a line segment? Is there an equation that, given the two points of a line segment, will result, when graphed for x on a real graph, in a line segment?
 [/INST] A very simple way to do this would be to add and then subtract the square roots of an expression to define the domain. For example:
Given $(3,34)$ and $ (5, 52)$, first find the equation for the line that goes between the two points:
$(52-34)/(5-3)x + b = y$
$y = 9x + b$
$34 = 9(3) + b$
$b = 7$
Therefore, the equation of the line is: $y = 9x + 7$
To restrict the domain to $[3, 5]$ start by adding and subtracting $\sqrt(x-3)$. The equation becomes:
$y = 9x + 7 + \sqrt{x-3}- \sqrt{x-3}$
To restrict the upper part of the domain, add and subtract  √(-x+5). The final equation becomes:
$y = 9x + 7 + \sqrt{x-3} - \sqrt{x-3} + \sqrt{-x+5} - \sqrt{-x+5}$
Hope this helps!
</s>