4. Inside a square, four points are marked and nine segments are drawn (see figure). The lengths of all segments are 1. The segments drawn from the points to the sides of the square are perpendicular to them. Find the length of the side of the square.
Solution. Let the side of the square be X. Then the distance

![](https://cdn.mathpix.com/cropped/2024_05_06_df3b00f8c7557dc9a30bg-2.jpg?height=292&width=295&top_left_y=188&top_left_x=1620)
from the left side of the square to the left bottom point is (X-1)/2, and the distance from the right side of the square to the right top point is 1. Therefore, the horizontal distance between them is $\mathrm{X} - ( \mathrm{X}-1) / 2 - 1 = (\mathrm{X}-1) / 2$. The vertical distance between them is $\mathrm{X}-2$. These two distances form the legs of a right triangle, with the diagonal between the points being the hypotenuse of length 1. Therefore, by the Pythagorean theorem:

$((\mathrm{X}-1) / 2)^{2}+(\mathrm{X}-2)^{2}=1^{2}$

$(\mathrm{X}-1)^{2}+4(\mathrm{X}-2)^{2}=4$

$\mathrm{X}^{2}-2 \mathrm{X}+1+4 \mathrm{X}^{2}-16 \mathrm{X}+16=4$

$5 \mathrm{X}^{2}-18 \mathrm{X}+13=0$.

Solving this quadratic equation, we get $\mathrm{X}_{1}=1, \mathrm{X}_{2}=2.6$. Clearly, the case $\mathrm{X}=1$ contradicts the diagram, so the length of the side of the square is 2.6.