1

I have a vector $\displaystyle \vec{v}=\begin{bmatrix} 1 \\ 2 \\ 3 \\4 \end{bmatrix}$ and wish to decompose it as a sum of orthogonal projections using the DFT matrix,

$$ W=\frac{1}{2}\cdot \begin{bmatrix} 1 & 1 & 1 & 1 \\ 1 & -i & -1 & i \\ 1 & -1 & 1 &-1 \\ 1 & i & -1 & -i \end{bmatrix}, $$

whose columns, $\vec{w}_1,\vec{w}_2,\vec{w}_3,\vec{w}_4$ form an orthonormal basis. I thought it was the case that

$$ \vec{v}=(\vec{w}_1 \bullet \vec{x})\vec{w}_1+(\vec{w}_2 \bullet \vec{x})\vec{w}_2+(\vec{w}_3 \bullet \vec{x})\vec{w}_3+(\vec{w}_4 \bullet \vec{x})\vec{w}_4. $$

However, when I use this formula in Mathematica or Python, the result I obtain is $\displaystyle \vec{v}=\begin{bmatrix} 1 \\ 4 \\ 3 \\2 \end{bmatrix}$. The first entry of 1 is correct, but the remaining entries are in reverse the order I would expect.

In Mathematica, where columns of $W$ are assumed to be normalized:

W = FourierMatrix[4];
w0 = W[[All, 1]]; w1 = W[[All, 2]]; w2 = W[[All, 3]]; w3 = 
W[[All, 4]];
x = {1, 2, 3, 4};
Dot[x, w0]*w0 + Dot[x, w1]*w1 + Dot[x, w2]*w2 + Dot[x, w3]*w3

{1,4,3,2}

What fundamental idea am I overlooking?

fishbacp
  • 111

0 Answers0