# Determine what is length and what is width of a rectangle

I have an algorithm to write for an app. So I am given a reference rectangle with known width and length and I have bigger rectangle which sides I have to determine, where one side is known. I realize I could use ratios, but the problem is that I don't know if a known side of a bigger rectangle is width or length. How do I determine this?

• If you just want any bigger rectangle just choose any $d>{ab\over c}$ where $a,b$ are width and length of the known rectangle and $c$ is the known side of the bigger rectangle. – cr001 Nov 17 '15 at 9:06
• the bigger rectangle's sides should have the same ratio as the smaller one, but I can assume that the bigger given side is both length or width and that's the problem – Marty Nov 17 '15 at 9:11
• Assuming the given length of the larger rectangle to be $c$, if $c>b$ where $b$ is the length of the smaller rectangle then either way will work. If $a<c<b$ where $a$ is the width of the smaller rectangle then only $d={bc\over a}$ will work. – cr001 Nov 17 '15 at 9:29
• what I did is that I used area ratios in both cases where given side of a larger rectangle is length and width and then compared perimeter ratios with the one of a smaller rectangle. When the perimeter ratios and lengths ratios coincide than it's an answer I guess... – Marty Nov 17 '15 at 9:36