Contents

Tensors and Multi-linear Algebra

Okay. So what is a tensor? Good question. Before I answer that question, let me turn to the following question: so far we've thought about linear functions that take in one vector and spit out another. Can we think about linear functions that take in multiple vectors? Two vectors? Four vectors? What do these maps look like? Well, let's take a look:


Definition: A multi-linear form from vector spaces to shared scalar field is a function that is linear in all of its arguments, i.e.,


Now, supposing we have a basis for each space , can we write down a coordinate representation for in the same way that we did for matrices? This should be relatively simple, but note that unlike with linear functions, we need to know where sends each possible pair of basis vectors to write down a representation, this is because

Therefore, letting , for an arbitrary set of inputs we have

In many circles (cough physics cough), it is common to suppress summations across indices in products like these and instead write the result as just . This is called Einstein Notation. The understanding is that if an index is repeated across multiple arrays in this product, then there is an implicit summation. These summation operations are called tensor contractions. Nonetheless, we observe that the representation of under the choice of bases turned out to be a multi-dimensional array with an index corresponding to the output as well as an index corresponding to each input.

Note that the set of multi-linear forms is itself a vector space. Can we find a set of basis functions for this vector space? Well, this is where the notion of a tensor product comes in.


Definition: The tensor product of two multi-linear forms and is a multi-linear form such that


The reader can verify that the basis representations of and multiply to get the basis representation of ,

Now, the idea is to build a basis for the space of linear forms by first building a basis for the spaces of forms and then taking tensor products between these primitive elements. It turns out that linear forms have a special name, they are called dual spaces.

The Dual Space

Definition: The dual space, , of a finite dimensional vector space is the set of linear forms .


Dual spaces are quite easy to characterize. Let us build a basis for a dual space . Suppose that is a basis for , then we can define a dual basis such that

where if and otherwise. Let . To see that spans the dual space note that

Hence,

So spans .

But are the elements of linearly independent? Well, suppose that

Then this means that

Thus, linear independence! So is indeed a basis. The immediate corollary is that there is a one-to-one correspondence (isomorphism) between and . Given a basis , we can lift any vector into a dual vector via,

Note that this particular isomorphism is dependent on the choice of basis , another basis will give a different .

If we return to our basis representation of a multi-linear form from earlier, it is not difficult to verify that

(simply plug in to both the former and latter expression). Therefore the set of basis vector spans the set of multi-linear forms .

Tensor Product of Dual Spaces

With all of the above established, we are now ready to define the tensor product of two dual spaces and . Let denote the vector space of multi-linear forms . Of course, we know that for a single vector space, this is just the dual . Now, we give the appropriate definition of the tensor product space .


Definition: The tensor product space of and is defined as .


In particular, this means that we can write any multi-linear form vector space as the tensor product

Note that this is all just definitions. There is nothing of actual substance here. The key point is that we can think of multi-linear form spaces as being the product of a bunch of smaller primitive spaces .

The nice thing is that this definition allows us to start thinking about the structure of tensor algebra. If and , then the tensor product is a member of . However, not every member of can be written as for two elements and . This point can often be confusing for newcomers. For example, suppose is a basis for and consider the following member of ,

There is in fact no way to write this vector as the tensor product of two items (you can try if you'd like). Note however, that the tensor product is still a linear operation, so a vector like

can actually be written as

The Dual of the Dual

Okay. So far we've talked about the dual of a vector space , but what happens if you take the dual of the dual? Well, you can think of the space as linear forms of linear forms (functionals), but there is a simpler way. It is possible to relate and . And this relationship goes beyond just simple isomorphism. While and are isomorphic, that isomorphism depends crucially on the basis that we used to define the isomorphism. There are many different ways to relate the primal and dual spaces. However, every primal element of can unambiguously be thought of as a functional . Just define the action of on a function as

See what I mean? The whole concept of which space is the primal and which is the dual is completely arbitrary. The important thing is that the dual of the dual is once again the primal. This is why people prefer to write as an equivalence rather than just an isomorphism.

Note, however, this is only true for vector spaces and not true for functions in general. The linear structure is very important here! In general set theory, the set of functionals is actually strictly larger than itself. However, every element of is still a functional in . Finite dimensional linear algebra is special: the fact that the linear structure guarantees the isomorphism of the dual space to the primal space means that the dual of the dual cannot be larger than the primal space.

The Tensor Product of Vectors

Once you have digested the idea above, we can finally move on and define the tensor product of vectors and not just dual vectors. Consider two vectors spaces and , we define the tensor product space,


Definition: The tensor product of two vectors spaces , over is defined as


Whaaaaaaa? Doesn't this seem like chicken and egg? Well, just bear with me for a moment. It's super abstract, I know. First, how do we define the tensor product of two vectors and ?


Definition: The tensor product of two vectors , is defined as


Again, for sanity, thinking of as a function on functions is missing the point. The better way of thinking of the above is that is a primal tensor and is a dual tensor. They combine and give a number in . If it seems like pulling a rabbit out of a hat, that because it very much has that flavor. If you recall, what we did was

  1. Define the dual space .
  2. Define how to tensor product dual spaces .
  3. Take the dual of tensor product of the duals to get the tensor product of the primal .

The key notion to tensors is the algebraic structure of multi-linear forms. And as you can we, we have magically transferred this algebraic structure from the dual, where it is trivially defined, to the primal. Personally, I think this is approach is quite beautiful.

Mixed Tensors

Now that we taken tensor products of primal vectors and tensor products of dual vectors, one last question remains: can we take the tensor product of primal and a dual vector? How do we make sense of or ? This is the final piece of the puzzle. To do this, we have to now have to define a full multi-linear function (not just a linear form),


Definition: A multi-linear function is a linear function from to that is linear in each of its entries, i.e.,

The components of corresponding to are called contravariant and the components of corresponding to are called covariant. The space of all such functions is denoted by . is said to be an -tensor.


This is it. This is a mixed tensor. Note that this encompasses both primal tensors in because they can be thought of as maps (i.e., through scalar multiplication), as well as dual tensors because they are already map . How are tensor products defined?


Definition: Let and be a multi-linear functions. The tensor product of these functions has signature

and is defined as

Note, therefore that is a member of


So what is the tensor product of a primal vector space and a dual vector space ? Well, it is just the set of linear functions !