Given two vectors $x,y\in \mathbb{R}^n$ the orthogonal projection of $x$ on $y$ is defined as $\frac{x\cdot y}{|y|^2}y$.
On $\mathbb{C}^n$ consider the standard hermitian product $\langle v,w\rangle =\sum_{i=1}^nv_i\overline{w}_i$, $v,w\in\mathbb{C}^n$.
The difference with the real case is that if we want to define the orthogonal projection of $v$ on $w$ (or on the complex line $\mathbb{C}\cdot w$ to be precise) we have to pay attention to the order of $v$ and $w$ in the hermitian product. What I mean is that I've noticed that we can define the projection of $v$ on $w$ in two ways:$$\frac{\langle v,w\rangle}{||w||^2}w\qquad or \qquad \frac{\langle w,v\rangle}{||w||^2}w$$ which are different since $\langle v,w\rangle=\overline{\langle w,v\rangle}$.
Which one is correct and why?
Another explanation:
Note $v$ subtracted by the orthogonal projection is orthogonal to $v$'s orthogonal projection. Let $v_1=\frac{\langle v,w\rangle}{||w||^2}w$, $v_2=\frac{\langle w,v\rangle}{||w||^2}w$. We check $\langle v-v_1,v_1\rangle$ and $\langle v-v_2,v_2\rangle$:
$$\langle v-v_1,v_1\rangle=\langle v-\frac{\langle v,w\rangle}{\langle w,w\rangle}w,\frac{\langle v,w\rangle}{\langle w,w\rangle}w\rangle=\frac{\overline{\langle v,w\rangle}}{\langle w,w\rangle}\langle v,w\rangle-\frac{\langle v,w\rangle}{\langle w,w\rangle}\overline{\langle v,w\rangle}=0$$
$$\langle v-v_2,v_2\rangle=\langle v-\frac{\langle w,v\rangle}{\langle w,w\rangle}w,\frac{\langle w,v\rangle}{\langle w,w\rangle}w\rangle=\frac{\overline{\langle w,v\rangle}}{\langle w,w\rangle}\langle v,w\rangle-\frac{\langle w,v\rangle}{\langle w,w\rangle}\overline{\langle w,v\rangle}\neq 0$$