What is a vector with squared terms with respect to a regular vector?

79 Views Asked by At

Suppose there is a vector $\mathbf y$

$$\mathbf y=\begin{bmatrix} y_1 \\ y_2 \\ y_3\end{bmatrix}$$ A vector squared is a dot product, just a scalar. So then, what is the function to get $$f(\mathbf y)=\begin{bmatrix} y_1^2 \\ y_2^2 \\ y_3^2 \end{bmatrix}?$$

1

There are 1 best solutions below

5
On BEST ANSWER

I believe there is no standard function that does this - we can build one that does this job in the way you describe: set

$$f(y) = (y_1 ^2, \ldots)$$

and this is a function.

We can, however, achieve this via a Hadamard product, a pointwise matrix product. Again, a bit nonstandard, but doable.