2
$\begingroup$

I want to express the product of a three-dimensional array by two one-dimensional vectors over some ring $R$:

$$r = A \cdot b \otimes c$$

where

  • $A \in R^{\ell \times m \times n}$
  • $b \in R^n$
  • $c \in R^m$

and the output $r\in R^\ell$ is defined in the "obvious" way by $r_i = \sum_{j=1}^n\sum_{k=1}^m a_{i,j,k} b_j c_k$.

In what I wrote above, I used the $\cdot$ to indicate the inner product part and $\otimes$ to indicate the outer product part, but I don't know if that notation is standard (at least the first one).

In particular, I need to use the fact that this operation is associative, i.e., $(A\cdot b)\otimes c = A\cdot(b \otimes c)$.

For context, this is for a computer science publication. I could easily define my own notation and write the one-line proof of associativity, but it feels kind of embarrassing to do that if there is already a nice way to express this.

$\endgroup$
4
  • 5
    $\begingroup$ en.wikipedia.org/wiki/Einstein_notation $\endgroup$ Commented Feb 4 at 15:22
  • 2
    $\begingroup$ The bird track notation is popular; see Cvitanović, Group Theory, Princeton University Press. $\endgroup$ Commented Feb 4 at 15:23
  • $\begingroup$ @AndréHenriques: "Einstein notation" properly refers to the summation convention. Do you mean abstract index notation? $\endgroup$ Commented Feb 4 at 23:31
  • 2
    $\begingroup$ @MichaelSeifert There's not a reason to use abstract index notation here given that we are working with literal arrays of numbers which have "honest" indices. $\endgroup$ Commented Feb 5 at 16:24

1 Answer 1

4
$\begingroup$

The usual convention with contractions is that they are nested , you first identify adjacent indices and sum over them, and then move outwards. A single contraction is a single dot, a double contraction is two dots, a colon. So if you define $$r_i = \sum_{j=1}^n\sum_{k=1}^m A_{i,j,k} b_j c_k,$$ the index-free notation could be $\mathbf{r}=\mathbf{A}\operatorname{:}\mathbf{c b} $.

Let me mention, in this connection, a useful notation for a complete contraction: $$R_{ij} = \sum_{k,l,m,n} A_{ijklmn} b_nc_md_le_k\Leftrightarrow \mathbf{R}=\mathbf{A}\odot \mathbf{bcde}.$$

$\endgroup$
2
  • $\begingroup$ OK this makes sense. But then what is the associativity law to say that $A : (c b) = (A \cdot c) \cdot b$? $\endgroup$ Commented Feb 4 at 17:46
  • 1
    $\begingroup$ tensor contractions are assumed to be associative, the colon notation implies this --- you could not use that notation if the operation lacked associativity; because the contractions are nested, indeed $A\operatorname{:}c b =(A\cdot c )\cdot b$. $\endgroup$ Commented Feb 4 at 17:56

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.