Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a right triangle $ABC$. I am given the coordinates of the two points $A(x_1, y_1)$ and $C(x_2, y_2)$. Given points $A$ and $C$, I want to determine the coordinates of $B$. I know there are two solutions for this. I want to find them both.

This image

share|cite|improve this question
Are the legs supposed to be parallel to the axes, as the picture kind of suggests? – André Nicolas Mar 18 at 11:47
No, not always . – Marox Tn Mar 18 at 11:48
Then there are infinitely many such triangles. – André Nicolas Mar 18 at 11:49
@MaroxTn you want to find $B$ – Jens Renders Mar 18 at 11:54
For completeness, if we do require the legs (catheti) to be parallel to the coordinate axes, there are clearly two solutions, $(x_2,y_1)$ and $(x_1,y_2)$. The latter solution is shown in the illustration. – Jeppe Stig Nielsen Mar 19 at 9:54
up vote 36 down vote accepted

There are many solutions for $B$:

Draw a circle trough the points $A$ and $C$, with diameter $|AC|$, then all points on that circle except $A$ and $C$ are solutions

This is called Thales' theorem


We can find the points on this circle by first finding the equation of that circle with center


Taking your example: $A=(4,3)$ and $C=(2,1)$ we find that


And the radius of the circle is $|AO|=\sqrt{1^2+1^2}=\sqrt{2}$

So the equation of that circle is $$(x-3)^2+(y-2)^2=2$$

All points $B=(x,y)$ that satisfy this equation, except $A$ and $C$ make a right triangle with your given points.

Let's solve the equation for $y$:

$$y=\pm \sqrt{2-(x-3)^2}+2$$

So choose a value for $x$ but make sure the part under the square root will not be negative, and this will give you two valid values for $y$!

Example: choose $x=3$ then the formula gives $y=\pm \sqrt{2}+2$ so $$B=(3,\sqrt{2}+2)$$

Is one of many solutions.

share|cite|improve this answer
A and B are constant points, not variable points, is there any relationship between them and C ? – Marox Tn Mar 18 at 11:49
You mean $A$ and $C$ are constant points? these are the points that you know, and $B$ is the one you are looking for right? The drawing illustrates that all points on the circle ar possible solutions for $B$ – Jens Renders Mar 18 at 11:51
Sorry I meant I have A and C, and I want to know B – Marox Tn Mar 18 at 12:07
certainly, I solved it for you – Jens Renders Mar 18 at 12:17
+1 for nice dynamic illustration. – Fred Kline Mar 18 at 12:41

Practically... between two push pins placed $ d= 2 \sqrt 2 $ distance apart press two sides (not hypotenuse) of a set square or triangle touching and same time rotating it. Notice that the vertex making a right angle can be moved to many points, in fact around a circle of diameter $d$.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.