# How do I force this simplification?

I am trying to calculate:$$\epsilon_{ijk}n^iM1^j\epsilon^{lmk}n_lM2_m$$

Defining the vectors as:

M1={M1x,M1y,M1z}
M2={M2x,M2y,M2z}
n={nx,ny,nz}


and using

FullSimplify@ TensorContract[  TensorProduct[LeviCivitaTensor[3, List], n, M1, LeviCivitaTensor[3, List], n, M2], {{1, 4}, {2, 5}, {3, 8}, {6, 9}, {7, 10}}]


I get the result:

M1z M2z (nx^2 + ny^2) - M1z (M2x nx + M2y ny) nz +  M1y (-ny (M2x nx + M2z nz) + M2y (nx^2 + nz^2)) +  M1x (-M2y nx ny - M2z nx nz + M2x (ny^2 + nz^2))


This is correct, but I would rather that the result would be displayed as:

$$(M1\cdot M2)-(M1\cdot n)(M2\cdot n)$$

($$n$$ has norm one).

How do I get this simplification?

• Thanks. It works as shown now. – Michael E2 Jul 21 at 18:17

In order to simplify the quadruple product, I would do like this

r=Sum[LeviCivitaTensor[[i,j,k]] n[i]M[j]
LeviCivitaTensor[[l,m,k]] n[l]M[m],
{i,3},{j,3},{l,3},{m,3},{k,3}];

Simplify[r, Assumptions->n^2+n^2+n^2==1
&& n M+n M+n M==Dot[n.M]
&& n M+n M+n M==Dot[n.M]
&& M M+M M+M M==Dot[M.M]]

Out= -n.M n.M + M.M


Of course, all the assumptions can be generated programmatically.