Michael Burr already succintly answered this question, but I wanted to point out some interesting details to those who are interested in such vectors.
Since each component of the vector is either $+1$ or $-1$, we can represent each vector as an unsigned integer in binary, with each binary digit $i$ (value $2^i$) representing the $(i+1)$'th vector component, $0 \le i \in \mathbb{N}$.
If we have a function $N_0(x)$ that returns the number of zeros in the binary representation of $x$, and $N_1(x)$ that returns the number of ones in the binary representation of $x$, the dot product between two vectors represented by unsigned integer values $a$ and $b$ is $\left(N_1(a \otimes b) - N_0(a \otimes b)\right)$, where $\otimes$ is the exclusive-or binary operator.
(Many processor architectures have a low-level operation called popcount, which returns the number of bits set. If $a$ and $b$ are $d$-bit unsigned integers representing two vectors, the dot product of the two vectors is $d - 2\operatorname{popcount}(a \otimes b)$. Using GCC with C or C++, this can be written as d - 2*__builtin_popcountll(a ^ b)
, where a
and b
are of unsigned long long
type.)
Interestingly, the number of dimensions must be even for there to be such perpendicular vectors.
Using an exhaustive brute force search, I found out that
$$\begin{array}{c|c}
\text{Dimensions} & \text{Maximum number of orthogonal vectors} \\
\hline
2 & 2 \\
4 & 4 \\
6 & 2 \\
8 & 8 \\
10 & 2 \\
12 & 4 \\
14 & 2 \\
16 & 16 \\
18 & 2 \\
20 & 4 \end{array}$$
Including the odd numbers of dimensions (where no two such vectors can be perpendicular, so using $1$ for those), we get the integer sequence $1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 16, \dots$, whis is OEIS A006519: the highest power of 2 dividing the number of dimensions. Which gels nicely with the binary representation of such vectors.