Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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}$)?

share|cite|improve this question
For (1), see the previous question Element-wise (or pointwise) operations notation? – Rahul Jun 16 '12 at 9:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.