Dear All: I have v = c(xy, xy^2, z) dotv = sum(v*v) I hope, I have the following result: dotv = x^2*y^2 + x^2*y^4 + z^2 (still in variable x, y and z, not numeric result) How to make simple script, so that I have: dotv = x^2*y^2 + x^2*y^4 + z^2 Thanks a lot for your help. Best regards, Rizal