3

There are some common array operations that are used in programming, which I have a difficult time writing out in mathematical notation without using explicitly-indexed scalars. Some include:

  1. Element-wise products of two arrays.
  2. Sum of all elements of an array.
  3. Column-wise or row-wise sums.

E.g., if I have two matrices, $\mathbf{A}$ and $\mathbf{B}$, how can I write out $a_{ij}\cdot b_{ij}$, $\sum_i\sum_j a_{ij}$, or $\sum_i a_{ij} \ \forall j$ without having to reference the scalar elements (and instead as operations of $\mathbf{A}$ and $\mathbf{B}$)?

hatmatrix
  • 263

0 Answers0