AI engineering glossary · Linear algebra

What is einstein summation?

Einstein summation (also called einsum): A compact notation that describes tensor products, contractions and transposes by naming each axis with a letter and summing over any letter that repeats. Array libraries offer it through an einsum function.

Level: advancedTopic: Linear algebra

Einstein summation: an example

np.einsum('ij,jk->ik', A, B) performs ordinary matrix multiplication of A and B.

Related terms

More Linear algebra terms

Where you learn it

Einstein summation is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.