---
title: "f(g(x)) — AP Precalculus Definition & Exam Guide"
description: "f(g(x)) means the output of g becomes the input of f. Master composition for AP Precalc Topic 2.7, including domain restrictions and why order matters."
canonical: "https://fiveable.me/ap-pre-calc/key-terms/f-g-x"
type: "key-term"
subject: "AP Pre-Calculus"
unit: "Unit 2"
---

# f(g(x)) — AP Precalculus Definition & Exam Guide

## Definition

f(g(x)), also written (f ∘ g)(x), is the composition of functions f and g, where you substitute g(x) for every x in f. In AP Precalculus, the output of g becomes the input of f, and the domain is limited to inputs of g whose outputs land in the domain of f.

## What It Is

f(g(x)) is the notation for a **[composite function](/ap-pre-calc/key-terms/composite-function "fv-autolink")**, where two functions get chained together. You feed x into g first, then feed g's [output](/ap-pre-calc/unit-1/change-tandem/study-guide/eQFiTo22fpkDFsnj "fv-autolink") into f. That's the whole idea. The notation (f ∘ g)(x) means exactly the same thing, and the AP exam uses both interchangeably.

Think of it as an assembly line. The function g does its job on x, then hands the result to f, which finishes the work. Because f only accepts inputs in its own [domain](/ap-pre-calc/key-terms/domain "fv-autolink"), the domain of f(g(x)) is restricted to x-values where g(x) actually lands in f's domain (EK 2.7.A.1). To build f(g(x)) analytically, you substitute the entire expression for g(x) everywhere an x appears in f (EK 2.7.B.2). So if f(x) = 2x - 3 and g(x) = x² + 1, then f(g(x)) = 2(x² + 1) - 3.

## Why It Matters

This notation lives in **Topic 2.7 (Composition of Functions)** in [Unit 2](/ap-pre-calc/unit-2 "fv-autolink"), and it supports three learning objectives. You evaluate compositions from formulas, tables, or graphs ([AP Pre Calc](/ap-pre-calc "fv-autolink") 2.7.A), construct a composition analytically, numerically, or graphically (AP Pre Calc 2.7.B), and run the process in reverse by decomposing a complicated function into simpler pieces (AP Pre Calc 2.7.C). Composition is also the secret machinery behind function transformations. A horizontal translation or dilation of f is really just f composed with g(x) = x + k or g(x) = kx (EK 2.7.C.2 and 2.7.C.3). And per EK 2.7.B.1, composition is how you relate two quantities that don't share a direct formula, which is a favorite setup for modeling questions.

## Connections

### [Function Composition (Unit 2)](/ap-pre-calc/key-terms/function-composition)

f(g(x)) is the notation; [function composition](/ap-pre-calc/key-terms/function-composition "fv-autolink") is the operation it represents. The full Topic 2.7 study guide covers evaluating, constructing, and interpreting compositions, and this notation is how every one of those skills gets written down.

### [Function Decomposition (Unit 2)](/ap-pre-calc/key-terms/function-decomposition)

Decomposition is [composition](/ap-pre-calc/unit-2/inverse-functions/study-guide/JkTPSAR9TH5LfSXP "fv-autolink") run backward. Given something like h(x) = √(3x + 1), you identify an inner function g(x) = 3x + 1 and an outer function f(x) = √x so that h(x) = f(g(x)). The AP exam loves asking you to spot the inner and outer pieces (AP Pre Calc 2.7.C).

### Multiplicative Transformations and Horizontal Dilation (Unit 2)

Every transformation you learned in [Unit 1](/ap-pre-calc/unit-1 "fv-autolink") is secretly a composition. f(2x) is f composed with g(x) = 2x, which produces a horizontal dilation. Seeing transformations this way explains why horizontal changes happen 'inside' the function, since the inner function acts on x before f ever sees it.

### Inverse Functions (Unit 2)

Composition is the test for inverses. If f and g undo each other, then f(g(x)) = g(f(x)) = x. This is one of the rare cases where composing in either order gives the same result, which is exactly what some multiple-choice questions probe.

## On the AP Exam

Composition shows up in several recurring multiple-choice formats. You'll evaluate f(g(x)) at a specific value, sometimes pulling values from a table or graph instead of a formula (that's EK 2.7.A.2, and it trips up anyone who only practices with equations). You'll compare f ∘ g against g ∘ f and recognize that order usually changes the result. You'll hunt for domain restrictions, like finding the x-value where (f ∘ g)(x) is undefined because g's output hits a value f can't accept, such as a denominator becoming zero. And you'll interpret a composition like f(g(x)) with f(x) = |x| and g(x) = (1/2)x as a transformation of a graph. On free-response modeling questions, composition is the move when one quantity depends on a second quantity that depends on a third, so practice writing the chain explicitly.

## f(g(x)) vs g(f(x))

Order matters in composition. f(g(x)) puts g on the inside (g runs first), while g(f(x)) puts f on the inside (f runs first). With f(x) = 2x - 3 and g(x) = x² + 1, you get f(g(x)) = 2x² - 1 but g(f(x)) = 4x² - 12x + 10. Those are different functions with different graphs. The only common case where the two compositions match for all x is when f and g are inverses, and then both equal x.

## Key Takeaways

- f(g(x)) and (f ∘ g)(x) are two notations for the same thing, the composition where g's output becomes f's input.
- To build f(g(x)) analytically, substitute the entire expression g(x) for every x in f's formula.
- The domain of f(g(x)) only includes x-values where g(x) is defined AND g(x) lands inside the domain of f.
- Composition is not commutative, so f(g(x)) and g(f(x)) are usually different functions; they agree for all x only when f and g are inverses.
- You can evaluate compositions from tables and graphs, not just formulas, by reading g's output and using it as f's input.
- Transformations are compositions in disguise, since composing f with g(x) = x + k gives a translation and composing with g(x) = kx gives a dilation.

## FAQs

### What does f(g(x)) mean in AP Precalculus?

It's the composition of f and g, where you plug x into g first and then plug that result into f. Analytically, you substitute g(x) for every x in f's formula, so if f(x) = 2x - 3 and g(x) = x² + 1, then f(g(x)) = 2(x² + 1) - 3.

### Is f(g(x)) the same as f(x) times g(x)?

No. f(x)·g(x) multiplies two outputs together, while f(g(x)) chains the functions so one's output becomes the other's input. With f(x) = 2x - 3 and g(x) = x² + 1, the product is (2x - 3)(x² + 1) but the composition is 2x² - 1. Completely different results.

### How is f(g(x)) different from g(f(x))?

The inner function runs first. In f(g(x)) you apply g, then f; in g(f(x)) you apply f, then g. They usually produce different functions, and the special case where they're equal for all x means f and g are inverse functions.

### How do you find the domain of f(g(x))?

Per EK 2.7.A.1, keep only the x-values where g(x) is defined and where g's output is in the domain of f. For example, if f(x) = x/(x - 2) and g(x) = x + 3, then f(g(x)) is undefined where g(x) = 2, which happens at x = -1.

### Does f(g(x)) show up on the AP Precalc exam?

Yes, it's the core of Topic 2.7 and supports learning objectives 2.7.A through 2.7.C. Expect multiple-choice questions on evaluating compositions from formulas, tables, or graphs, finding where a composition is undefined, and decomposing a function into inner and outer pieces.

## Related Study Guides

- [2.7 Composition of Functions](/ap-pre-calc/unit-2/composition-functions/study-guide/glFlt2HgsCSjvjSL)

## Structured Data

```json
{"@context":"https://schema.org","@graph":[{"@type":"LearningResource","@id":"https://fiveable.me/ap-pre-calc/key-terms/f-g-x#resource","name":"f(g(x)) — AP Precalculus Definition & Exam Guide","url":"https://fiveable.me/ap-pre-calc/key-terms/f-g-x","learningResourceType":"Concept explainer","educationalLevel":"AP® / High School","about":{"@id":"https://fiveable.me/ap-pre-calc/key-terms/f-g-x#term"},"audience":{"@type":"EducationalAudience","educationalRole":"student"},"dateModified":"2026-06-11T05:27:28.654Z","isPartOf":{"@type":"Collection","name":"AP Pre-Calculus Key Terms","url":"https://fiveable.me/ap-pre-calc/key-terms"},"publisher":{"@type":"Organization","name":"Fiveable","url":"https://fiveable.me"}},{"@type":"DefinedTerm","@id":"https://fiveable.me/ap-pre-calc/key-terms/f-g-x#term","name":"f(g(x))","description":"f(g(x)), also written (f ∘ g)(x), is the composition of functions f and g, where you substitute g(x) for every x in f. In AP Precalculus, the output of g becomes the input of f, and the domain is limited to inputs of g whose outputs land in the domain of f.","url":"https://fiveable.me/ap-pre-calc/key-terms/f-g-x","inDefinedTermSet":{"@type":"DefinedTermSet","name":"AP Pre-Calculus Key Terms","url":"https://fiveable.me/ap-pre-calc/key-terms"}},{"@type":"FAQPage","mainEntity":[{"@type":"Question","name":"What does f(g(x)) mean in AP Precalculus?","acceptedAnswer":{"@type":"Answer","text":"It's the composition of f and g, where you plug x into g first and then plug that result into f. Analytically, you substitute g(x) for every x in f's formula, so if f(x) = 2x - 3 and g(x) = x² + 1, then f(g(x)) = 2(x² + 1) - 3."}},{"@type":"Question","name":"Is f(g(x)) the same as f(x) times g(x)?","acceptedAnswer":{"@type":"Answer","text":"No. f(x)·g(x) multiplies two outputs together, while f(g(x)) chains the functions so one's output becomes the other's input. With f(x) = 2x - 3 and g(x) = x² + 1, the product is (2x - 3)(x² + 1) but the composition is 2x² - 1. Completely different results."}},{"@type":"Question","name":"How is f(g(x)) different from g(f(x))?","acceptedAnswer":{"@type":"Answer","text":"The inner function runs first. In f(g(x)) you apply g, then f; in g(f(x)) you apply f, then g. They usually produce different functions, and the special case where they're equal for all x means f and g are inverse functions."}},{"@type":"Question","name":"How do you find the domain of f(g(x))?","acceptedAnswer":{"@type":"Answer","text":"Per EK 2.7.A.1, keep only the x-values where g(x) is defined and where g's output is in the domain of f. For example, if f(x) = x/(x - 2) and g(x) = x + 3, then f(g(x)) is undefined where g(x) = 2, which happens at x = -1."}},{"@type":"Question","name":"Does f(g(x)) show up on the AP Precalc exam?","acceptedAnswer":{"@type":"Answer","text":"Yes, it's the core of Topic 2.7 and supports learning objectives 2.7.A through 2.7.C. Expect multiple-choice questions on evaluating compositions from formulas, tables, or graphs, finding where a composition is undefined, and decomposing a function into inner and outer pieces."}}]},{"@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"AP Pre-Calculus","item":"https://fiveable.me/ap-pre-calc"},{"@type":"ListItem","position":2,"name":"Key Terms","item":"https://fiveable.me/ap-pre-calc/key-terms"},{"@type":"ListItem","position":3,"name":"Unit 2","item":"https://fiveable.me/ap-pre-calc/unit-2"},{"@type":"ListItem","position":4,"name":"f(g(x))"}]}]}
```
