# Transition matrix -> change of basis.

1. Feb 14, 2014

### Mutaja

1. The problem statement, all variables and given/known data

B = {b1, b2, b3}

and

C = {c1, c2, c3}

are two basis's for R3 where the connection between the basis vectors are given by

b1 = -c1 + 4c2, b2 = -c1 + c2 + c3, b3 = c2 - 2c3

a) decide the transformation matric from basis B to basis C.

A vector x is given in relation to basis B by $$[X]_b=\begin{pmatrix}-3\\ 4\\ 1 \end{pmatrix}$$

b) Decide the coordinates to the vector x in relation to basis C.

2. Relevant equations

Transformation matrices between basis B, C and standard.

3. The attempt at a solution

My problem here is dealing with such a generalized problem. I mean, it shouldn't be any different than if we were dealing with numbers, right? But I can't see how to solve this.

This is my attempt:

The basis B and C contains three vectors each?

$$b_1=\begin{pmatrix}x1\\ x2\\ x3 \end{pmatrix}$$, $$b_2=\begin{pmatrix}x4\\ x5\\ x6 \end{pmatrix}$$, $$b_3=\begin{pmatrix}x7\\ x8\\ x9 \end{pmatrix}$$

$$c_1=\begin{pmatrix}y1\\ y2\\ y3 \end{pmatrix}$$, $$c_2=\begin{pmatrix}y4\\ y5\\ y6 \end{pmatrix}$$, $$c_3=\begin{pmatrix}y7\\ y8\\ y9 \end{pmatrix}$$

To find the transition matrix MB->C we have to go through the standard basis.

Standard basis: MB->S
$$\begin{pmatrix} x1 & x4 & x7 \\ x2 & x5 & x8 \\ x3 & x6 & x9 \end{pmatrix}\quad$$

MC->S
$$\begin{pmatrix} y1 & y4 & y7 \\ y2 & y5 & y8 \\ y3 & y6 & y9 \end{pmatrix}\quad$$

MB->C = MS->C * MB->S = M-1C->S * MB->S

=(inverse) $$\begin{pmatrix} x1 & x4 & x7 \\ x2 & x5 & x8 \\ x3 & x6 & x9 \end{pmatrix}\quad$$ * $$\begin{pmatrix} y1 & y4 & y7 \\ y2 & y5 & y8 \\ y3 & y6 & y9 \end{pmatrix}\quad$$ = M-1C->S * MB->S.

Am I doing the right thing here? I cut it semi-short since I feel like I'm wasting my time doing the wrong thing. I've done it on paper, so if you want me to fill in the last part, just let me know.

2. Feb 14, 2014

### vela

Staff Emeritus
You're complicating things by introducing the third basis. You want to work with B and C directly.

You're looking for the matrix $M_{B \to C}$ where for any vector X,
$$[X]_C = M_{B \to C} [X]_B.$$ Consider what happens when $X$ corresponds to each of the basis vectors in B. For example, if X=b1, what is [X]B and what is [X]C? If you get those right, you should be able to determine one of the columns of $M_{B \to C}$.

3. Feb 16, 2014

### Mutaja

I'm very sorry, but I don't have a clue here.

The vector X, in respect to basis C, is the transformation matrix between B->C times the vector X in respect to basis B? Can you somehow supply an example? I really don't have anything in my lecture notes on how to proceed here, and I'm obviously confused as to what I started in the opening post.

Thanks for showing interest - and sorry for such a late reply. I'm now working on this problem full time.

4. Feb 16, 2014

### D H

Staff Emeritus
What do your lecture notes cover? Part (a) of the problem is asking you to find that transformation matrix. It seems you have somehow missed understanding the very basics of vector representations and transformations from one basis to another.

When you wrote $[X]_b=\begin{pmatrix}-3\\ 4\\ 1 \end{pmatrix}$, that's shorthand for $\vec X = -3\vec b_1 + 4 \vec b_2 +1\vec b_3$. You already have expressions for $\vec b_1$, $\vec b_2$, and $\vec b_3$ in the C basis. One way to solve part (b) is to substitute and expand. Another approach is to use the transformation matrix $M_{B\to C}$ to do the transformation. Finding that matrix is part (a) of the problem. You don't need some other standard basis to do this. As a test that you have the matrix correct, it's a good idea to solve via the longhand (substitute and expand) form and compare against the more compact matrix*vector form.

5. Feb 16, 2014

### Mutaja

My lecture notes covers transformation from basis B -> C via standard basis - for given vectors/matrices. Not for generalized problems as I view this problem to be where I have a problem with the equations for the values in each vector.

It's - probably - a simple problem, but I'm not good enough to see how to approach this except for the first method I used which is the method my lecture notes covers - but it's obviously confusing me with this particular problem as well as it's a wrong approach.

But I will definitely read up and try to understand what you mean.

Thanks.

6. Feb 16, 2014

### vela

Staff Emeritus
Given what DH said, can you start by writing down what $[X]_b$ and $[X]_c$ are for $\vec{X}=\vec{b}_1$? The transformation matrix shouldn't be involved here at all.

7. Feb 16, 2014

### Mutaja

Thank you both for showing interest and helping me with this.

I found out that the transformation matrix for exercise a is MB->C
$$\begin{pmatrix} -1 & 4 & 0 \\ -1 & 1 & 1 \\ 0 & 1 & -2 \end{pmatrix}\quad$$

If this is correct, I will look into your notation later as that's not covered in my lecture notes. I understand that [X]B means vector X in basis B, but that's it. It confuses me instantly when viewing the notation, but I will look into it first thing tomorrow morning with a fresh mind and confidence.

Thanks a lot for all your help so far.

8. Feb 16, 2014

### D H

Staff Emeritus
That isn't correct. How did you find that out? Did you solve for it, or did a fellow student tell you?

You wrote $X_B$ as a column vector (which is fairly standard), so that means you are looking for a matrix $M_{B\to C}$ that transforms a column vector from it's representation in basis B to it's representation in basis C. Your matrix above transforms a row vector, not a column vector.

It appears you are missing a couple of basic concepts. One is the meaning of your $[X]_b = \begin{pmatrix} -3 \\ 4 \\ 1 \end{pmatrix}$, and the other is the meaning and use of a transformation matrix.

9. Feb 17, 2014

### Mutaja

I'm always using notes and solving myself.

The method I used is that b1 = -1 c1, +4 c2, 0 c3, making it the first column in the matrix.
b2 is -1 c1, +1 c2, +1 c3 making it the second column in the matrix.
b3 is 0 c1, +1 c2, -2 c3 making it the 3rd column in the matrix.

This is according to my lecture notes.

Edit: the $[X]_b = \begin{pmatrix} -3 \\ 4 \\ 1 \end{pmatrix}$ is supplied to excercise b, it's not something I've found. I'm doing part a first.

Edit2: New attempt. It would appear as if I've made a mistake (again, sorry!) This is my new attempt:

MB->C
$$\begin{pmatrix} -1 & -1 & 0 \\ 4 & 1 & 0 \\ 0 & 1 & -2 \end{pmatrix}\quad$$

Last edited: Feb 17, 2014
10. Feb 17, 2014

### D H

Staff Emeritus
It will help to do part (b) by long hand and then using your transformation matrix. If you do it right, the two results should agree.

The long-hand way to do it: Your $[X]_b = ({-}3 \; 4 \; 1)^T$ is short for $\vec X = {-}3\vec b_1 + 4 \vec b_2 + 1\vec b_3$. (Note: I used $({-}3 \; 4 \; 1)^T$ to avoid those rather ugly lines that result from writing column vectors inline.) You are given expressions for $\vec b_1$, $\vec b_2$, and $\vec b_3$ in terms of $\vec c_1$, $\vec c_2$, and $\vec c_3$: $\vec b_1 = {-}\vec c_1 + 4\,\vec c_2$, $\vec b_2 = {-}\vec c_1 + \vec c_2 + \vec c_3$, and $\vec b_3 = \vec c_2 - 2\,\vec c_3$. Work left for you: Substitute those expressions for $\vec b_1$, $\vec b_2$, and $\vec b_3$ to the expression for $\vec X$ and simplify. You should get a representation of $\vec X$ in terms of $\vec c_1$, $\vec c_2$, and $\vec c_3$.

The transformation matrix approach: Compute the product $M_{B \to C} [X]_B$. With your matrix, you will get a different result than the long-hand approach. Something's wrong, and it's not the long-hand approach that's wrong.

What's wrong is your matrix. Review your notes. Your notes are correct. You did not do what your notes said to do. You said "The method I used is that b1 = -1 c1 +4 c2 + 0 c3, making it the first column in the matrix." Now look at what you wrote in post #7. You made $-1\;4\;0$ the first row rather than the first column of the matrix. You repeated this error throughout.

Edit
I see you have caught your error. Good.

11. Feb 17, 2014

### Mutaja

From what you've written here, and my developing knowledge about this, I'm fairly sure that I will be able to do at least something when I get home (at a lecture at the moment). Anything else would be rather sad. Will edit this post with my progress later today.

Thanks a lot, it looks very understandable, and I'm slightly happy that I finally understood the transformation matrix. I've been doing a lot of easy exercises involving transformation matrices earlier, but I was completely confused by the different approach if you know what I mean. Having B expressed with and equation of C's was completely new to me.

Edit: I did the transformation matrix approach as I didn't quite catch the long hand method, but I will definitely look into it if this is correct:

$$[X]_C = M_{B \to C} [X]_B =\begin{pmatrix}-1 & -1 & 0 \\ 4 & 1 & 0 \\ 0 & 1 & -2 \end{pmatrix}\;*\begin{pmatrix}-3\\ 4 \\ 1 \end{pmatrix}\;=\begin{pmatrix}-1\\ -8 \\ 2 \end{pmatrix}$$

Edit: I've had a hard time writing matrices here, but I've now found a method that works really well for me, so I can easily include how I multiplied the matrices, but I feel that is unnecessary since I've checked it on paper and I know those rules :)

Last edited: Feb 17, 2014
12. Feb 17, 2014

### D H

Staff Emeritus
You have an error there, and it's in your $M_{B\to C}$. Double-check your third column.

How can the long-hand form be hard? It's high school (or even lower) level algebra. Just do the substitution and simplify.

13. Feb 17, 2014

### Mutaja

3rd column looks perfectly fine to me. I've rewritten the matrix I've used before and I've double checked I haven't made any careless mistakes. I must be blind..

The long-hand form seems hard because it's notation I'm not used to. It might very well be the case that it's basic, the first you learn, but the course I'm taking is electric based, and the vector/matrix part is vastly neglected the way I see it.

It might also be that I'm stressed out over this and over-complicating things. I'll do my best to review it.

Again, thanks a lot.