# Orthogonality principle

In statistics and signal processing, the orthogonality principle is a necessary and sufficient condition for the optimality of a Bayesian estimator. Loosely stated, the orthogonality principle says that the error vector of the optimal estimator (in a mean square error sense) is orthogonal to any possible estimator. The orthogonality principle is most commonly stated for linear estimators, but more general formulations are possible. Since the principle is a necessary and sufficient condition for optimality, it can be used to find the minimum mean square error estimator.

## Orthogonality principle for linear estimators

The orthogonality principle is most commonly used in the setting of linear estimation.[1] In this context, let x be an unknown random vector which is to be estimated based on the observation vector y. One wishes to construct a linear estimator ${\displaystyle {\hat {x}}=Hy+c}$ for some matrix H and vector c. Then, the orthogonality principle states that an estimator ${\displaystyle {\hat {x}}}$ achieves minimum mean square error if and only if

• ${\displaystyle E\{({\hat {x}}-x)y^{T}\}=0,}$ and
• ${\displaystyle E\{{\hat {x}}-x\}=0.}$

If x and y have zero mean, then it suffices to require the first condition.

### Example

Suppose x is a Gaussian random variable with mean m and variance ${\displaystyle \sigma _{x}^{2}.}$ Also suppose we observe a value ${\displaystyle y=x+w,}$ where w is Gaussian noise which is independent of x and has mean 0 and variance ${\displaystyle \sigma _{w}^{2}.}$ We wish to find a linear estimator ${\displaystyle {\hat {x}}=hy+c}$ minimizing the MSE. Substituting the expression ${\displaystyle {\hat {x}}=hy+c}$ into the two requirements of the orthogonality principle, we obtain

${\displaystyle 0=E\{({\hat {x}}-x)y\}}$
${\displaystyle 0=E\{(hx+hw+c-x)(x+w)\}}$
${\displaystyle 0=h(\sigma _{x}^{2}+\sigma _{w}^{2})+hm^{2}+cm-\sigma _{x}^{2}-m^{2}}$

and

${\displaystyle 0=E\{{\hat {x}}-x\}}$
${\displaystyle 0=E\{hx+hw+c-x\}}$
${\displaystyle 0=(h-1)m+c.}$

Solving these two linear equations for h and c results in

${\displaystyle h={\frac {\sigma _{x}^{2}}{\sigma _{x}^{2}+\sigma _{w}^{2}}},\quad c={\frac {\sigma _{w}^{2}}{\sigma _{x}^{2}+\sigma _{w}^{2}}}m,}$

so that the linear minimum mean square error estimator is given by

${\displaystyle {\hat {x}}={\frac {\sigma _{x}^{2}}{\sigma _{x}^{2}+\sigma _{w}^{2}}}y+{\frac {\sigma _{w}^{2}}{\sigma _{x}^{2}+\sigma _{w}^{2}}}m.}$

This estimator can be interpreted as a weighted average between the noisy measurements y and the prior expected value m. If the noise variance ${\displaystyle \sigma _{w}^{2}}$ is low compared with the variance of the prior ${\displaystyle \sigma _{x}^{2}}$ (corresponding to a high SNR), then most of the weight is given to the measurements y, which are deemed more reliable than the prior information. Conversely, if the noise variance is relatively higher, then the estimate will be close to m, as the measurements are not reliable enough to outweigh the prior information.

Finally, note that because the variables x and y are jointly Gaussian, the minimum MSE estimator is linear.[2] Therefore, in this case, the estimator above minimizes the MSE among all estimators, not only linear estimators.

## General formulation

Let ${\displaystyle V}$ be a Hilbert space of random variables with an inner product defined by ${\displaystyle \langle x,y\rangle =E\{x^{H}y\}}$. Suppose ${\displaystyle W}$ is a closed subspace of ${\displaystyle V}$, representing the space of all possible estimators. One wishes to find a vector ${\displaystyle {\hat {x}}\in W}$ which will approximate a vector ${\displaystyle x\in V}$. More accurately, one would like to minimize the mean squared error (MSE) ${\displaystyle E\|x-{\hat {x}}\|^{2}}$ between ${\displaystyle {\hat {x}}}$ and ${\displaystyle x}$.

In the special case of linear estimators described above, the space ${\displaystyle V}$ is the set of all functions of ${\displaystyle x}$ and ${\displaystyle y}$, while ${\displaystyle W}$ is the set of linear estimators, i.e., linear functions of ${\displaystyle y}$ only. Other settings which can be formulated in this way include the subspace of causal linear filters and the subspace of all (possibly nonlinear) estimators.

Geometrically, we can see this problem by the following simple case where ${\displaystyle W}$ is a one-dimensional subspace:

We want to find the closest approximation to the vector ${\displaystyle x}$ by a vector ${\displaystyle {\hat {x}}}$ in the space ${\displaystyle W}$. From the geometric interpretation, it is intuitive that the best approximation, or smallest error, occurs when the error vector, ${\displaystyle e}$, is orthogonal to vectors in the space ${\displaystyle W}$.

More accurately, the general orthogonality principle states the following: Given a closed subspace ${\displaystyle W}$ of estimators within a Hilbert space ${\displaystyle V}$ and an element ${\displaystyle x}$ in ${\displaystyle V}$, an element ${\displaystyle {\hat {x}}\in W}$ achieves minimum MSE among all elements in ${\displaystyle W}$ if and only if ${\displaystyle E\{(x-{\hat {x}})y^{T}\}=0}$ for all ${\displaystyle y\in W.}$

Stated in such a manner, this principle is simply a statement of the Hilbert projection theorem. Nevertheless, the extensive use of this result in signal processing has resulted in the name "orthogonality principle."

## A solution to error minimization problems

The following is one way to find the minimum mean square error estimator by using the orthogonality principle.

We want to be able to approximate a vector ${\displaystyle x}$ by

${\displaystyle x={\hat {x}}+e\,}$

where

${\displaystyle {\hat {x}}=\sum _{i}c_{i}p_{i}}$

is the approximation of ${\displaystyle x}$ as a linear combination of vectors in the subspace ${\displaystyle W}$ spanned by ${\displaystyle p_{1},p_{2},\ldots .}$ Therefore, we want to be able to solve for the coefficients, ${\displaystyle c_{i}}$, so that we may write our approximation in known terms.

By the orthogonality theorem, the square norm of the error vector, ${\displaystyle \left\Vert e\right\Vert ^{2}}$, is minimized when, for all j,

${\displaystyle \left\langle x-\sum _{i}c_{i}p_{i},p_{j}\right\rangle =0.}$

Developing this equation, we obtain

${\displaystyle \left\langle x,p_{j}\right\rangle =\left\langle \sum _{i}c_{i}p_{i},p_{j}\right\rangle =\sum _{i}c_{i}\left\langle p_{i},p_{j}\right\rangle .}$

If there is a finite number ${\displaystyle n}$ of vectors ${\displaystyle p_{i}}$, one can write this equation in matrix form as

${\displaystyle {\begin{bmatrix}\left\langle x,p_{1}\right\rangle \\\left\langle x,p_{2}\right\rangle \\\vdots \\\left\langle x,p_{n}\right\rangle \end{bmatrix}}={\begin{bmatrix}\left\langle p_{1},p_{1}\right\rangle &\left\langle p_{2},p_{1}\right\rangle &\cdots &\left\langle p_{n},p_{1}\right\rangle \\\left\langle p_{1},p_{2}\right\rangle &\left\langle p_{2},p_{2}\right\rangle &\cdots &\left\langle p_{n},p_{2}\right\rangle \\\vdots &\vdots &\ddots &\vdots \\\left\langle p_{1},p_{n}\right\rangle &\left\langle p_{2},p_{n}\right\rangle &\cdots &\left\langle p_{n},p_{n}\right\rangle \end{bmatrix}}{\begin{bmatrix}c_{1}\\c_{2}\\\vdots \\c_{n}\end{bmatrix}}.}$

Assuming the ${\displaystyle p_{i}}$ are linearly independent, the Gramian matrix can be inverted to obtain

${\displaystyle {\begin{bmatrix}c_{1}\\c_{2}\\\vdots \\c_{n}\end{bmatrix}}={\begin{bmatrix}\left\langle p_{1},p_{1}\right\rangle &\left\langle p_{2},p_{1}\right\rangle &\cdots &\left\langle p_{n},p_{1}\right\rangle \\\left\langle p_{1},p_{2}\right\rangle &\left\langle p_{2},p_{2}\right\rangle &\cdots &\left\langle p_{n},p_{2}\right\rangle \\\vdots &\vdots &\ddots &\vdots \\\left\langle p_{1},p_{n}\right\rangle &\left\langle p_{2},p_{n}\right\rangle &\cdots &\left\langle p_{n},p_{n}\right\rangle \end{bmatrix}}^{-1}{\begin{bmatrix}\left\langle x,p_{1}\right\rangle \\\left\langle x,p_{2}\right\rangle \\\vdots \\\left\langle x,p_{n}\right\rangle \end{bmatrix}},}$

thus providing an expression for the coefficients ${\displaystyle c_{i}}$ of the minimum mean square error estimator.