Example

Example: Computing (fg)(x)(f \circ g)(x) and (gf)(x)(g \circ f)(x) for f(x)=4x5f(x) = 4x - 5 and g(x)=2x+3g(x) = 2x + 3

Given f(x)=4x5f(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 (fg)(x)(f \circ g)(x), use the definition (fg)(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+1258x + 12 - 5, which simplifies to (fg)(x)=8x+7(f \circ g)(x) = 8x + 7.

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

Notice that (fg)(x)=8x+7(f \circ g)(x) = 8x + 7 and (gf)(x)=8x7(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-05-26

Contributors are:

Who are from:

Tags

OpenStax

Intermediate Algebra @ OpenStax

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

Algebra

Related
Learn After