• Skip to primary navigation
  • Skip to main content
  • Skip to footer
Basic Mathematics
  • ⌕
Composite Functions and the Order of Substitution

Composite Functions and the Order of Substitution

Written by Jean Carlos Novaes

A composite function sends the output of one function into another. In f composed with g, apply g first and then f. The composition symbol records the order of those steps. It does not ask you to multiply the two outputs.

(f∘g)(x)=f(g(x))

Apply the inner function before the outer function

Take f to be the rule that doubles its input and adds 1. Let g square its input. Applying g to 3 gives 9. Applying f to 9 gives 19. In the reverse order, f first gives 7 and g then gives 49. Both computations are allowed, but they give different results.

f(x)=2x+1
g(x)=x2
(f∘g)(3)=f(9)=19
(g∘f)(3)=g(7)=49

The same distinction holds when the input is a variable. Replacing the input of f by the entire expression for g squares x before doubling. Replacing the input of g by the expression for f squares the whole sum instead. Keep the parentheses until you know which operations apply to which terms.

An allowed first input can still lead to an invalid second input

Let g subtract 4, and let f take a real square root. The rule g can take any real input, but its output must be nonnegative for f. The composition therefore starts at x equal to 4. At that endpoint, g gives zero and the square root is zero. For x equal to 3, g gives negative one and the composition has no real value.

f(g(x))=x−4
x−4≥0⟹x≥4

This is why the domain comes from both rules. Check the input of the inner function first. Then check whether its output belongs to the domain of the outer function.

Related content

  • Functions, Domain, Codomain and Range
  • Inverse Functions, Domains and How to Find the Rule
Jean Carlos Novaes

About Jean Carlos Novaes

I hold a degree in Computer Science from the Federal University of Bahia (2017) and I am the editor and founder of this website.

Footer

Basic Mathematics

Basic Mathematics website with clear school content for elementary and high school students. Learn easily and efficiently!

ABOUT

  • About Us
  • Contact
  • Site Map

LEGAL

  • How to Cite
  • Cookie Policy
  • Privacy Policy
  • Content License
English
  • Portuguese (Português)
  • Danish (Dansk)
  • German (Deutsch)
  • English
  • Spanish (Español)
  • Finnish (Suomi)
  • French (Français)
  • Italian (Italiano)
  • Dutch (Nederlands)
  • Norwegian (Norsk)
  • Polish (Polski)
  • Portuguese (Portugal)
  • Swedish (Svenska)

© 2015–2026 · Basic Mathematics · All rights reserved.