Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Function (mathematics)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Function composition === {{Main|Function composition}} Given two functions <math>f: X\to Y</math> and <math>g: Y\to Z</math> such that the domain of {{mvar|g}} is the codomain of {{mvar|f}}, their ''composition'' is the function <math>g \circ f: X \rightarrow Z</math> defined by <math display="block">(g \circ f)(x) = g(f(x)).</math> That is, the value of <math>g \circ f</math> is obtained by first applying {{math|''f''}} to {{math|''x''}} to obtain {{math|1=''y'' = ''f''(''x'')}} and then applying {{math|''g''}} to the result {{mvar|y}} to obtain {{math|1=''g''(''y'') = ''g''(''f''(''x''))}}. In this notation, the function that is applied first is always written on the right. The composition <math>g\circ f</math> is an [[operation (mathematics)|operation]] on functions that is defined only if the codomain of the first function is the domain of the second one. Even when both <math>g \circ f</math> and <math>f \circ g</math> satisfy these conditions, the composition is not necessarily [[commutative property|commutative]], that is, the functions <math>g \circ f</math> and <math> f \circ g</math> need not be equal, but may deliver different values for the same argument. For example, let {{math|1=''f''(''x'') = ''x''<sup>2</sup>}} and {{math|1=''g''(''x'') = ''x'' + 1}}, then <math>g(f(x))=x^2+1</math> and <math> f(g(x)) = (x+1)^2</math> agree just for <math>x=0.</math> The function composition is [[associative property|associative]] in the sense that, if one of <math>(h\circ g)\circ f</math> and <math>h\circ (g\circ f)</math> is defined, then the other is also defined, and they are equal, that is, <math>(h\circ g)\circ f = h\circ (g\circ f).</math> Therefore, it is usual to just write <math>h\circ g\circ f.</math> The [[identity function]]s <math>\operatorname{id}_X</math> and <math>\operatorname{id}_Y</math> are respectively a [[right identity]] and a [[left identity]] for functions from {{mvar|X}} to {{mvar|Y}}. That is, if {{mvar|f}} is a function with domain {{mvar|X}}, and codomain {{mvar|Y}}, one has <math>f\circ \operatorname{id}_X = \operatorname{id}_Y \circ f = f.</math> <gallery widths="250" heights="300"> File:Function machine5.svg|A composite function ''g''(''f''(''x'')) can be visualized as the combination of two "machines". File:Example for a composition of two functions.svg|A simple example of a function composition File:Compfun.svg|Another composition. In this example, {{math|1=(''g''βββ''f''β)(c) = #}}. </gallery>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)