Example

Example: Computing (f∘g)(x)(f \circ g)(x) and (g∘f)(x)(g \circ f)(x) for f(x)=4x−5f(x) = 4x - 5 and g(x)=2x+3g(x) = 2x + 3

Given f(x)=4x−5f(x) = 4x - 5 and g(x)=2x+3g(x) = 2x + 3, this example demonstrates how to compute both compositions and shows that their results differ.

ⓐ To find (f∘g)(x)(f \circ g)(x), use the definition (f∘g)(x)=f(g(x))(f \circ g)(x) = f(g(x)). Substitute g(x)=2x+3g(x) = 2x + 3 into ff to get f(2x+3)=4(2x+3)−5f(2x + 3) = 4(2x + 3) - 5. Distribute to obtain 8x+12−58x + 12 - 5, which simplifies to (f∘g)(x)=8x+7(f \circ g)(x) = 8x + 7.

ⓑ To find (g∘f)(x)(g \circ f)(x), use the definition (g∘f)(x)=g(f(x))(g \circ f)(x) = g(f(x)). Substitute f(x)=4x−5f(x) = 4x - 5 into gg to get g(4x−5)=2(4x−5)+3g(4x - 5) = 2(4x - 5) + 3. Distribute to obtain 8x−10+38x - 10 + 3, which simplifies to (g∘f)(x)=8x−7(g \circ f)(x) = 8x - 7.

Notice that (f∘g)(x)=8x+7(f \circ g)(x) = 8x + 7 and (g∘f)(x)=8x−7(g \circ f)(x) = 8x - 7 yield different results. This illustrates that function composition is generally not commutative — the order in which functions are composed matters.

0

1

Updated 2026-06-17

Contributors are:

Who are from:

Tags

OpenStax

Intermediate Algebra @ OpenStax

Ch.10 Exponential and Logarithmic Functions - Intermediate Algebra @ OpenStax

Algebra

Related
Learn After