Tools / Tensors

Tensor Index Lab

Enter a small Einstein-style signature and compute the resulting contraction directly in the browser. This tool is intended for students and engineers who need a quick way to check tensor notation, output rank, and small numerical examples without opening a larger stack.

Contraction Input

Signature Summary

Index Legend

Computed Tensor

How To Use It

Repeated indices are summed over. Unrepeated indices survive into the output in the order shown after the arrow. If the output is empty, the result is a scalar.

  • Try i,i-> for a dot product.
  • Try ij,jk->ik for matrix multiplication.
  • Try ab,bc,cd->ad for a longer contraction chain.

How To Use This Lab

Enter an Einstein-style signature such as ij,jk->ik, then provide the input tensors as JSON. The number of input arrays must match the number of comma-separated input signatures.

  • Use vectors for one-index signatures like i.
  • Use nested arrays for matrices and higher-rank tensors.
  • Keep the arrays rectangular so each index really has a fixed dimension.

Fundamental Mathematics

Einstein notation compresses tensor operations by using repeated indices to mean summation. A contraction removes repeated indices and leaves only the free indices in the output. Matrix multiplication is a classic example: ij,jk->ik sums over the shared index j.

This notation matters because it exposes the structure of a tensor computation directly. Instead of thinking only about loops, you can reason about the mathematical pattern the loops are implementing.