# Notation for matrix and sum of matrix rows

I have a table that describes the influence of sources (columns) on sinks (rows) where rows=$(A,B,C)$ and columns=$(A,B,C,D,E)$. So my table looks like:

  | A | B | C |
A | 1 | 2 | 4 |
B | 2 | 1 | 1 |
C | 2 | 3 | 1 |
D | 1 | 4 | 2 |
E | 1 | 1 | 1 |


If I would like to describe that table in matrix terminology how would I do that? And how are the columns and rows called? What is the correct notation if I want to describe the sum of rows (like the first row $A$ which is $7$). I'd also like to find a way to describe (sum of row)-(autoinfluence where i=j, main diagonal) e.g. row $A$ - (cell $AA$).

As a very unprofessional start:

$$\text{Matrix: } X = (x_{ij})$$ $$\text{where } i = (A,B,C,D,E) \text{ and } j=(A,B,C)$$ $$\text{row sum: } R = \sum_{i=1}^{N}(x_{ij}) = (1,1,...,1)X$$ $$\text{my value: } V = (1,1,...,1)X - X \text{ (where } i=j) = (1,1,...,1)X \text{ (where } i\neq j)$$

I need to describe that table and these desired values in professional looking way in 'ij' or matrix terminology for a scientific paper.

Well, formally a matrix of type $(I, J)$ is just a function from $I × J$. $I$ is an index set for rows and $J$ for columns. Usually $I = \{1, …, m\}$, $J = \{1, …, n\}$ for some $m, n ∈ \mathbb{N}$, but nothing stops you to have $I = \{A, B, C, D, E\}$, $J = \{A, B, C\}$. Since a matrix, say $X$, is just a function, its element in the $i$-th row and $j$-th column is just $X(i, j)$. Traditionally $x_{ij}$ is used instead of $X(i, j)$ but the semantics is the same. Now we have $X = (x_{ij})$ where $(x_{ij})$ is really a shortcut for $(x_{ij}: i ∈ I, j ∈ J)$ which is function analogue of set-builder notation $\{x_{ij}: i ∈ I, j ∈ J\}$.

If you want the sum of $i$-th row then it is in general $\sum_{j ∈ J} x_{ij}$ which is variant of $\sum (x_{ij}: j ∈ J)$ and depends on $i$. In case that $J = \{1, …, n\}$, then $\sum_{j = 1}^n x_{ij}$ is used as a shortcut for $\sum_{j ∈ \{1, …, n\}} x_{ij}$. Note the differences to your notation: there are no parentheses since $x_{ij}$ in the sum is just a particular element rather then the matrix $(x_{ij})$. And other thing is that first index is traditionally row index and second is column index so in your example you are actually summing over elements of $j$-th row.

Also, if the index set you are summing over is clear from context then you can write just $\sum_j x_{ij}$. With this shortcut it is easy to write your value as $\sum_j x_{ij} - x_{ii} = \sum_{j ≠ i} x_{ij}$.

Also note that the limits are typed to the right from the sum sign rather then above and below just because its inside a paragraph. In display mode it looks like $$\sum_{j = 1}^n x_{ij},$$ but the meaning is the same.

• Hi, I believe that the output of this operation would be a vector. I am curious about the right naming for such a vector. Would $v_i$ be an appropriate vector for that sense? I would prefer $v$ only, but I am not sure if it would be convenient for the reader to understand that the index $i$ is being used to denote the row. Long story short, I am trying to decide between $v = \sum_{j = 1}^n x_{ij}$ and $v_i = \sum_{j = 1}^n x_{ij}$ Aug 7 '19 at 1:26
• @3yanlis1bos If each $x_{ij}$ is a number, then $∑_{j=1}^n x_{ij}$ is a number as well – the sum over the $i$-th row. But you may do this for each row and gather the resulting numbers in a vector: $v = (v_i)_{i=1}^n$ where $v_i = ∑_{j=1}^n x_{ij}$. Aug 7 '19 at 6:48
• That looks a lot neater. Now I know how I have to let the reader know that it is a vector Aug 7 '19 at 6:57
• I got one more problem, latex does not adjust the n and i=1 in the right vertical alignment. It takes the n as a power, i as a subscript Aug 7 '19 at 7:55
• @3yanlis1bos That's how it should look in running text (textstyle). On the other hand if you have a standalone equation, LaTeX uses displaystyle, where the sum symbol i bigger and the bounds are above and below. Aug 7 '19 at 8:57