Basic Mathematics For Quantum Mechanics — Linear Maps
What is a linear map?
Let f be a map between two vector spaces
If
where v, w are vectors and a and b are scalars then f is a linear map
Linear maps are completely determined by its action on the basis
Let f be a linear map
Let V have the following basis
Then we can write any vector, v as:
Now, let’s try applying f to v
So if we know what f does to each basis vector, then we know what it does to any vector.
Let’s write f in the following way:
Here’s an example
So
Linear maps that return vectors
In our example above, the linear maps only gave us back a number. But they can also give us back vectors.
So consider
So we get
So we can write f using a similar syntax to the above and we get
But we will drop the inner sets of brackets to make it more readable so we get
This is exactly what we have called a matrix. This means that every matrix is actually just describing a linear map.
If we have a matrix A then we write Av to represent passing the vector v to matrix A. So
In the example above we used
So we could write
Using the syntax for column vectors from a previous post we get
Matrices as linear maps
We’ve just seen that linear maps correspond to matrices. Where the ith column tells us what happens to the ith basis vector under the map.
While this is true, there is one caveat. Vector spaces can have more than one basis. So when we write a linear map as a matrix we have chosen a specific basis to use. If we change the basis then the linear map will be represented by a different basis.
Matrix dimensions
Thinking about matrices as linear maps tells us about which sizes of matrices can be multiplied by which vectors.
If a matrix is a linear map from an n-dimension space, then that space has n basis vectors, so the matrix must have n columns, one for each basis vector.
So an m x n matrix must act on n-dimensional vectors because it is a map from an n-dimensional space
The number of rows, m, tells us the dimension of the output space.
Matrix multiplication as working on multiple vectors at once
While matrix multiplication can at first seem rather arbitrary, there are actually a couple of nice ways of thinking about it.
The first is to consider it as a shortcut for acting on many vectors at once.
So if I have a matrix A and two vectors v and w. If I want to work out Av and Aw I might do
But I can write this as one operation by defining the matrix B where the first column of B is v and the second column of B is w.
Then the matrix multiplication AB will give a matrix where the first column is the result of Av and the second column is the result of Aw
Let’s take a look at an example:
So we know that:
So
Since matrix multiplication can be thought of as acting on as many n-dimensional vectors. This tells us that an m x n matrix must act on an n x p matrix because each column in the second matrix represents an n-dimensional vector.
Matrix multiplication as the composition of linear maps
There is another way of thinking about matrix multiplication.
If I have a linear map f from X to Y and another linear map g from Y to Z then I can compose the two maps together.
This means I apply the map f and then the map g.
So I can define a new map
Given we know there is a matrix that represents f and a matrix that represents g is there a way we can use these two matrices to work out the matrix representing h is. Well, we can just multiply them together.
Seeing this is a little complicated but we’ll work through it step by step.
Let’s assume f goes from an m-dimensional space to an n-dimensional space. So its matrix will need m columns — one for each dimension of the input space and n rows — one for each dimension of the output space.
Now since g takes in the output from f it must go from an n-dimensional space but then it can go to any dimensional space so let’s just say it is a p-dimensional space. So g will have n columns and p rows.
If
Then we should have
To work out what H is let’s pick the ith basis vector for our m dimension space and call it
If we can work out what H should do to this basis vector then we’ll know what the ith column of H should be
When f acts on it we get back the ith column
Now let’s act on this with G
This is just a matrix acting on a vector so we can work out what this is:
So this tells us how to work out the ith column of H which is in fact the same as the rule I gave you in the previous post