I have a rank 2 tensor obtained by acting with the grad operator twice successively on a function [Psi], so let's call this tensor [Psi]2. I then simply want to contract it over its two indices with a vector f such that I obtain a new vector, but cannot get it to work for some reason, so not sure if I am doing the wrong syntax.
What I am trying is
Sum[f[[i]]*\[Psi]2[[i, j]], {i, 1, 3}, {j, 1, 3}]
to do the contraction, but for some reason I get a scalar instead of a vecto