How to calculate the length of the sides of a rectangle given the diagonal coordinates

5.1k Views Asked by At

I have the top left corner and bottom right corner coordinates of a rectangle. The length of the diagonal is just the distance between the top left corner and bottom right corner. How can i solve for the length of the sides of the rectangle.

3

There are 3 best solutions below

3
On BEST ANSWER

There are infinitely many answers with the information given. As you can easily imagine, there are lots of rectangles, of different sizes that have the same diagonal. Certainly, if the sides of the rectangle are $a$ and $b$, and the length of the diagonal is $d$, then $a^2+b^2=d^2$. You're trying to use one number $d$ to find two numbers $a$ and $b$. This should upset you, philosophically. To solve the problem, we need more information. Either the other diagonal, or perhaps you seek only integer solutions...?

7
On

If the two points are $A(x_a,y_a)$ and $B=(x_b,y_b)$ than the sides of the rectangle with sides parallel to the coordinate axis are: $|x_b-x_a| $ and $|y_b-y_a|$.

If $d=\overline{AB}=\sqrt{(x_b-x_a)^2+(y_b-y_a)^2}$, a rectangle that has the sides not parallel to the axis can have a side of length $a \in (0,d)$ and the other side of length $b=\sqrt{d^2-a^2}$

0
On

This is related to Thales' theorem

https://en.wikipedia.org/wiki/Thales%27s_theorem

See the infinite many different pairs of legs here

https://en.wikipedia.org/wiki/Thales%27s_theorem#Proof