# Distance between point coordinates in a straight line

Tags:
1. May 31, 2017

### Bunny-chan

1. The problem statement, all variables and given/known data
Let $A = (1,2,5)$ and $B = (0,1,0)$. Determine a point $P$ of the line $AB$ such that $||\vec{PB}|| = 3||\vec{PA}||$.

2. Relevant equations

3. The attempt at a solution
Initially, writing the line in parametric form$$\vec{AB} = B - A = (0-1,1-2,0-5) = (-1,-1,-5)\\ \\ \Rightarrow \vec{v} = (-1,-1,-5)\\$$$$r: (1, 2, 5) + \lambda(-1,-1,-5)\\ \\ x = 1 - \lambda\\ y = 2 - \lambda\\ z = 5 - 5\lambda$$I know that $\text{dist}\{PB\} = ||\vec{PB}||$, which in turn means$$||\vec{PB}|| = \sqrt{(0 - x)^2 + (1 - y)^2 + (0 - z)^2} = 3||\vec{PA}|| \\ \Rightarrow \sqrt{(0 - x)^2 + (1 - y)^2 + (0 - z)^2} = 3\left(\sqrt{(1 - x)^2 + (2 - y)^2 + (5 - z)^2}\right)$$And then I just replace the variables with their values from the parametric system of equations.

While this does seem correct to me, I can never get to the value of my book. I'd like to know what I'm doing wrong. I've checked a few solutions on the web, and sometimes they subtract $P - B$ instead of $B - P$ like I did, and it doesn't make sense to me... Any help would be greatly appreciated.

2. Jun 1, 2017

### ehild

Your work is correct so far, show what you did further.