   SEARCH HOME Math Central Quandaries & Queries  Question from yaz, a student: Find the equation of the line joining A(-1,-9) to B(6,120. Another line passes through C(7,-5) and meets AB at rigth angle of D. Find the euation of CD and calculate the co-ordinates of D. Hi Yaz. Here's how I would solve this kind of three-part, three-step problem.

My sample question:

A line joins A(-7, 1) to B(3, -4). Another line passes through C(1, 7) and meets AB at right angles at point D. Find the equations of both lines and calculate the coordinates of point D.

Step 1: You have two points and want the equation of the line AB. Remember that line equations can be written as

y - yA = m(x - xA)

but m is the slope, which is the rise (difference of the y coordinates) over the run (difference of the x coordinates). So we can replace m and we have this:

y - yA = [ (yA - yB) / (xA - xB) ] (x - xA)

and now we can substitute in the values for (xA, yA) and (xB, yB) and solve for y:

y - 1 = [ (1 - (-4) ) / (-7 - 3) ] (x - (-7) )
y = [5 / (-10)] (x + 7) + 1
y = (-1/2) (x + 7) + 1

y = (-1/2)x - 5/2.

This is the equation of the first line. It has slope -½ and y-intercept of -5/2.

Step 2: You know that lines at right angles are perpendicular, which means their slopes are the negative reciprocals of each other. So the slope of the second line is -1/(-½) = 2. Now you know a slope and a point C on the second line. You can use the point-slope form (that's the first equation I wrote at the top) to find the equation:

y - yC = m(x - xC)

y - 7 = 2 (x - 1)
y = 2x - 2 + 7

y = 2x + 5.

This second equation is a line with slope +2 and y-intercept of +5.

Step 3: Given two lines with different slopes, you can calculate the intersection point using either the substitution or the elimination method of solving simultaneous equations. I'll use the substitution method in my example:

At the intersection point, the same value of (x, y) works for both equations. So y = 2x + 5 at the same time that y = (-1/2)x - 5/2. If y equals two different expressions, then the two different expressions equal each other, so:

2x + 5 = (-1/2)x - 5/2

2x + (1/2)x = -5/2 - 5
(5/2)x = -15/2
x = (-15/2)(2/5)

x = -3.

So at the intersection point D, x is -3. Now since there is only one value of y for this value of x, I can choose either equation to calculate y:

y = 2x + 5

y = 2(-3) + 5

y = -1.

Thus, the intersection point D is at (-3, -1).

You can solve your question using exactly this method, Yaz.

Cheers,
Stephen La Rocque.     Math Central is supported by the University of Regina and The Pacific Institute for the Mathematical Sciences.