I would like to have a mathematical expression for this problem:
A = [n x 1] (i.e. 1;2;3) B = [n x 1] (i.e. 4;5;6)
I'm looking for the dot multiplication of both vectors pointwise-squared.
c = A^2*B^2
The answer should be a scalar with a value of 440 The matlab expression looks like:
c = ([1;2;3].^2)'*([4;5;6].^2) = 440
Let $\circ$ denote the hadamard product.
$$\sum_{i=1}^nA_i^2B_i^2=\sum_{i=1}^n(A_iB_i)^2=\sum_{i=1}^n (A \circ B)_i^2=\left\|A \circ B\right\|_2^2$$