Lecture 28 · Week 7· 13:14
Change of basis
Transition matrices, coordinates in two bases.
Saved in this browser only. No account needed.
TranscriptThe full text of the lecture. Click any sentence to play the video from there.
Today: one vector, two descriptions
Welcome back. In lecture twenty five we met coordinates. Let B be a basis, b one up to b n, of a vector space V. Every vector v in V is a combination of the basis in exactly one way, and its weights, stacked in a column, form the coordinate vector of v relative to B. But coordinates depend on the basis. Here is the plane with two bases. The basis B consists of b one, which is (one, one), and b two, which is (minus two, one). The basis C consists of c one, which is (one, zero), and c two, which is (minus one, one). Take the vector v, which is (minus one, two). Walking along B, we reach v with one step of b one and one step of b two. So relative to B, the coordinates of v are (one, one).
Walking along C, we need one step of c one and two steps of c two. So relative to C, the same vector has the coordinates (one, two). One vector, two different columns. Today we find the matrix that converts one column into the other: the transition matrix. We build it and prove that it works, compute it in examples, see how transition matrices combine and invert, and find them quickly by row reduction.
The transition matrix
Let V be a vector space over a field F, of dimension n, and let B and C be two bases of V. Suppose we know the coordinates of a vector v relative to B: x one up to x n. That means v is x one b one, plus and so on, up to x n b n. The next steps are the heart of today's lecture, so take them slowly, and pause if you need to. To pass to C, we only need each vector b j in the basis C. Write the coordinate vector of b j relative to C as column j of a matrix P. So b j is the sum, over i, of p i j times c i. Now substitute this into v. Then v is the sum over j of x j, times the sum over i of p i j c i. Collect the terms in each c i: the weight of c i is the sum over j of p i j times x j.
That weight is exactly entry i of the product P times x. And coordinates relative to C are unique. So the coordinates of v relative to C are P times the coordinates of v relative to B. Here is the theorem. Let V be a vector space over a field F, of dimension n, and let B and C be bases of V. Then there is exactly one n by n matrix P such that, for every v in V, the coordinates of v relative to C are P times the coordinates of v relative to B. Its column j is the coordinate vector of b j relative to C. We have just shown that this matrix works. Why is it the only one? Suppose a matrix Q works too, and take v to be b j. Since b j is one times b j plus zero times the other basis vectors, its coordinates relative to B are e j. So Q times e j, which is column j of Q, equals the coordinates of b j relative to C. But by the theorem, that is also column j of P. So column j of Q has to be column j of P: Q has no other choice. This holds for every j, so Q and P have the same columns, and Q is P.
This matrix is called the transition matrix from B to C, and it is written P, C from B. Read it from right to left: coordinates relative to B go in on the right, and coordinates relative to C come out on the left. To remember the columns: they are the old basis vectors, b one up to b n, written in the new basis C.
An example in the plane
Let's find the transition matrix for the two bases in the plane. Its first column is b one written in the basis C. So we look for scalars s and t with b one equal to s c one plus t c two. The combination s c one plus t c two is the vector (s minus t, t). In the second entry, t equals one. In the first entry, s minus t equals one, so s is two. So b one relative to C is (two, one). For b two, we solve the same two equations with b two on the right. In the second entry, t equals one. In the first entry, s minus t equals minus two, so s is minus one. So b two relative to C is (minus one, one).
On the picture: two steps of c one and one step of c two end exactly at b one. And one step back along c one, then one step of c two, end at b two. These are the two columns. So the transition matrix from B to C has first column (two, one), and second column (minus one, one). Now let's check it on v. Its coordinates relative to B are (one, one). We multiply them by the transition matrix.
In the first entry, two times one, plus minus one times one, is one. In the second entry, one times one, plus one times one, is two. That is (one, two): exactly the coordinates relative to C that we read off the picture.
Combining and inverting
Transition matrices fit together well. Let B, C and D be three bases of an n dimensional vector space V. First, the transition matrix from B to itself is the identity. Second, the transition matrix from C to D, times the transition matrix from B to C, is the transition matrix from B to D. Going from B to C, and then from C to D, is the same as going from B to D directly. And third, the transition matrix from B to C is invertible, and its inverse is the transition matrix from C to B.
The proofs use the uniqueness in the theorem. For the first: the identity matrix leaves every coordinate column unchanged, so it does the job of the transition matrix from B to B. Since only one matrix does this job, it is that matrix. For the second: start with the coordinates of v relative to B. Multiplying by P, C from B, gives its coordinates relative to C. Then multiplying by P, D from C, gives its coordinates relative to D. Matrix products are associative, so this is the product of the two matrices, times the coordinates relative to B. So the product does the job of the transition matrix from B to D, and by uniqueness, it is that matrix. For the third, take D equal to B in the second rule. Then P, B from C, times P, C from B, is P, B from B, which is the identity. Exchange the roles of B and C, and the product in the other order is the identity too. So the two matrices are inverses of each other.
Notice the order in the product. The first step, from B to C, stands on the right, and the labels in the middle match: C next to C.
Computing transition matrices
In F n, there is a quick way to compute transition matrices. Write E for the standard basis, e one up to e n. Every vector x is x one e one, plus and so on, up to x n e n. So the coordinates of x relative to E are just its own entries. So the transition matrix from B to E has the vectors b one up to b n themselves as its columns. Writing a vector of B in the standard basis takes no work at all. By the third rule, the transition matrix from E to B is the inverse of this matrix. So the coordinates of x relative to B are this inverse, times x.
For two bases of F n, we go through the standard basis: from B to E, and then from E to C. By the second and third rules, P, C from B, is the inverse of P, E from C, times P, E from B. We do not need to compute the inverse. Write the columns of C on the left, and the columns of B on the right, and row reduce until the left half becomes the identity. This is always possible: the left half is invertible, so by the invertible matrix theorem, its reduced echelon form is the identity. Here is why it works, so take it slowly. Each row operation multiplies the whole matrix on the left by an elementary matrix. Say their product G turns the left half into the identity. A product G times a matrix is computed column by column, so G times the whole matrix has left half G times P, E from C, and right half G times P, E from B. Then, by lecture sixteen, G is the inverse of the left half, P, E from C. So the right half becomes G times P, E from B, which is P, C from B.
Back to the plane. On the left, c one and c two. On the right, b one and b two. A single row operation turns the left half into the identity: replace row one by row one plus row two. Entry by entry: one plus zero is one, and minus one plus one is zero. On the right, one plus one is two, and minus two plus one is minus one. The second row stays as it is. The left half is now the identity, so the right half is the transition matrix from B to C. Its columns are (two, one), and (minus one, one), the same matrix we found before.
Polynomials
Transition matrices work in every finite dimensional space. In P two, the polynomials of degree at most two, take the standard basis E: one, x, and x squared. And take C: one, x minus one, and x minus one squared, the basis we met in lecture twenty five. First we write the polynomials of E in terms of C. One is one. x is one plus x minus one. And x squared is the square of x minus one plus one, which is one, plus two times x minus one, plus x minus one squared. So C spans P two, and three polynomials that span a space of dimension three form a basis, by lecture twenty three. This shows once more that C is a basis. And the columns we just found, the column (one, zero, zero), the column (one, one, zero), and the column (one, two, one), form the transition matrix from E to C.
In the other direction, the polynomials of C are easy to write in the basis E. One is one, x minus one is minus one plus x, and x minus one squared is one, minus two x, plus x squared. These columns form the transition matrix from C to E, which by the third rule is the inverse of the first one. Now take the polynomial p, which is two plus three x plus x squared. Its coordinates relative to E are (two, three, one). Multiply by the transition matrix from E to C. In the first entry, two plus three plus one is six. In the second entry, three plus two times one is five. In the third entry, we get one. So relative to C, p has the coordinates (six, five, one).
So p is six, plus five times x minus one, plus x minus one squared. Let's expand to check. The constant terms give six minus five plus one, which is two. The terms in x give five minus two, which is three. And x squared appears once. That is p. Why is this basis useful? Relative to C, the coordinates tell us about p at the point one. Put x equal to one: x minus one becomes zero, so the last two terms vanish, and p of one is six. So the first coordinate relative to C is simply the value of p at one, with no work at all.
Summary
Why change basis at all? A problem that looks complicated in one basis can be simple in another. Later in the course, we will choose a basis adapted to a linear map, in which its matrix becomes as simple as possible, often diagonal. Let's summarise. For bases B and C of an n dimensional space, the transition matrix P, C from B, turns coordinates relative to B into coordinates relative to C. Its columns are the vectors of B, written in the basis C. Transition matrices compose like the steps they describe: D from C, times C from B, is D from B. And each one is invertible, with the transition matrix in the opposite direction as its inverse.
In F n, row reduce the columns of C beside the columns of B. When the left half is the identity, the right half is P, C from B. Before the next lecture, read section five point four of the course book, try the problems on sheet seven about change of basis, and do the lecture check on this lecture's page at Open Semester dot com. Next time, we start week eight with linear maps between vector spaces. See you there.
In this lecture
Materials
Check yourself
3 questions, from warm-up to stretch
Work each one out on paper, type your answer and press Check. Stuck? Open a hint; the worked solution is there when you need it.
- Question 1 of 3 Warm-up
and are bases of a -dimensional space , and . A vector has . Find , and say what the first column of is.
Hint 1 of 2
By Theorem 5.4.1, : multiply the matrix by the column .
Hint 2 of 2
Each entry is a row of the matrix times the column: the first is . For the column, read Definition 5.4.2: column of is .
Worked solution
- By Theorem 5.4.1, .
- First entry: . Second entry: . So .
- By Definition 5.4.2 the columns of are the vectors of written in the basis , so the first column says , that is .
- Question 2 of 3 Core
In take the bases and . Find the transition matrix .
Hint 1 of 2
The columns are and (Definition 5.4.2). Or use Theorem 5.4.6: row reduce .
Hint 2 of 2
. Set this equal to , then to , and solve for and each time.
Worked solution
- A combination of is .
- : and , so . Thus .
- : and , so . Thus .
- These are the columns (Definition 5.4.2): .
- Check by Theorem 5.4.6: . The right half is the same matrix.
- Question 3 of 3 Stretch
In take the standard basis and the basis . Find the entry in row , column of . Then find for .
Hint 1 of 2
Column of is : expand . For , as in Example 5.4.9, write .
Hint 2 of 2
Expand and compare with , starting from , then , then the constant term. Check: should be .
Worked solution
- , so column of is , and the entry in row is . The whole matrix is .
- Write .
- Compare with : ; then , so ; then , so . Thus .
- Check with the matrix: . And , since the other two basis polynomials are zero at .
How did it go?