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

This is probably a very basic question for this site, but it got me stumped.

For a right triangle with one leg (A) and perimeter (L) given, how do I calculate the hypotenuse (C) and second leg (B)? I know that $A^2+B^2=C^2$ and that $A+B+C=L$, but I couldn't find a way to find B and C given A and L.

share|cite|improve this question
up vote 8 down vote accepted

Note that $A^2=C^2-B^2=(C-B)(C+B)$ and $L-A=B+C$. Therefore

$$\begin{cases}C-B=\frac{A^2}{L-A} \; ,\\ \\ C+B=L-A \; ,\end{cases}$$

is a simple system of linear equations in the two variables $C$ and $B$.

share|cite|improve this answer
I forgot to mention in the question that A is the shortest leg (A<=B). In that case, am I correct in assuming there's only one solution for C and B in your equations? – Svein Bringsli Oct 21 '11 at 10:31
There is only one solution, but that does not depend on $A$ being the shortest leg. – Raskolnikov Oct 21 '11 at 10:36

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.