namedtensor / notation

108 stars 5 forks source link

Definition of outer product #54

Closed bayerj closed 3 years ago

bayerj commented 3 years ago

The outer product is defined using the contraction operator:

Screenshot 2021-01-21 at 20 52 03

From my understanding of the second paragraph in 2.1, each of the two factors u_ax1(i) and x_ax2(j) in the sum should be a scalar. That is because a vector is indexed. Now, multiplying two scalars yields a scalar, and summing many scalars also yields a scalar. The whole expression should hence be a scalar. The outer product should be a matrix though.

I can see how the broadcasting rules could somehow then span the matrix. This would be the case if the indexing did not return scalars, but vectors with a named axis of size 1. Is this what you envision to happen here?

PS: Great idea!

davidweichiang commented 3 years ago

Thanks, you're right that there must be a bug here -- will fix!