# Thread: How to make a change of basis?

1. ## How to make a change of basis?

Hi all!

I got a problem, I need to make a change of basis, I have a matrix representation

$\displaystyle T= {ab }\begin{bmatrix} 1 & 0 & 0 \\ 0 & 2 &0 \\ 0 & 0 & 3 \end{bmatrix}$ in the basis$\displaystyle B= \left\{{ \begin{bmatrix} 1\\ 0 \\ \ 0\end{bmatrix} , \begin{bmatrix} 0 \\ 1 \\ \ 0\end{bmatrix} , \begin{bmatrix} 0\\ 0 \\ \ 1\end{bmatrix} }\right\} = e_j$

and now I have to put the matrix T in the basis

$\displaystyle B '= \left\{{ \begin{bmatrix} -1\\ 1 \\ \ 0\end{bmatrix} , \begin{bmatrix} 1\\ 1 \\ \ 0\end{bmatrix} , \begin{bmatrix} 0\\ 0 \\ \ 1\end{bmatrix} }\right\} = e' _{i}$

I have tried ...

The matrix change of basis from B to B' is

$\displaystyle A =a_{ij}$ where $\displaystyle a_{ij} = < e'_{i} , e_{j} >$

The inners products are
$\displaystyle < e'_{1} , e_{1} > = [ -1 1 0 ] \begin{bmatrix} 1\\ 0 \\ \ 0\end{bmatrix}= -1$
and so on..

therefore the matrix A is

$\displaystyle A= \begin{bmatrix} -1 & 1 & 0 \\ 1 & 1 &0 \\ 0 & 0 & 1 \end{bmatrix}$ , finally the matrix T in the basis B' is equal to $\displaystyle A T A ^T$

$\displaystyle A^T$ is the matrix transpose, It is correct or wrong ?

2. ## Re: How to make a change of basis?

Prior to learnig "formulas" that simplify the task, you should learn the basic concepts involved. Here, you have a matrix representing a linear transformation in a given (ordered) basis. The basic point is this- using a given basis, the "representation" of the basis vector, themselves, in that basis, is <1, 0, 0>, <0, 1, 0>, and < 0, 0, 1>. It should be easy to see that multiplying a matrix by any one of those gives just a column of the matrix. For example,
$\displaystyle \begin{bmatrix}a_{11}& a_{21} & a_{31} \\a_{12}& a_{22} & a_{32} \\ a_{31}& a_{32} & a_{33}\end{bmatrix}\begin{bmatrix}0 \\ 1 \\ 0 \end{bmatrix}= \begin{bmatrix}a_{21} \\ a_{22} \\ a_{23}\end{bmatrix}$
the second column of the matrix.

So- to find the matrix representation of the linear transformation in this new basis, multiply the matrix by each basis vector in turn and write the result in terms of the new basis. For example,
$\displaystyle ab\begin{bmatrix}1 & 0 & 0 \\ 0 & 2 & 0 \\ 0 & 0 & 3\end{bmatrix}\begin{bmatrix}-1 \\ 1 \\ 0 \end{bmatrix}= \begin{bmatrix}-1 \\ 2 \\ 0\end{bmatrix}$
and now, we need to write that in terms of the new basis: <-1, 2, 0>= a<-1, 1, 0>+ b<1, 1, 0>+ c<0, 0, 1>= <-a+ b, a+ b, c> so we have three equations: -a+b= -1, a+ b= 2, and c= 0. Adding the first two, 2b= 1 so b= 1/2 and we have a= 2- 1/2= 3/2. In terms of our new basis, the first column of the matrix is
$\displaystyle \begin{bmatrix}\frac{3}{2} \\ \frac{1}{2} \\ 0\end{bmatrix}$.

You can do the same with <1, 1, 0> and <0, 0, 1> to find the second and third columns.

Of course, if you have a number of matrices to change from one basis to another, you would want a general formula to use. That's where the "change of basis matrix" comes in- we want a matrix that will change <-1, 1, 0> to <1, 0, 0>, <1, 1, 0> to <0, 1, 0>, and <0, 0, 1> to <0, 0, 1>. That is, we want
$\displaystyle \begin{bmatrix}a_{11}& a_{21} & a_{31} \\a_{12}& a_{22} & a_{32} \\ a_{31}& a_{32} & a_{33}\end{bmatrix}\begin{bmatrix}-1 \\ 1 \\ 0\end{bmatrix}= \begin{bmatrix}-a_{11}+ a_{21} \\ -a_{12}+ a_{22}\\ -a_{31}+ a_{32}\end{bmatrix}= \begin{bmatrix}1 \\ 0 \\ 0\end{bmatrix}$
$\displaystyle \begin{bmatrix}a_{11}& a_{21} & a_{31} \\a_{12}& a_{22} & a_{32} \\ a_{31}& a_{32} & a_{33}\end{bmatrix}\begin{bmatrix}1 \\ 1 \\ 0\end{bmatrix}= \begin{bmatrix}a_{11}+ a_{21} \\ a_{12}+ a_{22}\\ a_{31}+ a_{32}\end{bmatrix}= \begin{bmatrix}0 \\ 1 \\ 0\end{bmatrix}$
and
$\displaystyle \begin{bmatrix}a_{11}& a_{21} & a_{31} \\a_{12}& a_{22} & a_{32} \\ a_{31}& a_{32} & a_{33}\end{bmatrix}\begin{bmatrix} 0 \\ 0 \\ 1\end{bmatrix}= \begin{bmatrix}a_{31} \\ a_{32}\\ a_{33}\end{bmatrix}= \begin{bmatrix}0 \\ 0 \\ 1\end{bmatrix}$

The last, of course, tells us that the last column is just $\displaystyle \begin{bmatrix}0 \\ 0 \\ 1\end{bmatrix}$ as we would expect since the third vector in each basis is the same.

The first two give the equations $\displaystyle -a_{11}+ a_{21}= 1$ and $\displaystyle -a{12}+ a_{22}= 0$, $\displaystyle a_{11}+ a_{21}= 1$ and $\displaystyle a_{12}+ a_{22}= 0$. Adding the first and third equations, $\displaystyle 2a_{21}= 1$ so $\displaystyle a_{21}= 1/2$ and then $\displaystyle a_{11}= 1- a_{21}= 1/2$. Adding the the second and fourth equations, $\displaystyle 2a_{22}= 1$ so $\displaystyle a_{22}= 1/2$ and then $\displaystyle a_{12}= -1/2$. That is, the "change of basis matrix" is
$\displaystyle \begin{bmatrix}-1/2 & 1/2 & 0 \\ 1/2 & -1/2 & 0 \\0 & 0 & 1\end{bmatrix}$
I am going to call this "change of basis matrix", A.

That is exactly your "A" matrix except that mine is divided by 2. Now, suppose we have a vector, v, written in terms of the new matrix. In order to determine what the linear transfromation does to v, we could do the following: multiply by the inverse of A, $\displaystyle A^{-1}$ to go from the new basis to the old, apply the matrix form, T, in that basis, then multiply by A to go from the old basis to the new. That would be $\displaystyle ATA^{-1}$. Of course, my factor of "1/2" in A would introduce a factor of "2" in $\displaystyle A^{-1}$ which would cancel in this product. That is, your "A" is as good as mine!

However, you have $\displaystyle A^T$ where I have $\displaystyle A^{-1}$ and that is an important difference. $\displaystyle A^T= A^{-1}$ if and only if A is "orthogonal" which will be true if and only if both bases are "orthonormal"- that is they all have length 1 and have dot product 0 with each other. In this case, your first basis, <1, 0, 0>, <0, 1, 0>, and <0, 0, 1>, is orthonormal but your second, <-1, 1, 0>, <1, 1, 0>, and <0, 0, 1> is not. All vectors have 0 dot product with each other but the length of the first two is 2, not 1.

3. ## Re: How to make a change of basis?

Prior to learnig "formulas" that simplify the task, you should learn the basic concepts involved. Here, you have a matrix representing a linear transformation in a given (ordered) basis. The basic point is this- using a given basis, the "representation" of the basis vector, themselves, in that basis, is <1, 0, 0>, <0, 1, 0>, and < 0, 0, 1>. It should be easy to see that multiplying a matrix by any one of those gives just a column of the matrix. For example,
$\displaystyle \begin{bmatrix}a_{11}& a_{21} & a_{31} \\a_{12}& a_{22} & a_{32} \\ a_{31}& a_{32} & a_{33}\end{bmatrix}\begin{bmatrix}0 \\ 1 \\ 0 \end{bmatrix}= \begin{bmatrix}a_{21} \\ a_{22} \\ a_{23}\end{bmatrix}$
the second column of the matrix.

So- to find the matrix representation of the linear transformation in this new basis, multiply the matrix by each basis vector in turn and write the result in terms of the new basis. For example,
$\displaystyle ab\begin{bmatrix}1 & 0 & 0 \\ 0 & 2 & 0 \\ 0 & 0 & 3\end{bmatrix}\begin{bmatrix}-1 \\ 1 \\ 0 \end{bmatrix}= \begin{bmatrix}-1 \\ 2 \\ 0\end{bmatrix}$
and now, we need to write that in terms of the new basis: <-1, 2, 0>= a<-1, 1, 0>+ b<1, 1, 0>+ c<0, 0, 1>= <-a+ b, a+ b, c> so we have three equations: -a+b= -1, a+ b= 2, and c= 0. Adding the first two, 2b= 1 so b= 1/2 and we have a= 2- 1/2= 3/2. In terms of our new basis, the first column of the matrix is
$\displaystyle \begin{bmatrix}\frac{3}{2} \\ \frac{1}{2} \\ 0\end{bmatrix}$.

You can do the same with <1, 1, 0> and <0, 0, 1> to find the second and third columns.

Of course, if you have a number of matrices to change from one basis to another, you would want a general formula to use. That's where the "change of basis matrix" comes in- we want a matrix that will change <-1, 1, 0> to <1, 0, 0>, <1, 1, 0> to <0, 1, 0>, and <0, 0, 1> to <0, 0, 1>. That is, we want
$\displaystyle \begin{bmatrix}a_{11}& a_{21} & a_{31} \\a_{12}& a_{22} & a_{32} \\ a_{31}& a_{32} & a_{33}\end{bmatrix}\begin{bmatrix}-1 \\ 1 \\ 0\end{bmatrix}= \begin{bmatrix}-a_{11}+ a_{21} \\ -a_{12}+ a_{22}\\ -a_{31}+ a_{32}\end{bmatrix}= \begin{bmatrix}1 \\ 0 \\ 0\end{bmatrix}$
$\displaystyle \begin{bmatrix}a_{11}& a_{21} & a_{31} \\a_{12}& a_{22} & a_{32} \\ a_{31}& a_{32} & a_{33}\end{bmatrix}\begin{bmatrix}1 \\ 1 \\ 0\end{bmatrix}= \begin{bmatrix}a_{11}+ a_{21} \\ a_{12}+ a_{22}\\ a_{31}+ a_{32}\end{bmatrix}= \begin{bmatrix}0 \\ 1 \\ 0\end{bmatrix}$
and
$\displaystyle \begin{bmatrix}a_{11}& a_{21} & a_{31} \\a_{12}& a_{22} & a_{32} \\ a_{31}& a_{32} & a_{33}\end{bmatrix}\begin{bmatrix} 0 \\ 0 \\ 1\end{bmatrix}= \begin{bmatrix}a_{31} \\ a_{32}\\ a_{33}\end{bmatrix}= \begin{bmatrix}0 \\ 0 \\ 1\end{bmatrix}$

The last, of course, tells us that the last column is just $\begin{bmatrix}0 \\ 0 \\ 1$ as we would expect since the third vector in each basis is the same.

The first two give the equations $-a_{11}+ a_{21}= 1$ and $-a{12}+ a_{22}= 0$, $a_{11}+ a_{21}= 1$ and $a_{12}+ a_{22}= 0$. Adding the first and third equations, $2a_{21}= 1$ so $a_{21}= 1/2$ and then $a_{11}= 1- a_{21}= 1/2$. Adding the the second and fourth equations, $2a_{22}= 1$ so $a_{22}= 1/2$ and then $a_{12}= -1/2$. That is, the "change of basis matrix" is
$\displaystyle \begin{bmatrix}-1/2 & 1/2 & 0 \\ 1/2 & -1/2 & 0 \\0 & 0 & 1\end{bmatrix}$
I am going to call this "change of basis matrix", A.

That is exactly your "A" matrix except that mine is divided by 2. Now, suppose we have a vector, v, written in terms of the new matrix. In order to determine what the linear transfromation does to v, we could do the following: multiply by the inverse of A, $A^{-1}$ to go from the new basis to the old, apply the matrix form, T, in that basis, then multiply by A to go from the old basis to the new. That would be $ATA^{-1}$. Of course, my factor of "1/2" in A would introduce a factor of "2" in $A^{-1}$ which would cancel in this product. That is, your "A" is as good as mine!

However, you have $A^T$ where I have $A^{-1}$ and that is an important difference. $A^T= A^{-1}$ if and only if A is "orthogonal" which will be true if and only if both bases are "orthonormal"- that is they all have length 1 and have dot product 0 with each other. In this case, your first basis, <1, 0, 0>, <0, 1, 0>, and <0, 0, 1>, is orthonormal but your second, <-1, 1, 0>, <1, 1, 0>, and <0, 0, 1> is not. All vectors have 0 dot product with each other but the length of the first two is 2, not 1.

4. ## Re: How to make a change of basis?

I have learned a lot from your explanation , thanks so much