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

geometry

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.

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...?