[Math] Vector-matrix element-wise product notation

notation

Suppose I have a matrix $A$ with entries $A_{ij}$ and a vector $u$ with entries $u_i$, and that I want to express matrix $C$ with entries $C_{ij} = A_{ij}u_i$ as a product of matrices or vectors and matrices.

Example:

$A=\begin{bmatrix}a_{11}&a_{12}\\a_{21}&a_{22}\end{bmatrix}$
$u=\begin{bmatrix}u_{1}\\u_{2}\end{bmatrix}$

$C=\begin{bmatrix}u_{1}a_{11}&u_{1}a_{12}\\u_{2}a_{21}&u_{2}a_{22}\end{bmatrix}$

Is there a standard notation similar to that of the Hadamard product ⊙ to write this?

If not, is there a standard notation to express that a diagonal matrix M is generated using the entries of vector $u$ as the values for the diagonal, like the MATLAB and Numpy diag(u) function

$M=\begin{bmatrix}u_{1}& 0\\0&u_{2}\end{bmatrix}$

so that I can do $C = MA$?

Best Answer

Actually I suggest to be more clear in what you mean by "multiplying a matrix $A$ by a vector $u$". The product will be a vector! Not a matrix!

Remember that, given a field $K$, an object $A\in K^{m\times n}$ can be multiplied canonically only by a column vector $u \in K^{n\times 1}$ and the product $Au \in K^{m\times 1}$.

In any case, if I correctly uderstood your question, you're looking for an operator that extends this notation. Then I suggest you to look to two notations:

  1. Einstein Notation for the repeated indices: When you are for example in $\mathbb{R}^{3}$, you will have that the indices can range over the set $i={1, 2, 3}$, $$y=\sum_{i=1}^{3}c_{i}x^{i}=c_{1}x^{1}+c_{2}x^{2}+c_{3}x^{3}$$ is simplified by the convention to: $$y=c_{i}x^{i}$$ The upper indices are not exponents but are indices of coordinates, coefficients or basis vectors.
  2. Tensor Product (generalization of Matric product in higher dimension) denoted by $\otimes$ , from ordered pairs in the Cartesian product $V\times W$ into $V\otimes W$, in a way that generalizes the outer product.