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?

  • $\begingroup$ $$\frac{x-3}{4}=\frac{y-1}{1}$$ $$x=4t+3 ,\quad y=t+1 ,\quad0\le t\le 1$$ $\endgroup$ – Behrouz Maleki Jun 20 '16 at 13:18
  • 2
    $\begingroup$ Thats a line segment. You can write the equation of line, and then write inequalities or intervals like $x\in[3,7]$ or $y\in[1,2]$ to specify that it is a segment. $\endgroup$ – Max Payne Jun 20 '16 at 13:18
  • $\begingroup$ could you explain more? i can't understand t parameter.. $\endgroup$ – Kambiz Kousheshy Jun 20 '16 at 14:03
  • 1
    $\begingroup$ $$\frac{x-1}{4}=\frac{y-1}{1}=t\quad 0\le t\le1$$ $\endgroup$ – Behrouz Maleki Jun 20 '16 at 14:33
  • 1
    $\begingroup$ Given two points, $p,q \in \mathbb R^n$, the line segment connecting $p$ and $q$ is the set of all convex combinations of $p$ and $q$ $$\{ \theta p + (1-\theta) q \mid \theta \in [0,1]\}$$ $\endgroup$ – Rodrigo de Azevedo Jul 3 '16 at 1:43

You can make a parametric equation: $$x=tx_1+(1-t)x_2$$ & $$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.

  • $\begingroup$ Well I imagine someone doesn't take this as a serious question, hence the $-1$ on the question also. If it's voted to close I'll delete my answer, but it's better than having another unanswered question added to the site $\endgroup$ – snulty Jun 20 '16 at 13:31
  • $\begingroup$ thanks for reply.. could you explain more? i can't understand 't' parameter.. $\endgroup$ – Kambiz Kousheshy Jun 20 '16 at 14:05
  • $\begingroup$ you probably would have studied about internal section formula $x=\frac{mx_1+nx_2}{m+n}$ and $y=\frac{my_1+ny_2}{m+n}$ ,we are just dividing the line segment in m:n. So here , $t=\frac{m}{m+n}$ $\endgroup$ – Mayank Deora Jun 20 '16 at 14:12
  • $\begingroup$ @Bye_World ,i will take care $\endgroup$ – Mayank Deora Jun 20 '16 at 14:14
  • $\begingroup$ Notice that $t$ can take any values between 0 and 1 (inclusive) for any values of $m$ and $n$ .For more information read this :-doubleroot.in/coordinate-geometry-basics-section-formula-theory $\endgroup$ – Mayank Deora Jun 20 '16 at 14:24

The equation of your line is $$y=\frac{1}{4}(x+1)$$

found from the slope formula $m=\frac{y_2-y_1}{x_2-x_1}$, and solving for $y=1$ while subbing in $x=3$.

If you want a line segment rather than an infinite line you can restrict the domain of the line, restrict the allowed $x$-values:

$$y=\frac{1}{4}(x+1) \text{ for } x \in[3,7]$$

This we can see that $x=3$ we get $y=1$ and for $x=7$ we get $y=2$, and by continuity, we get all the values in between on the line, but none outside the segment we specified.


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.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.