# Wiener filter optimal coefficients and the input signal

I have this question: "Show that for the optimal filter coefficients the error $e[n]$ is orthogonal to the input signal $w[n]$." anybody have an idea?

For conveniece I'm going to drop the time indexes. Let $e=d-\mathbf{a}^T\mathbf{x}$, where $d$ is the desired signal and $\mathbf{a}$ weights the elements of the observations/input vector $\mathbf{x}$. The goal is to minimize expected squared error with respect to the vector $\mathbf{a}$.
$$\min J=\min E[e^2],$$
where $E$ is the expectation operator. To find the minimum we take the derivative of the objective function w.r.t. $\mathbf{a}$ and set it equal to zero. Therefore $$\mathbf{g}=\frac{\partial E[e^2]}{\partial \mathbf{a}}=E[2e\frac{\partial e}{\partial \mathbf{a}}]=0,$$
but from the defintion of $e$ earlier, we have $$\frac{\partial e}{\partial \mathbf{a}}= -\mathbf{x}$$ Therefore $$E[2e\frac{\partial e}{\partial \mathbf{a}}]= -E[2e\mathbf{x}]=0.$$ The factor 2 can be removed and thus $E[e\mathbf{x}]=0$, which means the error $e$ is orthogonal to the input signal $\mathbf{x}$.