# Calculating the coordinates of a vertex within a triangle so that the triangle becomes a right-angle

I have three points defining the vertices of a triangle A(1,4) B(6,7) C(5,1)

I have found that vector AC has a slope(m) of 0.6 and vector BC has a slope of 6. From these slopes have the angles of ≈34.39° and ≈73.94° respectively. Based on this, I know that these vectors intersect to form angle B at ≈39.55°. I would like to relocate vertex B so that angle B becomes 90° and therefore, ∠ABC becomes a right-angle.

The solution is constrained by the fact that:

1. I don’t wish to relocate vertex A or C.
2. I would like to adjust the location of B while attempting to keep the degree of adjustment relative to vertex A and C proportionate.

Being a geographer, I attempting to implement this solution using Geographic Information Systems (GIS) so I am not extremely proficient with math. Below is my logic for solving this problem but I haven’t had any success so far, so please post your proposed solution. Thanks!

Essentially, I am attempting to adjust the slopes of vector AC and BC so that angle B is affected and becomes 90°.

-At first I attempted to sum the component angles and find the difference from 90° and identify those points that do not intersect at a right-angle. I then tried to find what the new angles of the vectors should be by dividing each angle by the sum and multiplying by 90. I thought that by doing this I could find a ‘proposed’ new angle of the subject line.

Ex. (angleAC/(angleAC+angleBC))*90 = angleACnew

Using the new ‘proposed’ angle I would convert this back to a slope value and apply this to each of the vector equations and setting the equations equal to each other and algebraically solve for x.

I then planned on subbing back into one of the equations and solving for y. Thereby, giving be the new x,y coordinate for point B where B was a 90° angle. However, I realized that this methodology does not work since the sum of angleAC and angleBC do not accurately reflect the internal angles of the triangle and therefore do not yield a logical “adjustment value”.

Does anyone have some suggestions and/or guidance?

If vertices $A$ and $C$ are fixed, then the possible candidates for the new $B$ lie on the circle with diameter $AC$ (see Thales' Theorem). I'm not sure what the "degree of adjustment" in #2 is, but hopefully this helps.
• @WD_geo I understand your statement a little better now: you want to adjust both vectors $AB$ and $CB$, rather than just adjust one of them. But this is still rather qualitative. How are you measuring adjustment (angle of rotation, or difference in slope)? How are you quantifying proportionality (minimize the difference in the angles of rotation, etc.)? Regardless, note that your goal is to move your old vertex $B$ to a[ny] point on the boundary of the circle with diameter $AC$. – angryavian Dec 18 '13 at 1:19