How should I notate the element-wise definition of a vector/matrix

notation

I'm unsure how to notate a matrix that I define per-element. Actually I'm not even sure how to phrase it so I'll give an example:

Let there be two vectors $x$ and $y$ of length $n$ and some function $f$.

Now we create a matrix $A$ that is equal to

$A = \left[x[0] * f(y[0]), x[1] * f(y[1]), \ldots x[n] * f(y[n])\right]$

So the new matrix is created by iterating through these two vectors and adding new elements to the new matrix equal to $x[i] * f(y[i])$.

Is there a single notation I can use for this? The suggestion I've received (and am currently using) is to have a separate definition of the matrix,

$A_n = f(n)$

But this means I have to always have an extra line before the equation in which I use $A$. Is there a way to just define it in-line so that I could write something like $Z = A \times X$ only instead of $A$, I have the actual definition?

It's sort of like a \sum or \prod in terms of how each term is defined, except instead of summing or multiplying things, I just add them as new elements in the matrix.

Best Answer

We first have operations $f\colon\>x\mapsto f(x)$ and $\ \cdot: (x,y)\mapsto x\cdot y$ (and maybe others) operating on numbers. In your case these operations are extended to operate "coordinatewise" on vectors $x=(x_1,x_2,\ldots, x_n)$ of length $n$. This way of thinking is not standard in linear algebra; therefore there is no simple notation for it. When introducing these extended operations in a text one can use a special sign, like $$\hat f(x):=\bigl(f(x_1),f(x_2),\ldots, f(x_n)\bigr),\qquad x\>\hat{\cdot}\>y:=\bigl(x_1y_1, x_2y_2,\ldots, x_ny_n\bigr)\ .$$ Thereafter one may declare to leave out the $\hat{}$ sign in the sequel. In this way you first have $$a\ := \ x\>\hat{\cdot}\>\hat f(y)$$ and later just write $$a=x\cdot f(y)\ .$$ Note that the computer system Mathematica "threads functions over lists" (functions like $\sin$, $\log$, etc.) without any notational ado.

Related Question