Question 1109661
The longest stick that can be placed inside a rectangles with sides 4cm and 9cm
is a hair-thin stick as long as the diagonal of the rectangle.
{{{drawing(400,200,-0.3,9.7,-0.7,4.3,
rectangle(0,0,0.3,0.3),rectangle(9,0,8.7,0.3),
rectangle(0,4,0.3,3.7),line(0,0,9,0),
line(0,4,9,4),line(0,0,0,4),line(9,0,9,4),
red(line(0,0,9,4)),locate(4.5,2,red(stick)),
locate(4,0,9cm),locate(9.1,2.2,4cm)
)}}}
According to the Pythagorean theorem, the length of that stick is
{{{sqrt((9cm)^2+(4cm)^2)=sqrt(81cm^2+16cm^2)=sqrt(97cm^2)=sqrt(97)}}}{{{cm}}} .
That is approximately {{{9.8cm}}} .
 
 
The points A(2,3), B(-1,5), C(-5,1) & D(-1,-3), shown on the sketch below,
do not determine a square.
They are vertices of a quadrilateral with no parallel sides,
Points P(3,1), B(-1,5), C(-5,1) & D(-1,-3) are the vertices of a square,
with PC and BD being its diagonals.
They are equally long, perpendicular, and bisect each other,
and that tells us PBCD is a square.
 
{{{drawing(300,300,-6,4,-4,6,grid(1),
red(circle(2,3,0.1)),red(circle(-1,5,0.1)),
red(circle(-5,1,0.1)),red(circle(-1,-3,0.1)),
locate(2.1,3,A),locate(-0.9,5,B),
locate(-4.9,1,C),locate(-0.9,-3,D),
green(circle(3,1,0.1)),green(circle(3,1,0.15)),
locate(3.1,1,P)
)}}}
The lengths of the sides of ABCD are
{{{AB=sqrt((5-3)^2+(-1-2)^2)=sqrt(2^2+(-3)^2)=sqrt(4+9)=sqrt(13)=about3.6}}}
{{{BC=sqrt((1-5)^2+(-5-(-1))^2)=sqrt((-4)^2+(-4)^2)=sqrt(16+16)=sqrt(32)=4sqrt(2)=about5.7}}}
{{{CD=sqrt((-3-1)^2+(-1-(-5))^2)=sqrt((-4)^2+4^2)=sqrt(16+16)=sqrt(32)=4sqrt(2)=about5.7}}}
{{{DA=sqrt((3-(-3))^2+(2-(-1))^2)=sqrt(6^2+3^2)=sqrt(36+9)=sqrt(45)=3sqrt(5)=about6.7}}}
The perimeter of ABCD is approximately
{{{AB+BC+CD+DA=3.6+5.7+5.7+6.7=21.7}}} .
The exact result is
{{{sqrt(13)+8sqrt(2)+3sqrt(5)}}} .
If we use approximate side lengths with more decimal places,
we realize that the unrounded result is closer to 21.6:
{{{AB+BC+CD+DA=3.605551+5.656854+5.656854+6.708204=21.627463}}}