I tried to reply to this answer, but don't have enough reputation points yet. Basically the poster constructed Del (i.e. $\nabla = \left( \frac{\partial}{\partial x}, \frac{\partial}{\partial y}, \frac{\partial}{\partial z}\right)$) as a differential operator which works in some cases. However, it doesn't seem to work for what I need (Mathematica doesn't understand how to evaluate the expression I input):

I would like to define Del as an operator, with the purpose of evaluating an expression like this:

$(A \cdot \nabla)\times \vec{v}$,

where $A$ is say a 3x3 matrix, and $\vec{v}(x,y,z) = (u(x,y,z),v(x,y,z),w(x,y,z))$ is an arbitrary vector in $\mathbb{R}^3$. That is, I need to take the product of the matrix A from the left with the vector operator $\nabla$, and then take the cross product of the resulting differential operator with an arbitrary vector in (either $\mathbb{R}^2$ or) $\mathbb{R}^3$.

(This would be a separate question, but a solution using tensors to construct $\varepsilon_{ijk} A_{jl}\partial_lv_k$ would also work, if that's easier).

  • 1
    $\begingroup$ Sum[LeviCivitaTensor[3][[i, j, k]] A[[j, l]] D[v[[k]], x[[l]]], {j, 1, 3}, {k, 1, 3}, {l, 1, 3}] $\endgroup$ Commented Jun 5, 2018 at 23:05
  • $\begingroup$ I've added support for the rule you mentioned. BTW, using tensors to code these calculations is easier of course, as shown by @AccidentalFourierTransform . $\endgroup$
    – xzczd
    Commented Jun 6, 2018 at 12:13
  • $\begingroup$ Thank you xzczd and AccidentalFourierTransform! I will use one of these methods, and consider the case closed. $\endgroup$
    – Fishy
    Commented Jun 6, 2018 at 15:51


Browse other questions tagged or ask your own question.