In my book about fluid dynamics there's the vector identity
$A \times (\nabla \times B) = (\nabla B) \cdot A - (A \cdot \nabla) B$
with $A$ and $B$ vectors. But I always thought that $(A \cdot \nabla) B = A \cdot \nabla B$, which would mean that the left hand side is $0$ so I must be mistaken.
Since $B$ is a vector, $\nabla B$ is a tensor or something like that, but I have never learned about tensors so I'm stuck here...
Thanks for any help in advance!
The $i^{\text{th}}$ component of $A \cdot \nabla B$ is $$\sum_{j=1}^3 A_j \dfrac{\partial B_j}{\partial x_i}$$ whereas the $i^{\text{th}}$ component of $(A \cdot \nabla)B$ is $$\sum_{j=1}^3 A_j \dfrac{\partial B_i}{\partial x_j}$$
In summation convention (but ignoring co-/contra-variance), this is to say that $$(A \cdot \nabla B)_i = A_j\partial_iB_j \quad \text{and} \quad ((A \cdot \nabla)B)_i = A_j\partial_jB_i$$
Here's a derivation of your identity: $$\begin{align*} (A \times (\nabla \times B))_i &= \varepsilon_{ijk} A_j (\nabla \times B)_k \\ &= \varepsilon_{ijk} A_j \varepsilon_{kmn} \partial_mB_n \\ &= \varepsilon_{kij} \varepsilon_{kmn} A_j \partial_m B_n \\ &= (\delta_{im}\delta_{jn} - \delta_{in}\delta_{jm})A_j \partial_m B_n \\ &= A_j\partial_iB_j - A_j\partial_jB_i \\ &= (A \cdot \nabla B - (A \cdot \nabla)B)_i \end{align*}$$