Matrix Algebra - Deriving Fourier Coefficients using Least Squares

58 Views Asked by At

How is the following multiplication performed for this (cost) function:

$J=\frac{1}{2}\int_0^T{[y(t)-\hat{\pmb{x}}^T\pmb{h}(t)]^T[y(t)-\hat{\pmb{x}}^T\pmb{h}(t)]dt}$$=\frac{1}{2}\int_0^T{[y(t)]^2dt}-[\int_0^T{[y(t)\pmb{h}^T(t)dt}]\hat{\pmb{x}}+\frac{1}{2}\hat{\pmb{x}}^T[\int_0^T{[\pmb{h}(t)\pmb{h}^T(t)dt}]\hat{\pmb{x}}$

I can't see how we get the second term. Also, the third term implies that, only for this case, AB=BA, where A and B are matrices, right?

EDIT: $\pmb{h}(t)$ is a column vector of functions of $t$ and $\pmb{\hat{x}}$ is a column vector of numbers.

1

There are 1 best solutions below

0
On BEST ANSWER

Since $x^T h(t)$ is a scalar for all $t$, we have $(x^T h(t))^T x^T h(t) = x^T h(t)h(t)^T x $. The latter can be written as $x^T \left[ h(t)h(t)^T \right] x$ using associativity.