Formulas involving the square of a norm

57 Views Asked by At

Why does $$\|x-y+\alpha z\|^2=\|x-y\|^2+2\alpha\langle x-y,z\rangle+\alpha^2 \|z\|^2$$

but

$$\|x-z+\theta z-\theta y\|^2=\|x-z\|^2+2\theta\langle x-z,z-y\rangle +\theta^2 \|z-y\|^2?$$

Why is there a $-$ before the inner product in the 1st case and a $+$ in the 2nd case?