# Distance Formula with Variables

#### PinkGlasses

##### New member
When I tried answering a problem in my Geometry textbook then looked at the answer in the back of my book, I was confused how to get to the correct answer. The problem shows a trapezoid on a coordinate plane that is centered at the origin. The coordinates of the points have variables: T(-a,0), R(-b,c),A(b,c), P(a,0). The non parallel sides are TR and PA. I have to use the distance formula to find the length of segment TR and segment PA to determine if the trapezoid is isosceles. In the selected answers sections of the book it says the answer is Yes;TR=PA= square root of a^2-2ab+b^2+c^2. How do I get this answer? I don't understand where the 2ab came from.

The answer I got is the square root of b^2+a^2+c^2.
Here's the process I went through:
1. TR= square root of (-b-(-a))^2+(c-0)^2
TR= square root of (-b+a)^2+(c)^2
TR= the square root of b^2+a^2+c^2

PA=square root of (b-a)^2+(c-0)^2
PA=square root of b^2+a^2+c^2

#### galactus

##### Super Moderator
Staff member
It would appear you have committed a common error. The square DOES NOT distribute like that.

$$\displaystyle (a-b)^{2}\neq a^{2}-b^{2}$$

$$\displaystyle (a-b)^{2}=(a-b)(a-b)=a^{2}-2ab+b^{2}$$

#### PinkGlasses

##### New member
It would appear you have committed a common error. The square DOES NOT distribute like that.

$$\displaystyle (a-b)^{2}\neq a^{2}-b^{2}$$

$$\displaystyle (a-b)^{2}=(a-b)(a-b)=a^{2}-2ab+b^{2}$$

I'm still a little bit confused. I know this is probably supposed to be really simple. I know I used to do problems similar to this a year ago, but I forgot about the concepts and the process.

So (b-a)^2 is when you multiply (b-a) times itself then you get 2ab? But why would you still have a^2 and b^2?

#### Mrspi

##### Senior Member
I'm still a little bit confused. I know this is probably supposed to be really simple. I know I used to do problems similar to this a year ago, but I forgot about the concepts and the process.

So (b-a)^2 is when you multiply (b-a) times itself then you get 2ab? But why would you still have a^2 and b^2?

(a - b)2 = (a - b)(a - b)

(a - b)(a - b) = a*a + (-b)*a + a*(-b) + (-b)*(-b)
So,
(a - b)2 = a2 - 2ab + b2

Look HERE for a review of multiplying two binomials together:

http://www.purplemath.com/modules/polymult2.htm

#### PinkGlasses

##### New member
(a - b)2 = (a - b)(a - b)

(a - b)(a - b) = a*a + (-b)*a + a*(-b) + (-b)*(-b)
So,
(a - b)2 = a2 - 2ab + b2

Look HERE for a review of multiplying two binomials together:

http://www.purplemath.com/modules/polymult2.htm

Thank you! That's what they're called. Yay, now I understand it.