Logo for MightySolve
Side of a rectangle

The side of a rectangle can be calculated by rearranging the formula for computing area or perimeter given the other side length. Hence we have the following formulas for computing side aa given side bb.A=aba=Abp=2(a+b)a=p2b2 \begin{aligned} A &= ab \quad &&\Rightarrow \quad a &&= \frac{A}{b} \\ p &= 2(a+b) \quad &&\Rightarrow \quad a &&= \frac{p - 2b}{2} \end{aligned} The formulas for computing side bb given aa are symmetric.

If we have only area and perimeter given of the rectangle and want to compute one of the sides, for instance side aa, we possibly have two solutions. We rearrange the formulasA=abb=Aap=2(a+b)p=2(a+Aa) \begin{aligned} A &= ab \quad &&\Rightarrow \quad b &&= \frac{A}{a} \\ p &= 2(a+b) \quad &&\Rightarrow \quad p &&= 2\left( a+ \frac{A}{a} \right) \end{aligned} by plugging in bb from the area formula into the perimeter formula. This then leads to the quadratic equationa2p2a+A=0 a^2 - \frac{p}{2}\cdot a + A = 0 for which we can have two solutions.