Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am not sure how to do this one at all, I can't even start it.

I am suppose to show that $$x = x_1+(x_2-x_1)t \\ y= y_1+(y_2-y_1)t$$where t is between zero and one describes the line segment that joins $P_1(x_1, y_1)$ and $P_2(x_2,y_2)$

I really have no clue what to do and how to work with this many different variables.

share|cite|improve this question
Do you want $x = x_1 + (x_2-x_1)t$? – Nicholas Kirchner Jun 25 '12 at 0:43
@NicholasKirchner Yes that is what I meant, too late now I guess. – user138246 Jun 25 '12 at 1:44
Jordan, the only variable there is $x$ (and $y(x)$, well). The other are fixed arbitrary constants. Don't get intimidated by it! – Pedro Tamaroff Jun 25 '12 at 1:44
up vote 3 down vote accepted

There are three things to prove here:

  1. the parametrization begins at $(x_1,y_1)$,
  2. the parametrization ends at $(x_2,y_2)$,
  3. the parametrization is a line segment.

The first two are easy to prove: we have $0 \leq t \leq 1$, so plug $t=0$ into the equations for $x$ and $y$. You should obtain $x = x_1$ and $y = y_1$, which gives us item #1 on our todo list. Do the same for $t=1$, and you'll get item #2.

The third requires a bit of algebra, and it must be kept in mind that $x_1,x_2,y_1,y_2$ are all constants, while $x,y$ are variables. Let us solve the $x$ equation for $t$: $$ x = x_1 + (x_2 - x_1)t $$ $$ \frac{x - x_1}{x_2-x_1} = t $$ Now, plug that into the $y$ equation: $$ y = y_1 + (y_2-y_1)t $$ $$ y = y_1 + (y_2-y_1)\frac{x - x_1}{x_2-x_1} $$

The goal here is to get it into the form $y = mx+b$, so the algebra will be focused on figuring out what's multiplying $x$ and what isn't. We'll start by breaking the fraction into two:

$$ y = y_1 + (y_2-y_1)\frac{x}{x_2-x_1} + (y_2-y_1)\frac{- x_1}{x_2-x_1} $$ Now, move the $y_1$ at the beginning to join it with the other stuff that does not depend on $x$: $$ y = (y_2-y_1)\frac{x}{x_2-x_1} + y_1 - (y_2-y_1)\frac{x_1}{x_2-x_1} $$ From here, we can see that we do have a line if we set $$ m =\frac{y_2-y_1}{x_2-x_1} $$ $$ b = y_1 - (y_2-y_1)\frac{x_1}{x_2-x_1} $$

share|cite|improve this answer
You could have stopped at $$y = y_1 + (y_2-y_1)\frac{x - x_1}{x_2-x_1}$$ That is a line with slope $\dfrac{y_2-y_1}{x_2-x_1}$ which passes through $(x_1, y_1)$ – Pedro Tamaroff Jun 25 '12 at 1:25
@Peter: Yeah, but the original questioner indicated discomfort with so many variables. – Nicholas Kirchner Jun 25 '12 at 1:40

The equation of line between two point is given by $$ y - y_1 = \frac{y_2 - y_1}{x_2 - x_1}(x - x_1)$$ $$ \implies \frac{y - y_1}{y_2 - y_1} = \frac{x - x_1}{x_2 - x_1} = t \text{ (let) } $$ $$ \implies y = y_1 + t(y_2 - y_1) \text{ and } \implies x = x_1 + t(x_2 - x_1) $$

share|cite|improve this answer
I came here from the Desmos graphing calculator, trying to find how they created a "line segment" as a parametric plot. They used exactly what the poster asked and what was shown in the excellent response. – Tom De Vries Dec 29 '15 at 15:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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