03.4matrixtransform1

# Transformations with Matrices

We can use matrices to represent and manipulate the transformations we have been performing on graphs.

.

## Notation

If we start with a set of points $(x, \; y)$

Then we transform them using a process, T, to get a new set of points $(x’, \; y’)$
… … (sometimes called the image)

We can show this in matrix notation as:

… … $\left[ \begin{matrix} x' \\ y' \\ \end{matrix} \right] = T \left( \left[ \begin{matrix} x \\ y \\ \end{matrix} \right] \right)$

.

## Reflections and Dilations

Reflections and Dilations are obtained by multiplying $\left[ \begin{matrix} x \\ y \\ \end{matrix} \right]$ by a transformation matrix.

… … $T = \left[ \begin{matrix} 1&0 \\ 0&1 \\ \end{matrix} \right]$ … causes no change at all

This would be written as:

… … $\left[ \begin{matrix} x' \\ y' \\ \end{matrix} \right] = \left[ \begin{matrix} 1&0 \\ 0&1 \\ \end{matrix} \right] \, \left[ \begin{matrix} x \\ y \\ \end{matrix} \right]$

so {by multiplying matrices}

… … $\left[ \begin{matrix} x' \\ y' \\ \end{matrix} \right] = \left[ \begin{matrix} x \\ y \\ \end{matrix} \right]$

or
… … $x' = x$ … and
… … $y' = y$ … … {ie no change}

• Remember that the matrix shown here is called the Identity Matrix (or I)
• For any matrix, A, it follows from the definition of I that I × A = A

.

## Reflections

.
… … $\left[ \begin{matrix} -1&0 \\ 0&1 \\ \end{matrix} \right]$ … causes a reflection in the x direction (across the y-axis or on the y-axis)
.
… … $\left[ \begin{matrix} 1&0 \\ 0&-1 \\ \end{matrix} \right]$ … causes a reflection in the y direction (across the x-axis or on the x-axis)}

.

A reflection in the x-direction (across the y-axis or on the y-axis) could be written as:

… … $\left[ \begin{matrix} x' \\ y' \\ \end{matrix} \right] = \left[ \begin{matrix} -1&0 \\ 0&1 \\ \end{matrix} \right] \, \left[ \begin{matrix} x \\ y \\ \end{matrix} \right]$
.

so {by multiplying matrices}

… … $\left[ \begin{matrix} x' \\ y' \\ \end{matrix} \right] = \left[ \begin{matrix} -x \\ y \\ \end{matrix} \right]$

or
… … $x' = -x$ … and
… … $y' = y$

For example, if we start with the point $(5, \; 3)$

under this transformation, the image is $(-5, \; 3)$
.

Compare this to starting with the standard cubic graph of $y = x^3$

under this transformation, the image is $y' = (-x')^3$

.

## Dilations

.
… … $\left[ \begin{matrix} a&0 \\ 0&1 \\ \end{matrix} \right]$ … causes a dilation by a factor of a in the x direction (from the y-axis)
.
… … $\left[ \begin{matrix} 1&0 \\ 0&a \\ \end{matrix} \right]$ … causes a dilation by a factor of a in the y direction (from the x-axis) }

.

For example:
… … $\left[ \begin{matrix} x' \\ y' \\ \end{matrix} \right] = \left[ \begin{matrix} 3&0 \\ 0&1 \\ \end{matrix} \right] \left[ \begin{matrix} x \\ y \\ \end{matrix} \right]$
.
… … $\left[ \begin{matrix} x' \\ y' \\ \end{matrix} \right] = \left[ \begin{matrix} 3x \\ y \\ \end{matrix} \right]$
.
This represents a dilation by a factor of 3 in the x direction (all x-values are multiplied by 3).
.

This transformation could be written as:

… … $T \left( \left[ \begin{matrix} x \\ y \\ \end{matrix} \right] \right) = \left[ \begin{matrix} 3x \\ y \\ \end{matrix} \right]$

or
… … $x' = 3x$ .. and
… … $y' = y$

For example, if we start with the point $(5, \; 3)$

under this transformation, the image is $(15, \; 3)$
.

Compare this to starting with the cubic graph $y = x^3$

under this transformation, the image is: $y' = \big( \frac{1}{3}x' \big)^3$
.

• Remember that $y = f(nx)$ causes a dilation by a factor of $\frac{1}{n}$ in the x direction (from the y-axis)}

.

Note:
We can arrive at the new equation alegbraically by making x the subject and substituting:

… … $y' = y$ … and
… … $y = x^3$ so:

… … $y' = x^3$

but
… … $x = \frac{1}{3}x'$

so:
… … $y' = \big( \frac{1}{3}x' \big)^3$

.

In function notation, this transformation could be written as:

… … $\big\{ T: R^2 \rightarrow R^2, \;\; T(x,\;y) \rightarrow (3x,\; y) \big\}$

or in shorthand as:

… … $(x',\;y') \rightarrow (3x,\; y)$
.

• Read the arrow as "maps onto".
• Don't confuse it with the arrow used in limits which means "approaches the limit".
• The domain and co-domain of R2 is because we are working in 2 dimensions (x, y)

.

## Combining Dilations and Reflections

These operations can be combined to cause more than one transformation.

For example, the transformation matrix $\left[ \begin{matrix} -2&0 \\ 0&3 \\ \end{matrix} \right]$ gives:

… … $\left[ \begin{matrix} x' \\ y' \\ \end{matrix} \right] = \left[ \begin{matrix} -2&0 \\ 0&3 \\ \end{matrix} \right] \, \left[ \begin{matrix} x \\ y \\ \end{matrix} \right]$

… … $\left[ \begin{matrix} x' \\ y' \\ \end{matrix} \right] = \left[ \begin{matrix} -2x \\ 3y \\ \end{matrix} \right]$

or

… … $T \left( \left[ \begin{matrix} x \\ y \\ \end{matrix} \right] \right) = \left[ \begin{matrix} -2x \\ 3y \\ \end{matrix} \right]$

or
… … $x' = -2x$ … and
… … $y' = 3y$

This represents

• a reflection in the x direction (across the y-axis) and
• a dilation by a factor of 2 in the x direction (away from the y-axis) and
• a dilation by a factor of 3 in the y direction (away from the x-axis).

For example, if we start with the point $(5, \; 3)$

under this transformation, the image is $(-10, \; 9)$
.

Compare this to starting with a standard cubic graph $y = x^3$

under this transformation, the image is: $y'=3 \big( -\frac{1}{2}x' \big)^3$

.

We can arrive at the new equation algebraically:

… … $y' = 3y$ … and
… … $y = x^3$
so:

… … $y' = 3x^3$

make x the subject of $x' = -2x$ gives us:

… … $x = -\frac{1}{2}x'$

so:

… … $y' = 3\big( -\frac{1}{2}x' \big)^3$

This equation could be simplified by moving the $-\frac{1}{2}$ out of the cube, so we get:

… … $y' = 3 \big( -\frac{1}{2} \big)^3 \big( x' \big)^3$

… … $y' = -\frac{3}{8} \big( x' \big)^3$

.

In function notation, this transformation could be written as:

… … $\big\{ T: R^2 \rightarrow R^2, \;\; T(x, \; y) \rightarrow (-2x, \; 3y) \big\}$
.

or in shorthand as

… … $(x', \; y') \rightarrow (-2x, \; 3y)$
.

• Read the arrow as “maps onto”.
• The domain of R2 is because we are working in 2 dimensions (x, y)

.

.