# 3.3: Least Squares Solution

- Page ID
- 24243

Let \(x\) be a particular solution of (1a). Denote by \(x_{A}\) its unique projection onto the range of \(A\) (i.e. onto the space spanned by the vectors \(a_{i}\)) and let \(x_{A^{\perp}}\) denote the projection onto the space orthogonal to this. Following the same development as in the proof of the orthogonality principle in Lecture 2, we find

\[x_{A}=A \prec A, A \succ^{-1} \prec A, x \succ \ \tag{3a}\]

with \(x_{A^{\perp}}= x- x_{A}\). Now (1a) allows us to make the substitution \(y= \prec A, x \succ\) in (3a), so

\[x_{A}=A \prec A, A \succ^{-1} y\ \tag{3b}\]

which is exactly the expression we had for the solution \(\check{x}\) that we determined earlier by inspection, see (2b).

Now note from (3b) that \(x_{A}\) is the same for all solutions \(x\), because it is determined entirely by \(A\) and \(y\). Hence it is only \(x_{A^{\perp}}\) that is varied by varying \(x\). The orthogonality of \(x_{A}\) and \(x_{A^{\perp}}\) allows us to write

\[<x, x>=<x_{A}, x_{A}>+<x_{A^{\perp}}, x_{A^{\perp}}>\nonumber\]

so the best we can do as far as minimizing \(<x,x>\) is concerned is to make \(x_{A^{\perp}}=0\). In other words, the optimum solution is \(x = x_{A} = \check{x}\).

Example 3.3

For the FIR filter mentioned in Example 3.1, and considering all input sequences \(x[k]\) that result in \(y[0] = 7\), find the sequence for which \(\sum_{i=-N}^{N} x^{2}[i]\) is minimized. (Work out this example for yourself!)

Example 3.4

Consider a unit mass moving in a straight line under the action of a force \(x(t)\), with position at time \(t\) given by \(p(t)\). Assume \(p(0)=0, \dot{p}(0)=0\), and suppose we wish to have \(p(T ) = y\) (with no constraint on \(\dot{p}(T )\)). Then

\[y=p(T)=\int_{0}^{T}(T-t) x(t) d t=<a(t), x(t)> \ \tag{4}\]

This is a typical underconstrained problem, with many choices of \(x(t)\) for \(0 \leq t \leq T\) that will result in \(p(T ) = y\). Let us find the solution \(x(t)\) for which

\[\int_{0}^{T} x^{2}(t) d t=<x(t), x(t)> \ \tag{5}\]

is minimized. Evaluating the expression in (2a), we find

\[\check{x}(t)=(T-t) y /\left(T^{3} / 3\right) \ \tag{6}\]

How does your solution change if there is the additional constraint that the mass should be brought to rest at time \(T\), so that \(\dot{p}(T ) = 0\)?

We leave you to consider how weighted norms can be minimized.