# Area of a right angled triangle given the dimensions of an inscribed rectangle

Is there a way to find the area of the right-angled triangle given the dimensions of the rectangle? The rectangle can fit into the same right-angled triangle in two ways, as shown below:

Let $$a$$ = the width of the rectangle, $$b$$ = the length of the rectangle, $$x$$ = the base of the right-angled triangle and $$y$$ = the height of the right-angled triangle. $$a$$ and $$b$$ are known quantities as mentioned.

Currently, I'm thinking about similar triangles in the diagram on the left. Using the two smaller right-angled triangles that fit around the rectangle, $$(x-a)/a = b/(y-b)$$. I also know that the sum of the areas of the mini triangles in the first right-angled triangle is the same as the sum of the areas of the mini triangles in the second right-angled triangle. To express this, I thought about using the labelled lengths for the first right-angled triangle and subtracting the area of the rectangle ($$ab$$) from the area of the whole right-angled triangle ($$\frac{1}{2}xy$$) for the second right-angled triangle and equating them.

Expressing this mathematically: $$\frac{1}{2}a(y-b)+\frac{1}{2}b(x-a)=\frac{1}{2}xy-ab$$

Given that I know what $$a$$ and $$b$$ are, surely I can solve for unknowns $$x$$ and $$y$$ using simultaneous equations? However, I'm wondering whether I'm missing anything by not explicitly using the fact that the rectangle can fit in two ways?

• Your first equation is wrong. It should be $\frac{x-a}{a} = \frac{y-b}{b}$. To see this, draw a line through the NW and SE corners of the rectangle in the first diagram; it'll be parallel to the hypotenuse. Then draw another line, parallel to the hypotenuse, through the SW corner of the rectangle. Now the "proportional lengths cut off by parallel lines" theorem applies. Commented Nov 27, 2023 at 17:32
• Take that revised equality, and your "expressing this mathematically", and you'll see that there's only one solution. Your "expressing this mathematically" is an expression of the fact that the rectangle fits in two ways. Commented Nov 27, 2023 at 17:34
• I still don't get the right answer. For reference, $a=1$ and $b=\frac{1+\sqrt{5}}{2}$. I got an area of 4.05 to 3 s.f. after solving for $x$ and $y$ simultaneously. Commented Nov 27, 2023 at 17:50
• OK. Well, that means either that (a) one of your equations is wrong (b) the "right" answer is wrong, or (c) your algebra is wrong. I'm betting on "c" because when I solved simultaneously and computed $xy/2$, I got an answer a bit larger than $3$. Also, what is "s.f." here? Square feet? Are the lengths given in feet? Because you wrote them as just numbers. Why don't you go ahead and show your work in solving simultaneously, and then perhaps we can be more useful to you. Commented Nov 27, 2023 at 17:56
• I'm sorry, I quoted the wrong answer. I got 3.24 to 3 significant figures (which is what the s.f. stood for). This is however a wrong answer. Commented Nov 27, 2023 at 18:00

We can show that the configuration forces two of the rectangle vertices to coincide, as shown in the figure below, where the two rectangles are $$APQR$$ and $$STUV$$.

Let $$\overline{TB}=x$$. Then $$\overline{SB} = \sqrt{x^2+a^2}$$ and similarity $$ASV \sim SBT$$ yields $$\overline{AS} = \frac{bx}{\sqrt{x^2+a^2}}$$.

If we now use the similarity $$PBQ \sim SBT$$ we derive the condition $$\frac{\overline{TB}}{\overline{TS}} = \frac{\overline{PB}}{\overline{PQ}},$$ i.e. $$\frac{\overline{TB}}{\overline{TS}} = \frac{\overline{AS}+\overline{SB}-\overline{AP}}{\overline{PQ}},$$ which can be written in terms of the unknown $$x$$ as $$\frac{bx}{a} = \frac{bx}{\sqrt{x^2+a^2}}+\sqrt{x^2+a^2}-a$$ which is equivalent to $$bx = a\sqrt{x^2+a^2}.\tag{1}\label{1}$$ Recalling that $$\overline{AS} = \frac{bx}{\sqrt{x^2+a^2}}$$ we get $$\overline{AS} = \overline{AP} = a.$$ Solving \eqref{1} yields $$x=\frac{a^2}{\sqrt{b^2-a^2}}$$ and therefore $$\overline{SB} = \frac{ab}{\sqrt{b^2-a^2}}$$. Finally, similarity $$ABC \sim PQB$$ gives $$\overline{AB} = a+\frac{ab}{\sqrt{b^2-a^2}}$$ and $$\overline{AC} = b+\sqrt{b^2-a^2},$$ so that the required area is $$\boxed{[ABC] = \frac12 \left(a+\frac{ab}{\sqrt{b^2-a^2}}\right)\left(b+\sqrt{b^2-a^2}\right)}.$$

• perfect resolution +1. Commented Nov 28, 2023 at 10:31
• If you let $q = b/a >1$ be the aspect ratio of the rectangle, and let $r$ be leg ratio of the corresponding triangle (i.e. $r$ is the tangent of angle at $B$), then relationship between them simplifies to $q^2 = r^2+1$, although I only got that by doing hairy algebra on this solution. Maybe there's an easier way to derive it?
– Ned
Commented Nov 28, 2023 at 15:34
• @Ned thanks for the suggestion. I'll have a look into as soon as I can!
– dfnu
Commented Nov 28, 2023 at 18:59