Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

How can I take the dot product for this problem: $||w +z-\hat w||^2$?

Solution: $||w - \hat w||^2 + 2\langle w - \hat w , z \rangle + ||z||^2$

share|improve this question
add comment

2 Answers 2

up vote 2 down vote accepted

First recall that $\Vert x \Vert^2 = \langle x,x \rangle$. Denoting $w - \hat{w}$ as $x$, we get that, $$\Vert w + z - \hat{w} \Vert^2 = \Vert x+z \Vert^2 = \langle x+z, x+z \rangle$$ Now recall that for the inner product, we have $$\langle a+b, c+d \rangle = \langle a+b,c \rangle + \langle a+b, d \rangle = \langle a,c \rangle +\langle b,c \rangle + \langle a, d \rangle + \langle b, d \rangle$$ Hence, we get that $$\langle x+z, x+z \rangle = \langle x,x \rangle + \langle x,z \rangle + \langle z,x \rangle + \langle z,z \rangle$$ Assuming your vectors are in $\mathbb{R}^n$, we have that $$\langle a,b \rangle = \langle b,a \rangle$$ Hence, we get that $$\langle x+z, x+z \rangle = \langle x,x \rangle + 2 \langle x,z \rangle + \langle z,z \rangle$$ Hence, $$\Vert w + z - \hat{w} \Vert^2 = \langle w-\hat{w},w-\hat{w} \rangle + 2 \langle w-\hat{w},z \rangle + \langle z,z \rangle = \Vert w-\hat{w} \Vert^2 + 2 \langle w-\hat{w},z \rangle + \Vert z \Vert^2$$

share|improve this answer
    
Beautiful, thank you very much, Marvis! –  diimension Nov 28 '12 at 9:03
add comment

$||x+y||_2^2=(x+y)^T(x+y)=||x||_2^2+2x^Ty+||y||_2^2$. Now put $x=w-\hat{w}$ and $y=z$.

share|improve this answer
    
Thanks, dineshdileep! –  diimension Nov 28 '12 at 9:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.