# Summation notation for vector matrix product.

If I perform vector multiplication as below and then want to notate summation along the last axis of the resulting matrix, how do I show that in summation notation?

Example: $$\pmatrix{ 2 \\ 3 } \pmatrix{1 & 1 & 1 \\ 2 & 2 & 2} = \pmatrix{2 & 2 & 2 \\ 6 & 6 & 6} = \mathbf{R}$$

Then since $$\mathbf{R} \in \mathbb{R}^{2 \times 3}$$, I want to sum along the column dimension only to get a vector $$\vec{r} = \pmatrix{6 \\ 18}$$

Would I notate this like so? $$\vec{r} = \sum_{j=1}^{2}\mathbf{R}_{ij} = \pmatrix{6 \\ 18}$$

• matrix multiplication: $AB$. We need $A$ to be $m$ by $n$, and $B$ to be $n$ by $p$. Aug 17, 2021 at 23:52
• Maybe you typed something wrongly? I do not think we have $\mathbf{R} \in \mathbb{R}^{2 \times 2}$ Aug 17, 2021 at 23:53

It should be

$$\pmatrix{ 2 & 0\\0 & 3 } \pmatrix{1 & 1 & 1 \\ 2 & 2 & 2} = \pmatrix{2 & 2 & 2 \\ 6 & 6 & 6} = \mathbf{R}\in \mathbb{R}^{2 \times 3}$$

for the matrix product and for the vector

$$\vec{r} = \sum_{i=1}^{2}\sum_{j=1}^{3}\mathbf{R}_{ij} = \pmatrix{6 \\ 18}$$

which corresponds to

$$\pmatrix{2 & 2 & 2 \\ 6 & 6 & 6}\pmatrix{1 \\ 1 \\ 1 }$$

• This makes a lot of sense! Aug 18, 2021 at 5:15

Welcome to MSE.

Firstly, the product $$\begin{pmatrix}2\\3\end{pmatrix}\begin{pmatrix}1&1&1\\2&2&2\end{pmatrix}$$ does not exist, given an unequal number of columns in the former of the above terms, and rows in the latter of the above terms, although I acknowledge that that's not exactly what this question is about (see, however, user's answer for the product we believe you intended to submit as part of your question). Secondly, I'm sure it's a typo, but if indeed $$\mathbf{R}=\begin{pmatrix}2&2&2\\6&6&6\end{pmatrix}$$ then $$\mathbf{R}\in\mathbb{R}^{2\times 3}$$, as opposed to $$\mathbf{R}\in\mathbb{R}^{2\times2}$$. Lastly, while there isn't exactly a standard notational convention when it comes to the denotation of entire columns or rows of matrices, the notation you've suggested lacks accuracy, unfortunately. Since $$\mathbf{R}_{ij}$$ is a scalar quantity, given any $$i\in\lbrace1,2\rbrace$$ and $$j\in\lbrace1,2,3\rbrace$$, it cannot be true that $$\sum_{j=1}^3\mathbf{R}_{ij}=\begin{pmatrix}6\\18\end{pmatrix}$$ What you could write, though, is either that which user's answer suggests, or, for example: $$\vec{r}=r_1\hat{i}+r_2\hat{j}$$, where $$r_i = \sum_{j=1}^3\mathbf{R}_{ij}$$ for $$i\in\lbrace1,2\rbrace$$.