Ta có : \(x^2+y^2+z^2-xy-yz-zx\)
\(=\frac{1}{2}.\left(2x^2+2y^2+2z^2-2xy-2yz-2zx\right)\)
\(=\frac{\left(x^2-2xy+y^2\right)+\left(y^2-2yz+z^2\right)+\left(z^2-2xz+x^2\right)}{2}\)
\(=\frac{\left(x-y\right)+\left(y-z\right)^2+\left(z-x\right)^2}{2}\) ( đpcm )