Linear operations feel similar because they are built from the same small moves. An array has indices. An operation tells us which indices to keep, which indices to match, and which matched indices to sum away.
The bottom layer is not mysterious:
Einstein summation notation makes this visible. Here we use the array convention: a repeated index is summed. An index that remains visible is a coordinate of the output.
Indices are handles
Think of each index as a handle attached to an array. A vector has one handle, a matrix has two, and a higher-order tensor has more.
An operation is a rule for these handles:
- keep an index: it appears in the output,
- pair indices: keep both as a joint coordinate,
- contract an index: match it across factors and sum over it.
The preconditions come from these handles. If an index is contracted, both sides must have the same range. If no index is contracted, the dimensions do not need to match.
The smallest moves
Start with a vector and a scalar .
Scalar multiplication has no hidden index:
Each coordinate is scaled independently. The index is kept.
Dot product contracts one index:
The index appears twice and disappears. The output has no index, so it is a scalar. This is why the dot product requires and to have the same length.
Over , the inner-product version conjugates one side, for example . The wiring is unchanged; only the entry rule changes.
Outer product keeps both indices:
Over , the bra-ket version is .
Nothing is summed. The output has two handles, so it is a matrix. The vector lengths may differ.
The contrast is small but decisive:
Matrix multiplication is a repeated dot product
Let and . Matrix multiplication is
The index is internal. It is the wire between the column handle of and the row handle of . The indices and remain visible, so the output has shape .
So the shape rule is not arbitrary:
The middle is consumed by the sum. The outside dimensions survive.
Tensor product keeps the worlds separate
The tensor product does not contract. It keeps the indices from both factors.
For vectors,
For matrices,
There is no repeated index, so there is no hidden sum. The result remembers both coordinate choices. If chooses a coordinate in the first space and chooses one in the second, then chooses a coordinate in the combined space.
This is why tensor products are natural for composite systems. They do not say “line these two things up and sum”. They say “carry both coordinate choices at once”.
Vector products are not one product
The phrase “vector product” hides several different index recipes.
| operation | index form | output | hidden sum? | main precondition |
|---|---|---|---|---|
| scalar multiplication | vector | no | ||
| dot product | scalar | yes, over | same length | |
| outer product | matrix | no | none between lengths | |
| matrix multiplication | matrix | yes, over | inner dimensions match | |
| tensor product | tensor/block matrix | no | none between dimensions | |
| cross product | vector | yes, over | dimension |
The cross product looks different because it uses the Levi-Civita symbol . That extra tensor encodes orientation and antisymmetry. The result is still an index recipe: sum over hidden indices, keep the free index .
Why the laws differ
The properties of an operation come from how the indices move.
Matrix multiplication is associative because two contractions can be performed in either grouping:
Both expressions sum over and and keep . The wiring is the same.
It is not generally commutative because swapping the factors changes the wiring:
contract different handles and may not even be well-typed.
Tensor product is bilinear because multiplication distributes over addition in each visible slot:
It is not a dot product because no index disappears.
The rule of thumb
When an operation feels unclear, rewrite it with indices.
- Write the entries with their indices.
- Mark repeated indices as summed.
- Mark unrepeated indices as the output shape.
- Check that every summed index has the same range wherever it appears.
The operation then becomes a small piece of wiring. Some wires are left visible. Some wires are tied together and summed away. Most of linear algebra is a disciplined way of doing this without drawing the wires every time.