Confused about tensor notations of how vector and covectors act on each other I'm learning/playing around with tensors and somehow got this contradiction,
suppose $\{v_i\}$ and $\{w_i\}$ are basis for a vector space $V$ and $\{ v^i \}$ and $\{w^i\}$ are basis for the dual space $V^\ast $ with $v^i v_j = \delta ^i _j $, then
$$
\begin{aligned}
    \delta^i_j
&=  v^i v_j 
\\ 
&=  \left(\sum_{l=1}^n v^i (w_l) w^l \right)
    \left(\sum_{k=1}^n w^k (v_j) w_k \right)
&&\text{by change of basis}
\\
&=  \sum_{l=1}^n \sum_{k=1}^n v^i(w_l) \ w^k(v_j) \  w^l w_k
&&\text{since $v^i(w_l)$ and $w^k(v_j)$ are scalars}
\\
&=  \sum_{l=1}^n \sum_{k=1}^nv^i(w_l) \ w^k(v_j) \  \delta^l_k
&&\text{by $w^l w_k = \delta^l_k $ being a dual basis}
\\
&=  \sum_{l=1}^n v^i(w_l) \ w^l(v_j)
&&\text{applied $\delta^l_k$}
\\
&= v^i \left( \sum_{l=1}^nw_l w^l \right) v_j 
&&\text{by associativity }
\\
&= v^i n v_j
&&\text{since $\textstyle w_l w^l = \delta^l_l = \sum_{l=1}^n 1=n$}
\\
&= n \delta ^i_j
\end{aligned}
$$
so it implies $\delta^i_j = 0 $ which is definitely not correct, so my question is, where is the mistake?
Edit: fixed dummy variable and used explicit sums.
Note, change of basis: suppose $v^i = d_l w^l$ for some $d_j \in \mathbb R$, then
$$
\begin{aligned}
  v^i(w_j) 
&=  (d_l w^l ) (w_j)
\\
&= d_l \delta^l_j 
\\
&= d_j
\\
\Rightarrow \ 
 v^i 
&= (v^i(w_l) ) w^l.
\end{aligned}
$$
 A: In the sixth line $w_lw^l=\delta_l^l$ seems not to be ture, because it is not a scalar but a covector left multiplied by a vector.
The scalar is $w^l(w_l)$ and it equals to $\delta^l_l$.
Noting that $v^i(w_l)w^l=v^i$, by change of basis. This implies $w_lw^l=1$. Then the derivation returns to the origin,
$$
v^i(w_l)w^l(v_j)=v^i(v_j)=\delta^i_j.
$$
But this conflicts with what I'm used to. Things need to be checked. To my knowledeg, $w_iw^j$ and $w^jw_i$ are often regarded as the same quantity.
A: First, you can shorten things considerably by not changing coordinates and then changing back on the second term.
$\delta^i_j=v^iv_j=(v^i(w_l)w^l)v_j=v^i(w_lw^l)v_j=v^inv_j=n\delta^i_j$
We can also drop the now-fixed $v_j$ on the terms in the middle.
$v^i=(v^i(w_l)w^l)=v^i(w_lw^l)=v^in$
And now we can see better what is going on.
Let's put it in vector language, as that might be a bit more intuitively familiar to a learner.
$\vec{v}=(\vec{v}\cdot\vec{x})\vec{x}+(\vec{v}\cdot\vec{y})\vec{y}=\vec{v}(\vec{x}\cdot\vec{x})+\vec{v}(\vec{y}\cdot\vec{y})=\vec{v}(\vec{x}\cdot\vec{x}+\vec{y}\cdot\vec{y})=2\vec{v}$
The dot product is not associative with the scalar product.
And the change of basis doesn't look quite right to me. If we're trying to do $\vec{v}=(\vec{v}\cdot\vec{x})\vec{x}+(\vec{v}\cdot\vec{y})\vec{y}$ then the $v$ has to be contracted with the $w$, not the $w$ with itself. It should look something like $v^i=v^j(w_j)w^i$ ($=v^j\delta^i_j$).
A: Choose another set of bases $e_\alpha$.
$\boldsymbol v_i,\boldsymbol w_j$ are all vectors and have components along them. That is,
$$
\boldsymbol v^{i}=v^{i}_\alpha\boldsymbol e^\alpha,\quad
\boldsymbol w^{i}=w^{i}_\alpha\boldsymbol e^\alpha,\\
\boldsymbol v_{i}=v_{i}^\alpha\boldsymbol e_\alpha,\quad
\boldsymbol w_{i}=w_{i}^\alpha\boldsymbol e_\alpha,
$$
where vectors are in bold, distinguished by the superscribpt $i$, and their components are in normal italic, marked by Greek characters $\alpha$.
The normalization relationship is
$$
\delta^\alpha_\beta=\boldsymbol e^\alpha(\boldsymbol e_\beta).
$$
$\boldsymbol v$'s form a bases iff
$$
\delta^i_j=
\boldsymbol v^i(\boldsymbol v_j)
=v^i_\alpha\boldsymbol e^\alpha (v^\beta_j\boldsymbol e_\beta)
=v^i_\alpha v^\beta_j\delta^\alpha_\beta=v^i_\alpha v^\alpha_j,
$$
and similar to $\boldsymbol w$'s.
Suppose basis change is in the form
$$
\boldsymbol v^i=C^i_j\boldsymbol w^j
\Leftrightarrow
v^i_\alpha\boldsymbol e^\alpha
=C^i_jw^j_\alpha\boldsymbol e^\alpha\Leftrightarrow
v^i_\alpha = C^i_jw^j_\alpha.
$$
Multyiply both sides of the above equation by $w^\alpha_k$ and apply the normalization of $\boldsymbol w$'s, we get
$$
C^i_k = v^i_\alpha w^\alpha_k.
$$
Therefore
$$
\boldsymbol v^i=v^i_\alpha w^\alpha_j \boldsymbol w^j=\boldsymbol v^i(\boldsymbol  w_j)\boldsymbol w^j.
$$
There's no much difference from OP's formula, but we should write the components,
$$
v^i _\beta = v^i_\alpha w^\alpha_j w^j_\beta.
$$
They are all numbers and obey associative and commutative laws.
Therefore in OP's fifth line, we're faced with
$$
\boldsymbol v^i(\boldsymbol w_l)\boldsymbol w^l(\boldsymbol v_j)
=v^i_\alpha w_l^\alpha w^l_\beta v_j^\beta
=v^i_\alpha v_j^\beta w^l_\beta w_l^\alpha.
$$
Pay attention to the super- and subscripts,
$$
w^l_\alpha w_l^\beta\not=w^l_\alpha w^\alpha_l=\delta^l_l=n.
$$
So what is $w^l_\alpha w_l^\beta$? As you may guess, it is $\delta^\alpha_\beta$. Let's check.
Since $\boldsymbol w$'s and $\boldsymbol e$'s are two sets of bases, any vector $\boldsymbol A$ can be represented by
$$
\boldsymbol A=A^\alpha \boldsymbol e_\alpha=A^i\boldsymbol w_i,
$$
where $A^\alpha$ and $A^i$ are different numbers.
Apply $\boldsymbol w^j$ to both sides, we get
$$
A^j=\boldsymbol w^j(\boldsymbol e_\alpha) A^\alpha=w^j_\alpha A^\alpha.
$$
The above equation implies, $w^j_\alpha$ is the transfromation matrix for this basis change.
Meanwhile basis change conserves inner product of vectors, so
$$
\boldsymbol A\cdot\boldsymbol B= A^\alpha B_\alpha
=A^l B_l=w^l_\alpha w_l^\beta A^\alpha B_\beta.
$$
Because $\boldsymbol A,\boldsymbol B$ are arbirary, we get
$$
w^l_\alpha w^\beta_l=\delta^\alpha_\beta.
$$
Therefore
$$
\boldsymbol v^i(\boldsymbol w_l)\boldsymbol w^l(\boldsymbol v_j)
=v^i_\alpha v_j^\beta w^l_\beta w_l^\alpha
=v^i_\alpha v_j^\beta \delta^\alpha_\beta=v^i_\alpha v_j^\alpha = \delta ^i_j.
$$
Everything goes fine.
The point is, I think, a vector $\boldsymbol v$ is a one-order tensor, $v_\alpha$. But when we talk about a set of vectors, $\{\boldsymbol v_i\}$, they form a two-order tensor, $v^j_\alpha$.
The product of two vectors is in general a four-order tensor, $v^i_\alpha v_j^\beta=\delta^i_j\delta_\alpha^\beta$ in this case. Contract $i$ with $j$ or $\alpha$ with $\beta$ we get a two-order tensor, and contract all variables we get a scalar.
