How would I parametrise a straight line?

1.2k Views Asked by At

If I want to parameterise a straight line and I have the equation, eg $y=2x+1$ and I also have two co-ordinates it passes through, would it ok to use the co-ordinates to parameterise in terms of $t$?

1

There are 1 best solutions below

0
On

Given a function $y=f(x)$, you can trivially parametrize it using $x=t$ and $y=f(t)$. Thus, a parametrization of it is $(t,2t+1)$.

It is also important to note that if you have the equation in the form $y=f(x)$, then you don't need to specify the point it goes through, since the function already determines such information.

However, if you're just given the two points, you have two options. The first is to find the equation $y=f(x)$ and then use the above trivial parametrization. The second involves directly finding a parametrization. To do this, we first find the direction vector between the two points. Say we have the two points $(x_1,y_1)$ and $(x_2,y_2)$. Then the direction vector from the first point to the second is given by $(x_2-x_1,y_2-y_1)$. This gives rise to the parametrization $((x_2-x_1)t+x_1, (y_2-y_1)t+y_1)$.

It isn't hard to show that this gives rise to the same function $y=f(x)$ by eliminating the parameter, so the two parametrizations give rise to the same line.

To see this, we write $x=(x_2-x_1)t+x_1$ and $y=(y_2-y_1)t+y_1$. We take the first equation and solve for $t$ to give $\frac{x-x_1}{x_2-x_1}=t$ and then substitute into the second to give $y=\frac{y_2-y_1}{x_2-x_1}(x-x_1)+y_1$ which is exactly the equation of a line passing through the given points. Of course, we must assume that $x_2-x_1\neq 0$, otherwise this wouldn't be a function anyways.