# Describing Transformations of Linear Functions

### {{ 'ml-heading-theory' | message }}

## Function Families

## Types of Transformations

The table below shows different types of transformations a function can undergo. Notice the corresponding function notation, where $f(x)$ is the original function and $g(x)$ is the transformed function.

Transformation | Function Notation |
---|---|

Vertical Translation | $g(x)=f(x){\color{#0000FF}{\vphantom{ }+k}}$ |

Horizontal Translation | $g(x)=f(x{\color{#0000FF}{\vphantom{ }-h}})$ |

Reflection in the $x$-axis | $g(x)={\color{#0000FF}{\text{-}}}f(x)$ |

Reflection in the $y$-axis | $g(x)=f({\color{#0000FF}{\text{-} }}x)$ |

Vertical Stretch and Shrink | $g(x)={\color{#0000FF}{a \cdot\vphantom{ }}}f(x)$ |

Horizontal Stretch and Shrink | $g(x)=f({\color{#0000FF}{a \cdot\vphantom{ }}}x)$ |

## Translation

A translation is a transformation that moves a graph in some direction, without any rotation, shrinking, stretching, etc. A function's graph is *vertically translated* by adding some number to the function rule. Generally, this is written as
$g(x) = f(x) + k,$
where $k$ is some number defining the vertical translation, and $g(x)$ is the translated function. A positive $k$ increases the value of the function for every $x,$ moving the graph upward. Similarly, a negative $k$ moves the graph downward.

A function's graph is *horizontally translated* by instead subtracting some number from the input of the function rule. In function notation, this is written as
$g(x) = f(x - h),$
where $h$ is some number giving the horizontal translation. A positive $h$ reduces the input value, $x - h,$ making it as though every $x$-value is smaller than it really is. Thus, greater $x$-values are needed to get the same result, leading to a translation to the right. Similarly, a negative $h$ gives a translation to the left.

## Reflection

A reflection is a transformation that flips a graph over some line. This line is called the *line of reflection*, and is commonly either the $x$- or $y$-axis. A reflection in the $x$-axis is achieved by changing the sign of the $y$-coordinate of every point on the graph. Algebraically, this is expressed as
$g(x) = \text{-} f(x).$
The $y$-coordinate of all $x$-intercepts is $0.$ Thus, changing the sign of the function value at $x$-intercepts makes no difference — any $x$-intercepts are preserved when a graph is reflected in the $x$-axis.

A reflection in the $y$-axis is instead achieved by changing the sign of every input value. $g(x) = f(\text{-} x)$ When $x = 0,$ which is at any $y$-intercept, this reflection doesn't affect the input value. Thus, $y$-intercepts are preserved by reflections in the $y$-axis.

## Vertical Stretch and Shrink

A function graph can be vertically stretched or shrunk by multiplying the function rule by some factor $a > 0.$ Algebraically, $g(x) = a \cdot f(x).$ The vertical distance between the graph and the $x$-axis will then change by the factor $a$ at every point on the graph. If $a > 1,$ this will lead to the graph being stretched vertically. Similarly, $a < 1$ leads to the graph being shrunk vertically. Note that $x$-intercepts have the function value $0.$ Thus, they are not affected by this transformation.

## Horizontal Stretch and Shrink

By multiplying the input of a function by a factor $a > 0,$ its graph can be horizontally stretched or shrunk. $g(x) = f(a \cdot x)$ If $a > 1,$ every input value will be changed as though it was further away from $x = 0$ than it really is. This leads to the graph being shrunk horizontally — every part of the graph is moved closer to the $y$-axis. In the same fashion, $a < 1$ leads to a horizontal stretch. The horizontal distance between the graph and the $y$-axis is changed by a factor of $\frac 1 a.$

## Exercises

*settings_overscan*

## {{ 'ml-heading-exercise' | message }} {{ focusmode.exercise.exerciseName }}

*keyboard_backspace*

{{ 'ml-tooltip-premium-exercise' | message }}

{{ 'ml-tooltip-recommended-exercise' | message }}

Programmeringsuppgift | {{ 'course' | message }} {{ exercise.course }}

*keyboard_backspace*{{ 'ml-btn-previous' | message }}

*keyboard_backspace*