# 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

## 1 Answer

Just write it out componentwise for two dimensional vectors.

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.

• So how do I express this summation in wuadaratic form? – aceminer Feb 9 at 4:27
• I don't know the word wuadaratic. When I put it into a famous search engine it changes it into quadratic. – Ross Millikan Feb 9 at 4:28
• Yes it was a typo i realized my mistake – aceminer Feb 9 at 4:36
• I don't understand what "express a summation in quadratic form" means.Your summation is a product of squares. – Ross Millikan Feb 9 at 4:38
• Your first expression is a fine way to express it. I haven't seen a need for this, so I doubt there is an easier way. Componentwise multiplication of vectors is rarely seen because it doesn't transform nicely when you change the basis. Why do you need this? – Ross Millikan Feb 9 at 5:06