# Combine Scaling and Translation Matrices

• Aug 18th 2010, 07:30 AM
MINTY1974
Combine Scaling and Translation Matrices
Hello all,

I am revising for a maths resit paper taking place next week and could really do with some help regarding this past paper question.

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?

Once again, ANY help would be great.

Cheers (Happy)
• Aug 21st 2010, 09:02 PM
WolfTecc
Math.
Your scaling matrix looks good, but your "translation" matrix is actually still a scaling matrix. To translate $\begin{pmatrix}
x \\
y
\end{pmatrix}
$
by
$\begin{pmatrix}
2 \\
3
\end{pmatrix}
$
$\begin{pmatrix}

x \\
y
\end{pmatrix}
+ \begin{pmatrix}

2 \\
3
\end{pmatrix} =
\begin{pmatrix}

x + 2\\
y + 3
\end{pmatrix}
$

Alright, so given some (x,y) pair, you're going to scale x by 2 and then translate by 2. So
$x' = 2x + 2$
and likewise,
$y' = 2y + 3$
So we know our solution should look something like this, but we don't have the answer in matrix form.

You're right that we need to combine the two operations--to accomplish this, just do one after the other. First scale, then translate.

$\begin{pmatrix}

2 & 0\\
0 & 2
\end{pmatrix} \begin{pmatrix}

x \\
y
\end{pmatrix}
+ \begin{pmatrix}

2 \\
3
\end{pmatrix} =
\begin{pmatrix}
2x \\
2y
\end{pmatrix}
+ \begin{pmatrix}

2 \\
3
\end{pmatrix} = \begin{pmatrix}
2x + 2\\
2y + 3
\end{pmatrix}
$

And look, this is the same as the equations for $x'$ and $y'$ given above. Hopefully this helps.