Converting Summation into matrix form

Would require some help on this

$$\sum{r_i^2 * e_i^2}$$

would it be equivalent to

$$(re)^T(re)$$. It does seem to be equivalent but i cannot seem to prove it.

Assuming r and e are both vectors.

Thanks!

• If $r$ and $e$ are both vectors, what does $re$ mean? – NickD Feb 9 at 3:52
• @NickD r dot product e – aceminer Feb 9 at 3:56
• Then what is $(re)^T$? – NickD Feb 9 at 4:52
• Hmmm. The transpose of the dot product of r and e – aceminer Feb 9 at 4:56
• Let $R={\rm Diag}(r),$ i.e. a diagonal matrix with the vector $r$ as the diagonal elements. Then your function can be written as $$f = (Re)^T(Re) = e^TR^TRe$$ – greg Feb 9 at 6:33

If $$re$$ is the dot product as you say in the comments it is not. $$\sum r_i^2*e_i^2=r_1^2e_1^2+r_2^2e_2^2$$ while $$re$$ is a scalar $$(re)=r_1e_1+r_2e_2$$ and $$(re)^T(re)$$ is the square of this which includes a term $$2r_1e_1r_2e_2$$
If $$(re)$$ is a vector that is the componentwise product of $$r$$ and $$e$$ it is true. Write it out for yourself.