Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2010-12-01 07:45:21

Au101
Member
Registered: 2010-12-01
Posts: 353

Matrix Transformations

Hi guys, I'm having trouble with a particular calculation. I know that a reflection in the y-axis followed by a reflection in the line y = -x is equivalent to a rotation of 90 degrees anticlockwise about (0,0). A friend asked me to prove it and even though I can quite plainly see that it is by drawing a graph I simply cannot get the matrix algebra to add up.

I know that a reflection in the y-axis can be denoted by the matrix

And I'm almost certain that a reflection in the line y = -x can be denoted by the matrix

However the product of these two matrices comes out at, unless I'm very much mistaken

When it should be

Can anybody see my mistake? Thanks:)

Offline

#2 2010-12-01 08:25:29

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Matrix Transformations

Hi Au101;



To label your problem so I can refer to it better. Your computations are correct.

C is a clockwise 90 degree rotation. D is a counterclockwise 90 degree rotation.
One question that may help you, have you tried translating some points with your B matrix to see what direction it is going?


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#3 2010-12-01 08:30:04

Bob
Administrator
Registered: 2010-06-20
Posts: 10,583

Re: Matrix Transformations

Hi Au101,

When you use matrices to 'do' transformations, the 2x2 (transforming) matrix has to precede the 2xn matrix that represents the coordinates (vectors) of the n points of the shape. 

So to do a multiple transformation you have to put the second transformation before the first.

In all other respects what you have done is correct;  just reverse the matrices and multiply and you'll get the result you want.

Bob


Children are not defined by school ...........The Fonz
You cannot teach a man anything;  you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you!  …………….Bob smile

Offline

#4 2010-12-01 08:34:59

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Matrix Transformations

Hi;

Whatever B touches, a matrix, a point, a line, it is all going in the clockwise direction.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#5 2010-12-01 08:37:37

Au101
Member
Registered: 2010-12-01
Posts: 353

Re: Matrix Transformations

Thanks for your help Bobbym, I have had a look and that matrix is definitely correct.

It seems, however, that Bob Bundy is quite right, thanks very much, I hadn't realised that I'd been doing it wrong all the time!

Thanks very much to both of you, that should have it fixed.

Note to self: always read the textbook thoroughly before embarking upon the exercise tongue

Last edited by Au101 (2010-12-01 08:38:14)

Offline

#6 2010-12-01 08:41:11

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Matrix Transformations

Hi Au101;

Yes, Bob gave the answer away. Since you were translating by B that is why it delivers the clockwise rotational matrix. Seems to make sense. As an exercise translate some points using A. They should go counterclockwise.

Note to self: always read the textbook thoroughly before embarking upon the exercise

That is where I disagree. Play as much as you like with math. We are trying to bring it back to being an experimental science. The way it used to be!


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#7 2010-12-01 08:48:02

Au101
Member
Registered: 2010-12-01
Posts: 353

Re: Matrix Transformations

bobbym wrote:

Hi Au101;

Yes, Bob gave the answer away. Since you were translating by B that is why it delivers the clockwise rotational matrix. Seem to make sense. As an exercise translate some points using A. They should go counterclockwise. That is what you want.

Note to self: always read the textbook thoroughly before embarking upon the exercise

That is where I disagree. Play as much as you like with math. We are trying to bring it back to being an experimental science. The way it used to be!

Hehe:) I admire your outlook on maths very much and whilst I quite agree it appears that the question before consisted of 7 invertible transformations meaning that I had done plenty of practise of the wrong thing! As much as I hate textbooks, if I have to read them, I think I should probably make sure that I don't misread them and learn the wrong thing!

Thanks again to both of you! smile

Offline

#8 2010-12-01 09:00:16

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Matrix Transformations

Your welcome, but Bob seems to have nailed it down better. I reason about translations backwards which on my planet is how we think.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#9 2010-12-01 09:16:04

Bob
Administrator
Registered: 2010-06-20
Posts: 10,583

Re: Matrix Transformations

Hi AU101,

You're welcome.

Here's a tip.  If you know it already, sorry to state the obvious;  but if you don't it will save you a lot of time.

The 2xn matrix can be any 'shape' so why not transform only the points (1,0) and (0,1)

The vector matrix for this is

But this is the identity matrix for multiplication
so if you want to find the transform for, say, a reflection in the x axis just consider what it does
to the points (1,0) --->  (1,0)   and (0,1)  ----->  (0,-1).....................line A

If the matrix is R and I is the identity ...............  R = R.I   (transformed shape equals reflection x identity)

so I can write down the right matrix straight away using the results on line A

I hope that makes sense.

Try this one:

I want to 'shear' shapes so that points on the x axis stay where they are and other points move parallel to that axis by an amount that is proportional to their distance from the  axis.  Here's a picture to show how (1,0) and (0,1) move.

transforms.JPG

(1,0) ---> (1,0)     and (0,1) ---->  (3,1)  that's a shear in the x direction with shear factor x3

The matrix for this will be

How about that?:)

Bob

ps.  to bobbym.  Thanks for your message on another post.  After tinkering with  'abstract algebra' I turned my hand to matrices and vector geometry because I liked the pictures better.:)

Last edited by Bob (2010-12-01 09:24:12)


Children are not defined by school ...........The Fonz
You cannot teach a man anything;  you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you!  …………….Bob smile

Offline

#10 2010-12-01 09:28:45

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Matrix Transformations

Hi Bob;

Sir Isaac Newton wrote:

Tact is the knack of making a point without making an enemy

That was difficult to do without hurting with a reprimand. I am glad that you are not insulted by those comments. You have not been truly initiated until that happens to you. Now I can say, Welcome to the forum!


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#11 2010-12-01 09:29:02

Au101
Member
Registered: 2010-12-01
Posts: 353

Re: Matrix Transformations

Ooooh thank you Bob Bundy, I believe that is the method which I'm using, but it's good to see it stated so elegantly and concisely, I feel that I have a much better understanding now - thanks a lot smile

Offline

#12 2010-12-01 09:57:09

Bob
Administrator
Registered: 2010-06-20
Posts: 10,583

Re: Matrix Transformations

Thanks bobbym,

I feel very welcome now.

Thanks AU101.  I enjoyed that little session.  By all means post again if you want help; it helps to keep my brain cells alive!

Bob


Children are not defined by school ...........The Fonz
You cannot teach a man anything;  you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you!  …………….Bob smile

Offline

Board footer

Powered by FluxBB