The name of matrix operation

138 Views Asked by At

If I have a matrix: $$ A = \begin{bmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ \end{bmatrix} $$

and a vector: $$ B = \begin{bmatrix} b_1 \\ b_2 \\ \end{bmatrix} $$

What is the name of the operation, which produces a vector:

$$ \begin{bmatrix} b_1 \cdot a_{11} + b_1 \cdot a_{12} + b_1 \cdot a_{13} \\ b_2 \cdot a_{21} + b_2 \cdot a_{22} + b_2 \cdot a_{23} \\ \end{bmatrix} $$

2

There are 2 best solutions below

1
On BEST ANSWER

Since your operation is invariant under row-permutations of matrix $A$ and only the sum matters then given $A$ we have $$ \tilde{A} = \begin{pmatrix} a_{11} + a_{12} + a_{13} \\ a_{21} + a_{22} + a_{23} \end{pmatrix} $$ and $b = \begin{pmatrix} b_1 \\ b_2 \end{pmatrix}$. Now your operation becomes the Hadamard product of $\tilde{A}$ and $b$.

1
On

This is a dot product, also called Matrix Multiplication when it involves a vector and a matrix, or two matrices.

In wikipedia article on Matrix Multiplication, in the section Definition, you have the following formula for the elements $c_{ij}$ of a matrix $\bf C=\bf A \bf B$ for $\bf A, \bf B$ and $\bf C$ all $m \times m$ matrices.

$$ c_{ij} = \sum_{k=1}^m a_{ik} b_{kj} $$

If you treat your $\bf B$ matrix as a vector $\bf b$, with $m$ entries, instead of an $m \times m$ matrix, the operation will produce a vector $\bf c$ with $c_i$ elements given by:

$$ c_i = \sum_{k=1}^m a_{ik} b_k $$

Which is exactly what you want.