Question on computing an inner product Given a unit vector $u \in \mathbb{R}^{n+1}$.  
Let $$\phi_u: \mathbb{S}^n \rightarrow \mathbb{S}^n $$ such that $$\phi_u(x) = x -2 \langle x,u \rangle u.$$ The inner product is the standard one.
How can I get $$\phi_u(x_0,x_1,\cdots, x_n) = (x_0,-x_1,x_2,-x_3\cdots,-x_{n-1}, x_n)$$  for all $x=(x_0,x_1,\cdots, x_n) \in \mathbb{S}^n$? 

It is possible to find such a $u$ only for $n=2$ or $n=3$. 
But not for $n>3$. 
Here is why.
The formula you give for $\phi_u$ is the classical formula (see (https://en.wikipedia.org/wiki/Reflection_(mathematics))) for the orthogonal reflection through the hyperplane with normal vector $u$ in $\mathbb{R}^{n+1}$. Such a reflection is known to have eigenvalues $-1$ with multiplicity $1$ and $1$ with multiplicity n,
whereas the transformation you give has matrix:
$$diag(1,-1,1,-1,\cdots,1)$$
where the eigenvalue $-1$ has multiplicity $\lfloor n/2 \rfloor$. 
As $\lfloor n/2 \rfloor = 1 \iff n=2$ or $n=3$, all other cases are impossible.
In the case $n=2$, you can take $u=\binom{0}{1}$.
I leave you the case $n=3$.
