# Transformations of Quadratic Functions

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

## Transformations of Quadratic Functions

### Translation

By adding some number to every function value, $g(x) = f(x) + k,$ its graph is translated vertically. To instead translate it horizontally, a number is subtracted from the input of the function rule. $g(x) = f(x - h)$ The number $h$ is subtracted and not added, so that a positive $h$ translates the graph to the right.

Notice that if the quadratic function $f(x) = ax^2$ is translated both vertically and horizontally, the resulting function is $g(x) = a(x - h)^2 + k.$ This is exactly the vertex form of a quadratic function. The vertex of $f(x) = ax^2$ is located at $(0,0).$ When the graph is then translated $h$ units horizontally and $k$ units vertically, the vertex moves to $(h, k).$

### Reflection

A function is reflected in the $x$-axis by changing the sign of all function values: $g(x) = \text{-} f(x).$ Graphically, all points on the graph move to the opposite side of the $x$-axis, while maintaining their distance to the $x$-axis.

A graph is instead reflected in the $y$-axis, moving all points on the graph to the opposite side of the $y$-axis, by changing the sign of the input of the function. $g(x) = f(\text{-} x)$ Note that the $y$-intercept is preserved.

### Stretch and Shrink

A function graph is vertically stretched or shrunk by multiplying the function rule by some constant $a > 0$: $g(x) = a \cdot f(x).$ All vertical distances from the graph to the $x$-axis are changed by the factor $a.$ Thus, preserving any $x$-intercepts.

By instead multiplying the input of a function rule by some constant $a > 0,$ $g(x) = f(a \cdot x),$ its graph will be horizontally stretched or shrunk by the factor $\frac 1 a.$ Since the $x$-value of $y$-intercepts is $0,$ they are not affected by this transformation.

## 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*