A method for constructing a square with area equal to that of a given rectangle is given in both the *Śulba-sūtras *of Baudhāyana and Āpastamba. This will use the previous technique of finding a square whose area is the difference of the areas of two given squares. Below is a translation of the original text from Āpastamba's *Śulba-sūtra*, verse 2.7 [Plofker2, p. 22]:

*Wishing [to make] an oblong quadrilateral an equi-quadrilateral [square]: Cutting off a [square part of the rectangle] with [its] width, [and] halving the remainder, put [the halves] on two [adjacent] sides [of the square part]. Fill in the missing [piece] with an extra [square]. Its removal [has already been] stated.*

**Figure 8. **This applet demonstrates the technique found in Āpastamba's *Śulba-sūtra *for transforming a rectangle into a square with equal area. Click "Go" to advance to the next step. The area of the given rectangle may be adjusted by sliding points \(B\) and \(D.\) The area of square \(RTSJ\) may also be changed by sliding point \(I.\) The desired area is achieved when point \(I\) meets side \(CB.\)

Consider a rectangle \(ADCB.\) Let us assume \(AB\) is the smaller side. In the GeoGebra applet in Figure 8, the reader may adjust the dimensions of the rectangle by moving points \(B\) and \(D.\)

First, mark points \(H\) and \(K\) on sides \(AD\) and \(CD,\) respectively, so that \(AHKB\) forms a square. Then find points \(E\) and \(M\) so that remaining rectangle \(HDCK\) is divided into two congruent rectangles \(HEMK\) and \(EDCM.\)

Next, construct \(BKGJ\) to the right of, and adjacent to \(AHKB,\) congruent to the rectangles \(HEMK\) and \(EDCM.\) Now observe that the sum of the areas of \(AHKB,\) \(HEMK,\) and \(BKGJ\) is equal to the area of the original rectangle \(ADCB.\)

Then construct square \(KMFG.\) Now the area of square \(AEFJ,\) less the area of \(KMFG,\) is equal to the area of the original rectangle \(ADCB.\) Thus our goal becomes to find the difference of squares \(AEFJ\) and \(KMFG.\)

We now proceed with the established technique for this. Find where the circular arc with center \(J\) and radius \(FJ\) intersects the segment \(BM.\) In the GeoGebra applet in Figure 8, slide point \(I\) along the arc. As point \(I\) approaches segment \(BM,\) the area of \(RTSJ\) approaches the area of \(ADCB.\) Indeed, when point \(I\) lies on segment \(BM,\) we apply the Pythagorean Theorem to triangle \(JIB\) and obtain

\[{\rm{Area}}(RTSJ)=IB^2=JI^2-JB^2=(JI-JB)(JI+JB).\]

But by congruence, \(JI=FJ=EA,\) and \(JB=EH\) and therefore,

\[JI-JB=EA-EH=HA=AB\]

and \[JI+JB = EA+EH = EA + DE = AD,\]

from which we infer \({\rm{Area}}(RTSJ)=(AB)(AD),\) as desired.

It is interesting to consider when the constructed square \(RTSJ\) will have side length equal to that of \(EH.\) For when this occurs, the side \(RT\) of \(RTSJ\) will lie precisely on side \(CB\) of \(ADCB.\) Setting \(X=AB\) and \(Y=AD,\) note that \[EH = \frac{Y-X}{2},\] and the equation \({\rm{Area}}(RTSJ)=(AB)(AD)\) can be rewritten as \[\left(\frac{Y-X}{2}\right)^2=XY\] or \[X^2-2XY+Y^2=4XY\] or \[X^2-6XY+Y^2=0.\]

Viewing the last equation as a quadratic in \(X\) and solving for \(X/Y\) we obtain

\[X=\frac{6Y-\sqrt{36Y^2-4Y^2}}{2}= (3 – 2\sqrt{2})Y,\] or

\[\frac{X}{Y}=\frac{AB}{AD}= 3 – 2\sqrt{2}.\]

Consequently, the constructed square \(RTSJ\) has side \(RT\) lying on side \(CB\) of \(ADCB\) \(-\) equivalently, \(RTSJ\) has side length equal to that of \(EH = {(AD-AB)}/{2}\) \(-\) precisely when \({AB}/{AD} = 3-2\sqrt{2},\) which the reader may verify by changing the dimensions of the original rectangle \(ADCB\) in the GeoGebra applet in Figure 8.