5. If the edge length of the cube $A_{1} A_{2} A_{3} A_{4}-B_{1} B_{2} B_{3} B_{4}$ is 1, then the number of elements in the set
$$
\left\{x \mid x=\overrightarrow{A_{1} B_{1}} \cdot \overrightarrow{A_{i} B_{j}}, i, j \in\{1,2,3,4\}\right\}
$$

is $\qquad$
5. 1 .

Solution 1 Note that,
$$
\begin{array}{l}
\overrightarrow{A_{1} B_{1}} \perp \overrightarrow{A_{i} A_{1}}, \overrightarrow{A_{1} B_{1}} \perp \overrightarrow{B_{1} B_{j}}(i, j \in\{2,3,4\}) \text {. } \\
\text { Hence } \overrightarrow{A_{1} B_{1}} \cdot \overrightarrow{A_{i} B_{j}}=\overrightarrow{A_{1} B_{1}} \cdot\left(\overrightarrow{A_{i} A_{1}}+\overrightarrow{A_{1} B_{1}}+\overrightarrow{B_{1} B_{j}}\right) \\
=\overrightarrow{A_{1} B_{1}} \cdot \overrightarrow{A_{i} A_{1}}+{\overrightarrow{A_{1} B_{1}}}^{2}+\overrightarrow{A_{1} B_{1}} \cdot \overrightarrow{B_{1} B_{j}}={\overrightarrow{A_{1} B_{1}}}^{2}=1 \text {. } \\
\end{array}
$$

Solution 2 As shown in Figure 4, for any $i, j \in\{1,2,3,4\}$, the projection of $\overrightarrow{A_{i} B_{j}}$ onto $\overrightarrow{A_{1} B_{1}}$ is $\overrightarrow{A_{1} B_{1}}$, hence
$$
\overrightarrow{A_{1} B_{1}} \cdot \overrightarrow{A_{i} B_{j}}=1
$$