Row-wise dot product between matrices

1.3k Views Asked by At

Consider two matrices $A\in\mathbb{R}^{n\times m}$ and $B\in\mathbb{R}^{n\times m}$ with rows $a_i\in\mathbb{R}^m$ and $b_i\in\mathbb{R}^m$ respectively. I would like to compute the dot product of each row and store them in a vector $$ c = \begin{pmatrix} a_1^\top b_1 \\ \vdots \\ a_n^\top b_n \end{pmatrix} $$

Does this operation have a name?