Given a cube $A B C D A 1 B 1 C 1 D 1$ with edge $a$. Find the distance between the lines $A A 1$ and $B D 1$ and construct their common perpendicular.
Let $Q$ and $Q_1$ be the points of intersection of the diagonals of squares $ABCD$ and $A_1B_1C_1D_1$ respectively. Then the line $AQ$ is perpendicular to the intersecting lines $BD$ and $BB_1$ in the plane $BB_1D_1D$, so $AQ \perp BD_1$ and $AQ \perp AA_1$. Therefore, the distance between the skew lines $AA_1$ and $BD_1$ is equal to the length of the segment $AQ$, i.e., half the diagonal of the square with side $a$. From the midpoint $M$ of the edge $AA_1$, drop a perpendicular $MO$ to $QQ_1$. Then $MO \parallel AQ$, $O$ is the midpoint of $QQ_1$, so $O$ is the midpoint of $BD_1$. Moreover, $MO$ is perpendicular to the plane $BB_1D_1D$. Therefore, $MO$ is the common perpendicular of the skew lines $AA_1$ and $BD_1$ and

$$
MO = AQ = \frac{1}{2} a \sqrt{2}
$$

## Answer

$\frac{a \sqrt{2}}{2}$