Say we have two vectors, $a$ and $b$, that take a form like this:
$$ a = \begin{pmatrix} f_a(0) \\ f_a(1) \\ f_a(2) \\ \vdots \end{pmatrix}, b = \begin{pmatrix} f_b(0) \\ f_b(1) \\ f_b(2) \\ \vdots \end{pmatrix} $$
Where $f \colon \mathbb{N} \mapsto \{0, 1\}$ for both $a$ and $b$
Let's make a few constraints. First, $a \neq b$. Second, $\exists n$ such that $f_a(n) = f_b(n)$. And lastly, both $f_a(x)$ and $f_b(x)$ equal $1$ the same amount of times.
My question is this:
Imagine we could add a complex phase to each index of both $a$ and $b$. Is there always a way for us to add a complex phase such that the vectors are orthogonal?
A quick example is this:
$$ a = \begin{pmatrix} 1 \\ 1 \\ 1 \\ 0 \\ 0 \\ 0 \\ 0 \\ 1 \end{pmatrix}, \: b = \begin{pmatrix} 1 \\ 1 \\ 0 \\ 1 \\ 0 \\ 0 \\ 1 \\ 0 \end{pmatrix} $$
We can alter these vectors:
$$ a^\prime = \begin{pmatrix} 1 \\ 1 \\ 1 \\ 0 \\ 0 \\ 0 \\ 0 \\ 1 \end{pmatrix}, \: b^\prime = \begin{pmatrix} -1 \\ 1 \\ 0 \\ 1 \\ 0 \\ 0 \\ 1 \\ 0 \end{pmatrix} $$
And these are orthogonal (their inner product is $0$). I believe this will be true when the number of overlaps between $f_a$ and $f_b$ is even. Is it true for odd times too? And if so, is it always true?
If $a[m]=0$ or $b[m]=0$ then let both $a'[m]=a[m]$ and $b'[m]=b[m]$.
Suppose the number of $m$ such that $a[m]=b[m]=1$ is k.
Let's call them $m_1, ..., m_k$
Then, keep $a[m]$s the same.
The inner product now essentially becomes $\sum_{j=1}^{k}b[m_j]$
Replace all $b[m_j]$s with the $k$th roots of unity.
As long as $k>1$, you can thus get the sum to be zero.