Skip to content

Chapter 2 — Functions and Dynamic Relations

2.5 — Geometry of the Space of Functions: Transformations of Graphs

There is no need to analyze a function again if one already knows, precisely, how the function it came from is deformed.


The catalog of §2.4 gathered six functions and analyzed them one by one. This section proposes the opposite: instead of repeating that analysis for each new function, we look for a few rules that allow us to predict, from a known prototype, the behavior of a function obtained by modifying it. Each rule is not a recipe to memorize but a proposition: an exact correspondence between the points of the original graph and those of the transformed graph.

Throughout the section, \(f\) is a function with domain contained in \(\mathbb{R}\), and each transformation defines a new function, which we call \(g\). Writing \(g(x) = f(x) + k\), for example, defines the function \(g\) that at each \(x\) of the domain of \(f\) equals \(f(x) + k\).


§1. Translations

Proposition (vertical translation). Let \(k \in \mathbb{R}\) and \(g(x) = f(x) + k\). Then \(\operatorname{Dom}(g) = \operatorname{Dom}(f)\) and

\[\operatorname{Gr}(g) = \{(x, y + k) \mid (x, y) \in \operatorname{Gr}(f)\}\]

Proof. The formula \(f(x) + k\) makes sense exactly where \(f(x)\) does, so the domains coincide. A point \((x, y')\) lies in \(\operatorname{Gr}(g)\) if and only if \(x \in \operatorname{Dom}(f)\) and \(y' = f(x) + k\). Writing \(y = y' - k\), this is equivalent to \(y = f(x)\), that is, to \((x, y) \in \operatorname{Gr}(f)\), with \(y' = y + k\). \(\blacksquare\)

The graph of \(g\) is that of \(f\) shifted vertically by \(k\) units, upward if \(k > 0\) and downward if \(k < 0\). The domain does not change, and the image shifts as a block: \(\operatorname{Img}(g) = \{y + k \mid y \in \operatorname{Img}(f)\}\).

Proposition (horizontal translation). Let \(h \in \mathbb{R}\) and \(g(x) = f(x - h)\). Then \(\operatorname{Dom}(g) = \{x_0 + h \mid x_0 \in \operatorname{Dom}(f)\}\) and

\[\operatorname{Gr}(g) = \{(x_0 + h, y) \mid (x_0, y) \in \operatorname{Gr}(f)\}\]

Proof. The formula \(f(x - h)\) makes sense exactly when \(x - h \in \operatorname{Dom}(f)\). Writing \(x_0 = x - h\), this says that \(x = x_0 + h\) with \(x_0 \in \operatorname{Dom}(f)\), which is the description of the domain. A point \((x, y)\) lies in \(\operatorname{Gr}(g)\) if and only if \(y = f(x - h) = f(x_0)\), that is, if and only if \((x_0, y) \in \operatorname{Gr}(f)\), with \(x = x_0 + h\). \(\blacksquare\)

It is worth pausing here, because the result contradicts a hasty reading of the formula: with \(h > 0\), \(f(x - h)\) shifts the graph to the right. The proof shows why. For the argument of \(f\) to equal \(x_0\), the new variable must equal \(x_0 + h\): the value that \(f\) took at \(x_0\), \(g\) takes \(h\) units further to the right. The sign reversal is not a convention to memorize, but the result of solving \(x - h = x_0\) for \(x\). Horizontal translation does not change the image, but it does shift the domain.

Reminder. \(f(x) + k\) shifts the graph vertically, upward if \(k > 0\). \(f(x - h)\) shifts it horizontally, to the right if \(h > 0\): the sign is reversed because one has to solve for \(x\).



§2. Scalings and reflections

The same kind of correspondence governs scalings. It is convenient to treat stretching, compression and reflection together, because they are the same operation, multiplying by a constant, and they differ only in the magnitude and sign of that constant.

Proposition (vertical scaling). Let \(c \in \mathbb{R}\) with \(c \neq 0\) and \(g(x) = c f(x)\). Then \(\operatorname{Dom}(g) = \operatorname{Dom}(f)\) and

\[\operatorname{Gr}(g) = \{(x, cy) \mid (x, y) \in \operatorname{Gr}(f)\}\]

Proof. The domains coincide, as in the vertical translation. A point \((x, y')\) lies in \(\operatorname{Gr}(g)\) if and only if \(y' = c f(x)\), that is, if and only if \(y' = cy\) with \((x, y) \in \operatorname{Gr}(f)\), where \(y = f(x)\). \(\blacksquare\)

If \(|c| > 1\), each ordinate is amplified and the graph is stretched vertically. If \(0 < |c| < 1\), each ordinate is reduced and the graph is compressed. If \(c < 0\), in addition to the scaling by \(|c|\), each ordinate changes sign. In particular, \(c = -1\) produces the reflection in the \(x\)-axis: the graph of \(-f(x)\) is \(\{(x, -y) \mid (x, y) \in \operatorname{Gr}(f)\}\).

Proposition (horizontal scaling). Let \(a \in \mathbb{R}\) with \(a \neq 0\) and \(g(x) = f(ax)\). Then \(\operatorname{Dom}(g) = \left\{\frac{x_0}{a} \mid x_0 \in \operatorname{Dom}(f)\right\}\) and

\[\operatorname{Gr}(g) = \left\{\left(\frac{x_0}{a}, y\right) \mid (x_0, y) \in \operatorname{Gr}(f)\right\}\]

Proof. The formula \(f(ax)\) makes sense exactly when \(ax \in \operatorname{Dom}(f)\). Writing \(x_0 = ax\), this says that \(x = \frac{x_0}{a}\) with \(x_0 \in \operatorname{Dom}(f)\). A point \((x, y)\) lies in \(\operatorname{Gr}(g)\) if and only if \(y = f(ax) = f(x_0)\), that is, \((x_0, y) \in \operatorname{Gr}(f)\), with \(x = \frac{x_0}{a}\). \(\blacksquare\)

Again a reversal appears, of the same kind as in the horizontal translation. If \(|a| > 1\), the graph is compressed horizontally: each point moves closer to the \(y\)-axis, because its new abscissa \(\frac{x_0}{a}\) is smaller in absolute value than \(x_0\). If \(0 < |a| < 1\), the graph is stretched. The effect of \(a\) in the horizontal direction is the inverse of the one the same magnitude produces in the vertical direction. The case \(a = -1\) gives the reflection in the \(y\)-axis: the graph of \(f(-x)\) is \(\{(-x_0, y) \mid (x_0, y) \in \operatorname{Gr}(f)\}\).

Reminder. Vertically, \(c f(x)\) stretches if \(|c| > 1\), compresses if \(|c| < 1\), and reflects in the \(x\)-axis if \(c < 0\). Horizontally, \(f(ax)\) compresses if \(|a| > 1\), stretches if \(|a| < 1\), and reflects in the \(y\)-axis if \(a < 0\): the effect is the inverse of the vertical one.



§3. Horizontal reflection and parity

Reflection in the \(y\)-axis is not foreign to what we have already studied: it is the same operation that appears in the definition of parity in §2.3, seen now as a transformation of the graph and not as a property of \(f\).

Proposition. Let \(f\) be a function with domain symmetric with respect to the origin. If \(f\) is even, the horizontal reflection \(f(-x)\) is the same function as \(f\), and its graph does not change. If \(f\) is odd, \(f(-x)\) is the same function as \(-f(x)\): the horizontal reflection coincides with the vertical one.

Proof. Since the domain is symmetric, \(-x \in \operatorname{Dom}(f)\) exactly when \(x \in \operatorname{Dom}(f)\), and the functions \(f(-x)\), \(f(x)\) and \(-f(x)\) have the same domain. If \(f\) is even, \(f(-x) = f(x)\) on all of that domain, and by the definition of equality in §2.2 they are the same function. If \(f\) is odd, \(f(-x) = -f(x)\) on all of the domain, and again they are the same function. \(\blacksquare\)

The proposition adds no fact about parity: it is a rereading of the definition of §2.3 in the language of this section. But it confirms, without appealing to intuition, something geometry anticipated: reflecting in the \(y\)-axis the graph of an even function is doing nothing to it, and for an odd function that reflection is equivalent to reflecting in the \(x\)-axis. It is, in miniature, the spirit of the whole section: a known property, rediscovered as a particular case of a more general rule.



§4. Composite transformations and the order of execution

A function rarely appears with a single transformation of the prototype; the usual thing is a combination of the form

\[g(x) = c f\big(a(x - h)\big) + k\]

with \(a \neq 0\). The following proposition describes at once the effect of the four parameters.

Proposition (general transformation). Let \(a, c, h, k \in \mathbb{R}\) with \(a \neq 0\), and \(g(x) = c f\big(a(x - h)\big) + k\). Then

\[\operatorname{Gr}(g) = \left\{\left(\frac{x_0}{a} + h, c y_0 + k\right) \mid (x_0, y_0) \in \operatorname{Gr}(f)\right\}\]

Proof. A point \((x, y)\) lies in \(\operatorname{Gr}(g)\) if and only if \(a(x - h) \in \operatorname{Dom}(f)\) and \(y = c f\big(a(x - h)\big) + k\). Let \(x_0 = a(x - h)\) and \(y_0 = f(x_0)\). Then \((x_0, y_0) \in \operatorname{Gr}(f)\), and solving, \(x = \frac{x_0}{a} + h\) and \(y = c y_0 + k\). Conversely, if \((x_0, y_0) \in \operatorname{Gr}(f)\) and \(x = \frac{x_0}{a} + h\), then \(a(x - h) = x_0\) lies in the domain of \(f\), and \(g(x) = c f(x_0) + k = c y_0 + k\), so that \(\left(\frac{x_0}{a} + h, c y_0 + k\right) \in \operatorname{Gr}(g)\). \(\blacksquare\)

The proof does not divide by \(c\), so it also holds for \(c = 0\): in that case \(g\) is the constant function \(k\) on its domain. And the proposition brings out two facts that are, in practice, the most common source of errors when graphing.

Horizontal and vertical transformations are independent. The new abscissa, \(\frac{x_0}{a} + h\), does not depend on \(y_0\), and the new ordinate, \(c y_0 + k\), does not depend on \(x_0\). That is why they can be treated as two separate processes.

Within each direction, order matters, and on the points it is always the same: first the scaling, then the translation. In the vertical direction, \(y_0 \mapsto c y_0 + k\) multiplies by \(c\) and then adds \(k\), the same order in which the formula writes the operations on \(f\). In the horizontal direction, \(x_0 \mapsto \frac{x_0}{a} + h\) divides by \(a\) and then adds \(h\), whereas the formula \(a(x - h)\) subtracts \(h\) first and multiplies by \(a\) afterwards: the order on the points is the reverse of the one in the formula. It is the same difference as between evaluating an expression and solving an equation for the variable: evaluating follows the order of the formula; solving runs through it backwards.

Example. Let \(g(x) = -2\sqrt{x - 1} + 3\), built on the prototype \(f(x) = \sqrt{x}\) of §2.4. Here \(a = 1\), with no horizontal scaling; \(h = 1\), a translation of one unit to the right; \(c = -2\), a vertical stretch by \(2\) with reflection in the \(x\)-axis; and \(k = 3\), a translation of three units upward. Since the domain of \(\sqrt{x}\) is \([0, \infty)\) and the horizontal part sends \(x_0\) to \(x_0 + 1\), the domain of \(g\) is \([1, \infty)\). The point \((0, 0)\) of the prototype, its left endpoint, goes to

\[\left(\frac{0}{1} + 1, -2 \cdot 0 + 3\right) = (1, 3)\]

and the point \((4, 2)\) goes to \((5, -1)\). Since \(\sqrt{x}\) is increasing, \(g\) is decreasing: if \(1 \le x_1 < x_2\), then \(\sqrt{x_1 - 1} < \sqrt{x_2 - 1}\), and multiplying by \(-2\) reverses the direction (§1.7), so that \(g(x_1) > g(x_2)\). Likewise, the image \([0, \infty)\) of \(\sqrt{x}\) is transformed into \(\{-2y + 3 \mid y \ge 0\} = (-\infty, 3]\). The highest value of \(g\) is \(g(1) = 3\), and since \(\sqrt{x}\) grows without bound (§2.4), \(g\) decreases without bound as \(x \to +\infty\).

The prototype f(x)=square root of x in dashed gray, and the transformation g(x)=-2*root(x-1)+3 in blue, with the control points (0,0)->(1,3) and (4,2)->(5,-1) connected by arrows

Figure 2.3 — The prototype \(f(x)=\sqrt{x}\) and its transformation \(g(x)=-2\sqrt{x-1}+3\), with the correspondence of points from the proposition of §4.

Reminder. Horizontal and vertical transformations are treated separately. In each direction, points are transformed first by the scaling and then by the translation; in the horizontal direction, that order is the reverse of the one in the formula.



What this section proves is that knowing a prototype well, with its domain, its image, its monotonicity and its symmetries, is equivalent to knowing an infinite family of functions related to it. There is no need to analyze \(-2\sqrt{x - 1} + 3\) from scratch with the methods of §2.2 and §2.3 if one already knows how \(\sqrt{x}\) behaves and how four numbers, \(a\), \(h\), \(c\) and \(k\), deform any graph exactly. It is perhaps the first time the book explicitly practices an economy of thought: not memorizing more cases, but reducing new cases to a known one.

With the prototypes transformable at will, the chapter turns to a second way of generating functions from known ones: not by deforming a single one, but by combining several. Algebraic operations and the composition of functions are the topic of the next section.