Let x and y denote the sides of the rectangle. If the area is fixed, then xy is a constant, say xy=A. The perimeter of the rectangle is then a function P(x,y)=2x+2y. But, since
xy=A⟹y=Ax,
we can write P as a function of x alone,
P(x)=2x+2Ax.
So, to find the value of x at which P(x) is minimal we take the derivative,
P(x)=2x+2Ax⟹P′(x)=2−2Ax2.
This has a zero at x=√A and we have
P′(x)<0whenx<√AP′(x)>0whenx>√A.
Therefore, P(x) is decreasing forx<√A and increasing for x>√A. Hence, P(x) has its minimum at x=√A. Sincex=√A impliesy=√A as well, we have that the perimeter is minimal when x=y, i.e., when the rectangle is a square.