Skip to content
The Lumenary

Practice · Grades 9–12

Composition

Composition

Warm-upHuman

Let f(x)=x+3f(x) = x + 3 and g(x)=x2g(x) = x^2. Compute (g∘f)(2)(g \circ f)(2).

Composition

Warm-upHuman

If f:A→Bf : A \to B and g:B→Cg : B \to C, what are the domain and codomain of g∘fg \circ f?

Choose one

Composition

CoreHuman

Let f(x)=3xf(x) = 3x and g(x)=x−2g(x) = x - 2. Compute (g∘f)(4)−(f∘g)(4)(g \circ f)(4) - (f \circ g)(4).

Composition

StretchHuman

Suppose g∘fg \circ f is injective. Which of these must be true? (Choose all that apply.)

Choose all that apply

Composition

CoreFormal

In Lean, comp_assoc is proved by rfl. What does that tell us?

Choose one

Composition

StretchComputational

Finite functions can be stored as dictionaries. Write compose(g, f) returning a dictionary for g∘fg \circ f (apply f first!). You may assume every value of f is a key of g.

Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.