# Math Help - Transformation matrix - again

1. ## Transformation matrix - again

We have the vectors a1 = (-2,5) and a2 = (-3,8) in the vector space R2 and the linear transformation f: R2 -> R2 defined by

f(a1) = 2a1 - a2 and f(a2) = -4a1 + 2a2

I have to find the transformation matrix with respect to the standard basis for R2.

My attempt :

It would be nice if someone could look at it

2. ## Re: Transformation matrix - again

Hey Tala.

Recall that for a linear transformation you have Ax = b where x is transformed by A to b.

In this case x and b are 2x2 matrices not vectors but since you have x and b, you can calculate A by doing A*x*x^(-1) = b*x^(-1) which means A = b*x^(-1) (x is invertible since its a 2x2 matrix).

So your solution is A = b*x^(-1) where x is your original 2x2 system and b is your final 2x2 system. Using Octave I got the solution:

>> X = [-2, -3; 5, 8]
X =

-2 -3
5 8

>> B = [2 -4; -1, 2]
B =

2 -4
-1 2

>> A = B*inv(X)
A =

-36.0000 -14.0000
18.0000 7.0000

>> A*X
ans =

2.0000 -4.0000
-1.0000 2.0000

3. ## Re: Transformation matrix - again

Thank you ! This helps a lot. I just have one last question do you think I can use the formula ey= eFe * ex​ instead of Ax = b ?

4. ## Re: Transformation matrix - again

What does the e^y refer to?

The Ax = b is the standard form a linear transformation mapping some space (like R^n) to another space (like R^m) with the matrix A. In this case you are mapping R^2 -> R^2 so A is a 2x2 matrix. Usually the examples show vectors being transformed (x is usually a vector and so is b) but it doesn't have to be the case.

Maybe you should explain what the y's, eFe, and x refer to in the above.

5. ## Re: Transformation matrix - again

Tala, you did your work just *perfectly*.

we are essentially given the matrix for f relative to the basis {a1,a2}. this is your matrix B.

the matrix A transforms the basis {a1,a2} to standard coordinates, so to transform standard coordinates to the aj kind, the first thing we do is apply A-1.

now we can apply B, to get the aj-coordinates of our transformed vectors (under f).

finally, we apply A to turn these back into standard coordinates. so the desired matrix is ABA-1, which you calculated correctly.

does this agree with the initial problem?

first, let's write f(a1) in standard coordinates. f(a1) = 2a1 - a2 = 2(-2,5) - (-3,8) = (-4,10) + (3,-8) = (-1,2).

and:

$\begin{bmatrix}18&7\\-36&-14 \end{bmatrix} \begin{bmatrix}-2\\5 \end{bmatrix} = \begin{bmatrix}-1\\2 \end{bmatrix}$

so we're good there.

also, f(a2) = -4a1 + 2a2 = -4(-2,5) + 2(-3,8) = (8,-20) + (-6,16) = (2,-4), and:

$\begin{bmatrix}18&7\\-36&-14 \end{bmatrix} \begin{bmatrix}-3\\8 \end{bmatrix} = \begin{bmatrix}2\\-4 \end{bmatrix}$

so this matrix for f does exactly what we want it to.

6. ## Re: Transformation matrix - again

Good explanation ! I'm glad that my result is correct. Thank you Deveno.

7. ## Re: Transformation matrix - again

Found previous replies confusing. It seems like very straight-forward problem.

Substitute a1=(-2,5), a2=(-3,8) to get f(a1)=(-1,2), f(a2)=(2,-4) in basic coordinates of R2.
Determine the matrix M of the transformation from M(a1)=f(a1), M(a2)=f(a2), which give 4eqs in 4 unknowns:

-2M11 + 5M12 = -1
-2M21 + 5M22 = 2
-3M11 + 8M12 = 2
-3M21 + 8M22 = -4

M = (18,7;-36,-14)

8. ## Re: Transformation matrix - again

it *is* straight-forward, and in other posts i have done exactly what you did (note we actually get a PAIR of two equations in two unknowns, much easier to solve than four equations each of which has 4 unknowns).

since the original poster has already taken the approach i discussed in my post, and asked for a verification of their work, that is what i did.

chiro's approach is a little unusual, viewing the action of a linear transformation on a pair of vectors as a transformation acting on a 2x2 matrix, but this, too, is a valid point of view (in line with viewing matrices as "vectors of vectors", that is, a dual-indexed array).

as is often the case in linear algebra, there are several methods available at our disposal. a person is free to use whichever method pleases them.

9. ## Re: Transformation matrix - again

I found the previous posts (with the obvious exception), as well as the thumb-nail, unintelligible. It occurred to me that this is what Tala was trying to address:

PROBLEM

Suppose a1 and a2 are given in some arbitrary basis g1,g2. We determine matrix representation M of L for this basis as in post#7. Let e1 = (1,0) and e2 = (0,1) be the “standard” basis. What is matrix representation of L for the “standard” basis?

Assumption
It is known how to go from representation of a vector in one basis to representation of same vector in another basis.

NOTATION (Mirsky)
The element X in R2 is mapped into the element L(X) in R2.

a = R (X; g1,g2), a represents X wrt g1,g2.
a’= R (X; e1,e2).
b = R (L(X); g1,g2), b represents L(X) wrt g1,g2.
b’ = R (L(X); e1,e2).
M = R (L: g1,g2; g1,g2), M represents L wrt g1,g2;g1,g2.
M’ = R (L: e1,e2; e1,e2), M’ represents L wrt “standard” bases.

SOLUTION
a’=Pa
b’=Pb
b’=Ma’
Pb=MPa → b=P-1MPa

M’ = P-1MP

10. ## Re: Transformation matrix - again

here is MY take on what is going on:

we are given the action of f on the set {a1,a2} in terms of that same set:

f(a1) = 2a1 - a2.

f(a2) = -4a1 + 2a2.

we are also told that a1 = (-2,5) and a2 = (-3,8).

note that a2 is not a scalar multiple of a1, and therefore {a1,a2} forms a basis for R2.

IN THIS BASIS, f has the matrix B =

$\begin{bmatrix}2&-4\\-1&2 \end{bmatrix}$

(this information just codifies that f(a1) = f(1a1+0a2) = 2a1 - a2, that is:

that the first column of the matrix for f in the basis {a1,a2} is (2,-1)T, and similarly for the second column).

since we are given the coordinates for {a1,a2} in the standard basis as well, we know that the change-of-basis matrix from

{a1,a2} to the standard basis is the matrix whose columns are {a1,a2}. the original poster called this matrix A.

all of this, i might add, is standard exposition in many linear algebra texts. it does not represent some peculiar way of looking at linear transformations i personally have.

the "reverse" change-of-basis matrix is the inverse matrix. we know a change-of-basis matrix is invertible because a change of basis is a linear isomorphism, and isomorphisms are bijective.

put another way: the 2-tuple or ordered pair of scalars (x,y) doesn't "automatically" tell us which vector in RxR (or more generally in FxF) we have:

what is tells us is we have x times "a" basis vector, and y times "another" basis vector. the choice of a basis to use is ARBITRARY, we are free to use whatever "units" (or axes) we choose.

of course, the standard basis {(1,0),(0,1)} (also written as {i,j}...perhaps a hold-over from the initial dominance of quaternions in vector analysis, or as {e1,e2}, which appears to be "the current standard"), which uses the customary choice of a unit length vector in the "x-direction" (which is...what? given a plane, please tell me "which" direction is "naturally" the x-axis?) and a second unit vector in the direction a quarter-turn counterclockwise to the first (which we then call the "y-direction"), is usually intended when NO basis is specified.

there IS, i agree, some notational ambiguity, here. if i have some basis in mind when i say (3,5) (so i am really thinking 3b1+5b2 for some basis {b1,b2}) i should indicate this somehow. the way i am accustomed to is this:

[3,5]B

but it is my understanding that differing notations DO exist (such as your "R" notation).

it is largely a matter of semantics as to whether RxR "models" the euclidean plane, or "is" the euclidean plane: in ANY case, they are (at least) isomorphic, and thus indistinguishable "as vector spaces" (we may have "some other" criterion for distinguishing two isomorphic vector spaces, such as "what set its elements belong to", or perhaps some physical criterion based on what we are using the vector spaces FOR).

************

what i find unintelligible is WHY you posit some THIRD basis {g1,g2} when there is never any mention of it at all. certainly your matrix P doesn't correspond to any of the 3 matrices in the original poster's attachment.

my "interpretation" of Tala's attachment:

A (seems to be the change of basis matrix from {a1,a2} to standard basis)
B (seems to be f relative to the a-basis)

seems legit.

11. ## Re: Transformation matrix - again

It wasn’t stated that a1,a2 was to be taken as a basis. If you want to take a1,a2 as the basis for the transformation (not clear to me from orig post), fine.

If a1,a2 is taken as a basis for the transformation, then
M(1,0)=(2,1)
M(0,1)=(-4,2) → M=(2,-4);(-1,2)
If it is assumed a1 and a2 are given wrt the standard basis e1,e2:
M=R(L,a1,a2,a1,a2) and let
a= R(X,a1,a2)
a’= R(X,e1,e2)
b= R(L(X),a1,a2)
b’= R(L(X),e1,e2)
b=Ma
a=Pa’
b=Pb’
b’=P-1MPa’
M’=P-1MP

To Find P:
X=x1a1 + x2a2 = x1’e1 + x2’e2
e1=P11a1+P21a2
e2=P12a2 + P22(a2)
(1,0)=P11(-2,5)+P21(-3,8)
(0,1)=P12(-2,5)+P22(-3,8), 4 eqs in 4 unknowns
x=Px’

I assume that’s what you did though I found the explanation unintelligible.

12. ## Re: Transformation matrix - again

Originally Posted by Hartlw
It wasn’t stated that a1,a2 was to be taken as a basis. If you want to take a1,a2 as the basis for the transformation (not clear to me from orig post), fine.
not clear from the post, but "implied" by the attachment. true, i made some "assumptions" as to what was "intended" by the matrices A and B. i think these assumptions reasonable.

If a1,a2 is taken as a basis for the transformation, then
M(1,0)=(2,1)
M(0,1)=(-4,2) → M=(2,-4);(-1,2)
this is exactly the matrix B in the attachment. sort of bears out i might have been on the right track.

If it is assumed a1 and a2 are given wrt the standard basis e1,e2:
M=R(L,a1,a2,a1,a2) and let
a= R(X,a1,a2)
a’= R(X,e1,e2)
b= R(L(X),a1,a2)
b’= R(L(X),e1,e2)
b=Ma
a=Pa’
b=Pb’
b’=P-1MPa’
M’=P-1MP
this is the same thing as i am doing. in the "a"-basis, (i'll call this "S" for the time being) we have particularly simple forms for R(a1,a1,a2) and

R(a2,a1,a2), namely [1,0]S and [0,1]S.

To Find P:
X=x1a1 + x2a2 = x1’e1 + x2’e2
e1=P11a1+P21a2
e2=P12a2 + P22(a2)
(1,0)=P11(-2,5)+P21(-3,8)
(0,1)=P12(-2,5)+P22(-3,8), 4 eqs in 4 unknowns
x=Px’

I assume that’s what you did though I found the explanation unintelligible.
actually it's much easier to find P-1 (given that we know that P takes (-2,5) to [1,0]S, and (-3,8) to [0,1]S, then P-1 takes: [1,0]S (that is a1) to (-2,5), and [0,1]S (that is, a2) to (-3,8)), we can just write down P-1 (this is the matrix A used in the original post) rather "brainlessly": its first column is the image of [1,0]S, and it's second column is the image of [0,1]S, which we know already.

to find P we just invert P-1, which is fairly easy to do given that we are dealing with a 2x2 matrix and that det(P-1) = -1 (in this particular case, probably less work than solving a system of 4 equations in 4 unknowns).

it's probably just me, but i find the notation R(X,a1,a2) less intuitive than [x1,x2]S (where S = {a1,a2}) ,as it hides "the coordinate presentation". but if it works for you, and you find it congenial, it's all good.

13. ## Re: Transformation matrix - again

Tala wrote in post 1: "We have the vectors a1 = (-2,5) and a2 = (-3,8) in the vector space R2 and the linear transformation f: R2 -> R2 defined by

f(a1) = 2a1 - a2 and f(a2) = -4a1 + 2a2"

Did anyone notice f(a2) = -2f(a1), ie, not linearly independent?

14. ## Re: Transformation matrix - again

So this whole thing wasn’t a waste, assume the problem were properly posed:
Given a1,a2 and f(a1),f(a2) linearly independent and given in e1,e2 coordinate system, for example,
a1=(2,3), a2=(1,2), f(a1)= 3a1+a2, f(a2)=a1+a2.

I) In the a1,a2 coordinate system: a1’=(1,0) and a2’=(0,1)
M’(1,0)=f’(1,0), M’(0,1)=f’(0,1), f’(1,0)=(3,1); f’(0,1)=(1,1) → M’
If x=R(X;e1,e2) and x’=R(X;a1,a2), then x=Px’
P(1,0)= a1, P(0,1)=a2, a1=(2,3), a2=(1,2) → P (Deveno)

If b’=M’a’ in a1,a2, then
P-1b=M’P-1a → b=PM’P-1a
M= PM’P-1 in e1,e2

II) Working in e1,e2 coordinate system directly:
Ma1=f(a1), Ma2=f(a2) → M in e1,e2

M from I) should be the same as M from II
note: M’(1,0)≡M’(1,0)T, etc

15. ## Re: Transformation matrix - again

Originally Posted by Hartlw
Tala wrote in post 1: "We have the vectors a1 = (-2,5) and a2 = (-3,8) in the vector space R2 and the linear transformation f: R2 -> R2 defined by

f(a1) = 2a1 - a2 and f(a2) = -4a1 + 2a2"

Did anyone notice f(a2) = -2f(a1), ie, not linearly independent?
yep. and the matrix for f (in whatever basis) has rank 1.