The point $M$ is the midpoint of the face $ABCD$ of the cube shown in the figure. Find points $P$ and $Q$ on the lines $AB$ and $EM$, respectively, such that the distance $PQ$ is equal to the distance between the lines $AB$ and $EM$.

![](https://cdn.mathpix.com/cropped/2024_05_02_3177316fa68d98c571e6g-1.jpg?height=225&width=260&top_left_y=234&top_left_x=930)
I. solution. Let's set up a Cartesian coordinate system such that the vertex $A$ is the origin, the $x, y, z$ axes coincide with the points $B, D, E$ respectively, and the unit is chosen to be one-tenth of the edge length of the cube. Thus, the coordinates of the points are: $B(10 ; 0 ; 0), D(0 ; 10 ; 0), M(5 ; 5 ; 0), E(0 ; 0 ; 10)$.

The point $P$ is on the line $A B$, and the point $Q$ is on the line $E M$, if there exist real numbers $t$ and $s$ such that

$$
\overrightarrow{A P}=t \cdot \overrightarrow{A B}, \quad \text { and } \quad \overrightarrow{A Q}=\overrightarrow{A E}+s \cdot \overrightarrow{E M}
$$

Thus, the coordinates of the points $P$ and $Q$ expressed in terms of the parameters $t$ and $s$ are: $P(10 t ; 0 ; 0), Q(5 s ; 5 s ; 10-10 s)$. Therefore,

$$
P Q^{2}=(10 t-5 s)^{2}+(5 s)^{2}+(10-10 s)^{2}
$$

It is known that the distance between the two lines is equal to the minimum distance of $P Q$. For a fixed value of $s$, $P Q$ is clearly minimized when $10 t=5 s$, i.e., when $t=s / 2$. In this case,

$$
P Q^{2}=(5 s)^{2}+(10-10 s)^{2}=(5 \sqrt{5} s-4 \sqrt{5})^{2}+20
$$

This expression is minimized when $s=0.8$, so the distance $P Q$ is minimized when $s=0.8$ and $t=0.4$. In this case, the coordinates of the points $P$ and $Q$ are: $P(4 ; 0 ; 0), Q(4 ; 4 ; 2)$.

Thus, the point $P$ is the point that divides the segment $A B$ in the ratio $2: 3$, and $Q$ is the point that divides the segment $M E$ in the ratio $1: 4$.

Based on the work of Róbert Birkus, 11th grade, Kodály Z. Gymnasium, Galánta

II. solution. If we denote the midpoint of the edge $A D$ by $N$, then the line $A B$ is clearly parallel to the plane $\mathcal{S}$ passing through the points $E, M$, and $N$. The orthogonal projection of the line $A B$ onto the plane $\mathcal{S}$ is a line $e$ that is parallel to $A B$ and passes through the orthogonal projection $A^{\prime}$ of the point $A$ onto the line $E N$ (1st figure). The plane $A E N$ is perpendicular to both the plane $\mathcal{S}$ and the line $A B$ (1st figure). If we consider the length of the edge $A B$ to be 10 units, then $A N=5$, and by the Pythagorean theorem, $E N=5 \sqrt{5}$, and $E M=5 \sqrt{6}$. In the right triangle $A E N$ (2nd figure), by the leg theorem, $A N^{2}=E N \cdot A^{\prime} N$, so

$$
A^{\prime} N=\frac{5^{2}}{(5 \sqrt{5})}=\sqrt{5}
$$

and therefore $E A^{\prime}=4 \sqrt{5}$.

![](https://cdn.mathpix.com/cropped/2024_05_02_f81d17f04b1f7a884913g-1.jpg?height=499&width=512&top_left_y=1415&top_left_x=796)

1st figure

![](https://cdn.mathpix.com/cropped/2024_05_02_f81d17f04b1f7a884913g-1.jpg?height=469&width=423&top_left_y=2059&top_left_x=840)

2nd figure

It is known that the distance $P Q$ is exactly equal to the distance between the lines $A B$ and $E M$ if $P Q$ is perpendicular to both lines. Therefore, the point $Q$ is precisely the intersection of the line $e$ with the line $E M$, and $P$ is the orthogonal projection of $Q$ onto the line $A B$. The right triangles $E N M$ and $E A^{\prime} Q$ are similar, so

$$
E Q=\left(\frac{E A^{\prime}}{E N}\right) \cdot E M=4 \sqrt{6} \quad \text { and } \quad A^{\prime} Q=\left(\frac{E A^{\prime}}{E N}\right) \cdot N M=4
$$

Thus, the point $Q$ is the point that divides the segment $E M$ in the ratio $4: 1$, and $P$ divides the segment $A B$ in the ratio $2: 3$, because the quadrilateral $A P Q A^{\prime}$ is a rectangle, so

$$
A P=A^{\prime} Q=4
$$