S.O.S. Mathematics CyberBoard

Your Resource for mathematics help on the web!
It is currently Thu, 23 May 2013 03:18:29 UTC

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Derive a single Matrix
PostPosted: Wed, 18 Aug 2010 19:40:08 UTC 
Offline
S.O.S. Newbie

Joined: Wed, 18 Aug 2010 19:35:33 UTC
Posts: 2
Hi all,

I am revising for an exam resit which takes place next week and I'm really stuck on a question from a past exam paper. The question is:

Derive a single matrix to undertake the following collective 2D transformations. A Scaling by a factor of 2 in both X and Y directions followed by a translation by 2 in the X direction and 3 in the Y direction.

Any advice regarding this would be much appreciated as I am pulling out what's left of my hair trying to figure it out.

I think I need to do this first:

Scaling by 2 in both X and Y directions =

X' = Sx * X Y' = Sy * Y

Translation by 2 in X and 3 in Y directions would follow as =

X' = X + tx Y' = Y + ty

Scaling Matrix would be:

|X'| |2 0| |X|
|Y'|=|0 2|* |Y|

Translation Matrix would be:

|X'| |2 0| |X|
|Y'|=|0 3|* |Y|

And now to combine the two matrices in some way?

Please, please PLEASE any help would be great.

Many thanks.

:roll:


Top
 Profile  
 
 Post subject:
PostPosted: Thu, 19 Aug 2010 05:50:20 UTC 
Offline
Member of the 'S.O.S. Math' Hall of Fame
User avatar

Joined: Mon, 23 Feb 2009 23:20:33 UTC
Posts: 1049
Location: Adelaide, Australia
Usually, two transformation matrices are combined into one simply by multiplying them together.

Your scaling matrix works. Your translation matrix does not, and in fact it can't be done with a 2x2 matrix. You need a 3x3 matrix, and you need to add to the vector another component.

Scaling is a linear transformation, but translation is not. Therefore, in order to complete a translation, you will need to use homogeneous coordinates. Instead of writing the vector as (x,y), you need (x,y,1).

Have a look at this and this, then post again with another attempt.


Top
 Profile  
 
 Post subject:
PostPosted: Thu, 19 Aug 2010 12:17:35 UTC 
Offline
S.O.S. Newbie

Joined: Wed, 18 Aug 2010 19:35:33 UTC
Posts: 2
Thank you for taking the time to reply to my enquiry aswoods, I really appreciate it.

Would I be correct in saying that the translation matrix would be like this:

| X' | |2 0 0| | X |
| Y' | |0 3 0| | Y |
| 1 | |0 0 1| | 1 |


If so, how do I now derive a single matrix to undertake the scaling and the translation?

Cheers again for the help so far mate. :D


Top
 Profile  
 
 Post subject:
PostPosted: Thu, 19 Aug 2010 14:16:48 UTC 
Offline
Member of the 'S.O.S. Math' Hall of Fame
User avatar

Joined: Mon, 23 Feb 2009 23:20:33 UTC
Posts: 1049
Location: Adelaide, Australia
You need more practice with matrix multiplication! If you multiply that matrix with the vector (x,y,1), you get (2x,3y,1) -- which is obviously not what you want. You want the result to be (2x+2, 2y+3, 1).

The articles I linked to say that scaling by a factor of k looks like this:

\begin{bmatrix}x'\\y'\\1\end{bmatrix}=\begin{bmatrix}k&0&0\\0&k&0\\0&0&1\end{bmatrix}\begin{bmatrix}x\\y\\1\end{bmatrix}

Translation by (p,q) looks like this:

\begin{bmatrix}x'\\y'\\1\end{bmatrix}=\begin{bmatrix}1&0&p\\0&1&q\\0&0&1\end{bmatrix}\begin{bmatrix}x\\y\\1\end{bmatrix}

Multiply them both out to confirm that this works.

Now, to combine them you can multiply the matrices. If you do A first, then B, then you need it to look like this: B(Av) because you are applying A first, to get Av, then applying B to get B(Av). So the matrix which does both in one go is BA. (If you did B first, then A, it would be AB.)

You will find that the resulting matrix BA (when A is the scaling, and B is the translation) is pretty simple.

\begin{bmatrix}x'\\y'\\1\end{bmatrix}=\begin{bmatrix}k&0&p\\0&k&q\\0&0&1\end{bmatrix}\begin{bmatrix}x\\y\\1\end{bmatrix}

Multiply out the right-hand side to check that it works.

Also, check if you are supposed to use homogeneous coordinates in the exam. Maybe they have something different in mind.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Contact Us | S.O.S. Mathematics Homepage
Privacy Statement | Search the "old" CyberBoard

users online during the last hour
Powered by phpBB © 2001, 2005-2011 phpBB Group.
Copyright © 1999-2013 MathMedics, LLC. All rights reserved.
Math Medics, LLC. - P.O. Box 12395 - El Paso TX 79913 - USA