# Thread: how to find distance between 2 points

1. ## how to find distance between 2 points

Hi, i was looking for solution for my problem in geometry forum but without much luck for mine kind of problem.

The problem is:

3 points are given (2 points(A and B) has fixed position and 3 point's (C) position is not fixed).
Because point C are not fixed the distance BC are changing so every time i need to measure it manualy, so i was thinking maybe there are way to calculate distance BC just by putting new distances of AC in BC distance finding equation
Distances between points A and B; and A and C are known(given), need to find distance between B and C points or coordinates of point C.

(if needed can be taken one more fixed position point D all distances between point D and others points are known(given))

with regard
renas

2. ## Re: how to find distance between 2 points

Hey renas.

If these points are in flat space (i.e. in the typical three dimensional geometry with x, y, and z axes) then you can use the cosine rule where the three sides of a triangle are related by A^2 = B^2 + C^2 - 2*B*C*cos(B,C) where cos(B,C) is the angle between sides B and C.

You can find cos(B,C) by forming vectors with the other two, take the dot product and divide by the product of the lengths of the two vectors.

Using all of this will give you the distance of BC.

3. ## Re: how to find distance between 2 points

yes points are in 2D and i also know cosine rule, but can you explain me in more detailed way waht's "cos (B,C)" it is cos(angle A) or someting else.
do you refer to B as distance(line) between points A and B and the same way with C?
i can't measure the angle A or(BAC) (manually)!

and how to understand this:
"You can find cos(B,C) by forming vectors with the other two, take the dot product and divide by the product of the lengths of the two vectors."
who's those "other two"?

4. ## Re: how to find distance between 2 points

You have AC and BC distances: for a triangle you need either an angle or the other length and the reason is that you can rotate one of these lengths and it will change the other length.

If you have the vectors corresponding to AC and BC then the inner product <AC,BC> = ||AC||*||BC||*cos(AC,BC) can be used to get cos(AC,BC) which you use for your cosine rule formula.

5. ## Re: how to find distance between 2 points

thanks, i totally forgot about vectors

6. ## Re: how to find distance between 2 points

"<AC,BC> = ||AC||*||BC||*cos(AC,BC)"? do you based your formula on this A*B= ||a||*||b||*cos(angle ab)
if not what <AC,BC> means

7. ## Re: how to find distance between 2 points

The AC and the BC are just vectors corresponding to those sides. To do a dot product you need those vectors in 3D space and then you calculate cos(AC,BC) = <AC,BC>/[||AC||*||BC||] where <AC,BC> is the dot product of those two vectors and ||AC|| = SQRT(<AC,AC>).

If AC = <x,y,z> and BC = <a,b,c> then in normal 3D space <AC,BC> = x*a + y*b + z*c where all of these are just real numbers.

8. ## Re: how to find distance between 2 points

so by writing <AC you mean vector AC?
and how do you suggest to me get, as you say, "dot product"?
because vector length formula is L=SQRT(x^2+y^2) or if i use coordinates then L=SQRT((x2 - x1)^2 + (y2 - y1)^2)

so if we asume that point A(0,0); point B (x,0)(because i put line(vector) AB on X axis and then x=AB ) then point C (x,y). I have problems locating C point (the "dot product" as you say)
and what are the benefit in using 3D not 2D?