9. Let $x_{1}, x_{2}, \cdots, x_{n}, y_{1}, y_{2}, \cdots, y_{n}, z_{1}, z_{2}, \cdots, z_{n}$ all be 1 or -1, and $x_{1} y_{1}+x_{2} y_{2}+\cdots+$ $x_{n} y_{n}=0, x_{1} z_{1}+x_{2} z_{2}+\cdots+x_{n} z_{n}=0, y_{1} z_{1}+y_{2} z_{2}+\cdots+y_{n} z_{n}=0$, find the value of $n$.
9. Solution: $n=4 k\left(k \in \mathbf{N}_{+}\right)$ is the value of $n$.

According to the problem, $\left(x_{1} y_{1}+x_{2} y_{2}+\cdots+x_{n} y_{n}\right)+\left(x_{1} z_{1}+x_{2} z_{2}+\cdots+x_{n} z_{n}\right)+\left(y_{1} z_{1}+y_{2} z_{2}+\cdots\right.$ $\left.+y_{n} z_{n}\right)=0$.
Therefore, the number of +1 and -1 among these $3 n$ products is the same.
That is, $2 \mid 3 n$.
Also, because $\prod_{i=1}^{n} x_{i} y_{i} \cdot \prod_{i=1}^{n} x_{i} z_{i} \cdot \prod_{i=1}^{n} y_{i} z_{i}=\prod_{i=1}^{n} x_{i}^{2} \cdot \prod_{i=1}^{n} y_{i}^{2} \cdot \prod_{i=1}^{n} z_{i}^{2}=1$.
Thus, the number of -1 among the $3 n$ products is even.
Therefore, $4 \mid 3 n$, i.e., $n=4 k\left(k \in \mathbf{N}_{+}\right)$, which is sufficient. Let $y_{1}=y_{2}=\cdots=y_{2 k}=z_{k+1}=z_{k+2}=\cdots=z_{3 k}=-1$, and the rest of the numbers be 1, which satisfies the problem.
So, $n=4 k\left(k \in \mathbf{N}_{+}\right)$.