Find the distance between a line and a point

113 Views Asked by At

I have a line $y=x$ and I need to find the point $(X,Y)$ that their distance is less or equal to $7$ from the line $y=x$.

1

There are 1 best solutions below

0
On

The set you are searching for is bounded by two lines (let's call them $g$ and $h$) that are parallel to the line $y=x$.

So they can be represented by the formulas $$g:\ y=x+d_g$$ and $$h:\ y=x+d_h$$ You can also write that as $$d_g=y-x$$ and $$d_h=y-x$$ Without loss of generality, we can say that $g$ is below the line $y=x$ and $h$ is above the line $y=x$. This leads to $d_g < 0 < d_h$.

So the set of points you are searching for is $$\{(x,y)\mid d_g\leq y -x\leq d_h\}$$ All that needs to be done now is to calculate $d_g$ and $d_h$. I suppose that this question concerns your homework, so I will not do that for you. Just a tip: Make a drawing of the geometrical situation that I explained above and then use Pythagoras' theorem to calculate $d_g$ and $d_h$.