For example: 2x^2-|x|^2 and 2y^2-|y|^2 in the attached img. Does 2x^2-|x|^2 equal x^2 or |x|^2 or both?

Is there a difference between |x|^2 and x^2?

It seems the first term refers to the square of the magnitude and the second of whatever happens to be the domain.