User:IssaRice/Linear algebra/Change of basis example in two dimensions

From Machinelearning

This example comes from this video. To make it easier to go back and forth between this page and the video, the notation on this page tries to follow that of the video (where the discussion overlaps), but we distinguish between matrices and vectors.

We are working in R2, the plane. To be slightly pedantic, we will distinguish between matrices and vectors: [10]R2,1 and (1,0)R2. If v is a vector and β is a basis, we write [v]βRn,1 for the "column vector" (n-by-1 matrix) and [v]βR1,n for the "row vector" (1-by-n matrix). It's usually not necessary to be this pedantic, but here the whole point of the discussion is to understand how coordinate systems and translation between coordinate systems works, so it's worthwhile to be pedantic.

Jennifer's basis vectors: b1:=(2,1) and b2:=(1,1).

To Jennifer, b1 looks like (1,0) and b2 looks like (0,1).

If Jennifer says "(1,2)", to us (in the standard basis) this is the vector 1b1+2b2=1(2,1)+2(1,1)=(4,1).

We can also write the above calculation as [b1b2][12]=[2111][12]=[41].

Notice that [b1b2][e1]=[b1] and [b1b2][e2]=[b2], i.e., this matrix transforms our (standard) basis vectors into Jennifer's basis vectors.

How can we write this using change of basis notation? When Jennifer says "(1,2)", this is the vector vR2 such that, when written in Jennifer's coordinate system, it has coordinates (1,2). In other words, it is the vector v such that [v](b1,b2)=[12]. To find out what this vector means in our coordinate system, we must compute [v](e1,e2).

We can write [I](b1,b2)(e1,e2)[v](b1,b2)=[v](e1,e2). What is the meaning of the matrix [I](b1,b2)(e1,e2)? The notation means that the columns of the matrix are Jennifer's basis vectors written using our coordinate system. It takes coordinates written in Jennifer's system and translates it into our coordinates. In other words, it translates from Jennifer's language to our language. But geometrically, it transforms our grid into Jennifer's grid. Aren't these two opposites? This is a point made in the video. The idea is to think of the matrix as transforming our misconception of what Jennifer is saying into what she is actually saying. When Jennifer says "(1,0)" she actually means b1, which is the mapping e1b1, which, geometrically, is transforming our basis vector e1 into Jennifer's basis vector b1.

Now consider the linear transformation T:R2R2 defined by Te1:=b1 and Te2:=b2. Since (e1,e2) is a basis of R2, there is exactly one such linear transformation, i.e., our specification is well-defined. We can check that T is the map (x,y)(2xy,x+y). What is the matrix of T? We can look at where it takes the standard basis vectors to see that the first column is b1 and the second column is b1, i.e., we have [T](e1,e2)(e1,e2)=[b1b2]=[2111]=[I](b1,b2)(e1,e2).

We should also verify that [I](b1,b2)(e1,e2)=[T](e1,e2)(e1,e2). On the one hand, the kth column of [I](b1,b2)(e1,e2) is [Ibk](e1,e2)=[bk](e1,e2). On the other hand, the kth column of [T](e1,e2)(e1,e2) is [Tek](e1,e2)=[bk](e1,e2) (the ek comes from the basis in the subscript). So the two matrices are indeed equal.

To summarize, we can write the same equation in multiple ways:

Equation Description
1b1+2b2=1(2,1)+2(1,1)=(4,1) Linear combination of Jennifer's basis vectors
1[b1]+2[b2]=1[21]+2[11]=[41] Linear combination of Jennifer's basis vectors, written using column vectors
[b1b2][12]=[2111][12]=[41] Matrix multiplication
[I](b1,b2)(e1,e2)[v](b1,b2)=[v](e1,e2) Change of coordinate equation
T(1e1+2e2)=1b1+2b2 Application of a linear transformation to a vector
[T](e1,e2)(e1,e2)[12]=[T](e1,e2)(e1,e2)[(1,2)](e1,e2)=[T(1,2)](e1,e2)=[(4,1)](e1,e2)=[41]