词条 | Function composition |
释义 |
In mathematics, function composition is an operation that takes two functions {{math|f}} and {{math|g}} and produces a function {{math|h}} such that {{math|1=h(x) = g(f(x))}}. In this operation, the function {{math|g}} is applied to the result of applying the function {{math|f}} to {{math|x}}. That is, the functions {{math|f : X → Y}} and {{math|g : Y → Z}} are composed to yield a function that maps {{math|x}} in {{math|X}} to {{math|g(f(x))}} in {{math|Z}}. Intuitively, if {{math|z}} is a function of {{math|y}}, and {{math|y}} is a function of {{math|x}}, then {{math|z}} is a function of {{math|x}}. The resulting composite function is denoted {{math|g ∘ f : X → Z}}, defined by {{math|1=(g ∘ f )(x) = g(f(x))}} for all {{math|x}} in {{math|X}}.[1] The notation {{math|g ∘ f}} is read as "{{math|g}} circle {{math|f}} ", "{{math|g}} round {{math|f}} ", "{{math|g}} about {{math|f}} ", "{{math|g}} composed with {{math|f}} ", "{{math|g}} after {{math|f}} ", "{{math|g}} following {{math|f}} ", "{{math|g}} of {{math|f}}", or "{{math|g}} on {{math|f}} ". Intuitively, composing two functions is a chaining process in which the output of the inner function becomes the input of the outer function. The composition of functions is a special case of the composition of relations, so all properties of the latter are true of composition of functions.[2] The composition of functions has some additional properties. Examples
{{math|1=(f ∘ g)(x) = f(g(x)) = f(x3) = 2x3 + 4}}, and {{math|1=(g ∘ f)(x) = g(f(x)) = g(2x + 4) = (2x + 4)3}}.
PropertiesThe composition of functions is always associative—a property inherited from the composition of relations.[2] That is, if {{math|f}}, {{math|g}}, and {{math|h}} are three functions with suitably chosen domains and codomains, then {{math|1=f ∘ (g ∘ h) = (f ∘ g) ∘ h}}, where the parentheses serve to indicate that composition is to be performed first for the parenthesized functions. Since there is no distinction between the choices of placement of parentheses, they may be left off without causing any ambiguity. In a strict sense, the composition {{math|1=g ∘ f}} can be built only if {{math|f}}'s codomain equals {{math|g}}'s domain; in a wider sense it is sufficient that the former is a subset of the latter.[3] Moreover, it is often convenient to tacitly restrict {{math|f}}'s domain such that {{math|f}} produces only values in {{math|g}}'s domain; for example, the composition {{math|1=g ∘ f}} of the functions {{math|f : ℝ → (−∞,+9]}} defined by {{math|1=f(x) = 9 − x2}} and {{math|g : [0,+∞) → ℝ}} defined by {{math|1=g(x) = {{radic|x}}}} can be defined on the interval {{math|[−3,+3]}}. The functions {{math|g}} and {{math|f}} are said to commute with each other if {{math|1=g ∘ f = f ∘ g}}. Commutativity is a special property, attained only by particular functions, and often in special circumstances. For example, {{math|1={{abs|x}} + 3 = {{abs|x + 3}}}} only when {{math|x ≥ 0}}. The picture shows another example. The composition of one-to-one functions is always one-to-one. Similarly, the composition of two onto functions is always onto. It follows that composition of two bijections is also a bijection. The inverse function of a composition (assumed invertible) has the property that {{math|1=(f ∘ g)−1 = ( g−1 ∘ f −1)}}.[4] Derivatives of compositions involving differentiable functions can be found using the chain rule. Higher derivatives of such functions are given by Faà di Bruno's formula. Composition monoids{{main|Transformation monoid}}Suppose one has two (or more) functions {{math|f: X → X,}} {{math|g: X → X}} having the same domain and codomain; these are often called transformations. Then one can form chains of transformations composed together, such as {{math|f ∘ f ∘ g ∘ f}}. Such chains have the algebraic structure of a monoid, called a transformation monoid or (much more seldom) a composition monoid. In general, transformation monoids can have remarkably complicated structure. One particular notable example is the de Rham curve. The set of all functions {{math|f: X → X}} is called the full transformation semigroup[5] or symmetric semigroup[6] on {{math|X}}. (One can actually define two semigroups depending how one defines the semigroup operation as the left or right composition of functions.[7]) If the transformations are bijective (and thus invertible), then the set of all possible combinations of these functions forms a transformation group; and one says that the group is generated by these functions. A fundamental result in group theory, Cayley's theorem, essentially says that any group is in fact just a subgroup of a permutation group (up to isomorphism).[8] The set of all bijective functions {{math|f: X → X}} (called permutations) forms a group with respect to the composition operator. This is the symmetric group, also sometimes called the composition group. In the symmetric semigroup (of all transformations) one also finds a weaker, non-unique notion of inverse (called a pseudoinverse) because the symmetric semigroup is a regular semigroup.[9] Functional powers{{main|Iterated function}}If {{math|Y ⊆ X}}, then {{math|f: X→Y}} may compose with itself; this is sometimes denoted as {{math|f 2}}. That is: {{math|1=(f ∘ f)(x) = f(f(x)) = f 2(x)}} {{math|1=(f ∘ f ∘ f)(x) = f(f(f(x))) = f 3(x)}} {{math|1=(f ∘ f ∘ f ∘ f)(x) = f(f(f(f(x)))) = f 4(x)}} More generally, for any natural number {{math|n ≥ 2}}, the {{math|n}}th functional power can be defined inductively by {{math|1=f n = f ∘ f n−1 = f n−1 ∘ f}}. Repeated composition of such a function with itself is called iterated function.
Note: If {{math|f}} takes its values in a ring (in particular for real or complex-valued {{math|f }}), there is a risk of confusion, as {{math|f n}} could also stand for the {{math|n}}-fold product of {{math|f}}, e.g. {{math|1=f 2(x) = f(x) · f(x)}}. For trigonometric functions, usually the latter is meant, at least for positive exponents. For example, in trigonometry, this superscript notation represents standard exponentiation when used with trigonometric functions: {{math|1=sin2(x) = sin(x) · sin(x)}}.However, for negative exponents (especially −1), it nevertheless usually refers to the inverse function, e.g., {{math|1=tan−1 = arctan ≠ 1/tan}}. In some cases, when, for a given function {{math|f}}, the equation {{math|1=g ∘ g = f}} has a unique solution {{math|g}}, that function can be defined as the functional square root of {{math|f}}, then written as {{math|1=g = f 1/2}}. More generally, when {{math|1=gn = f}} has a unique solution for some natural number {{math|n > 0}}, then {{math|f m/n}} can be defined as {{math|gm}}. Under additional restrictions, this idea can be generalized so that the iteration count becomes a continuous parameter; in this case, such a system is called a flow, specified through solutions of Schröder's equation. Iterated functions and flows occur naturally in the study of fractals and dynamical systems. To avoid ambiguity, some mathematicians choose to write {{math|f °n}} for the n-th iterate of the function {{mvar|f}}. Alternative notationsMany mathematicians, particularly in group theory, omit the composition symbol, writing {{math|gf}} for {{math|g ∘ f}}.[10] In the mid-20th century, some mathematicians decided that writing "{{math|g ∘ f }}" to mean "first apply {{math|f}}, then apply {{math|g}}" was too confusing and decided to change notations. They write "{{math|xf }}" for "{{math|f(x)}}" and "{{math|(xf)g}}" for "{{math|g(f(x))}}".[11] This can be more natural and seem simpler than writing functions on the left in some areas – in linear algebra, for instance, when {{math|x}} is a row vector and {{math|f}} and {{math|g}} denote matrices and the composition is by matrix multiplication. This alternative notation is called postfix notation. The order is important because function composition is not necessarily commutative (e.g matrix multiplication). Successive transformations applying and composing to the right agrees with the left-to-right reading sequence. Mathematicians who use postfix notation may write "{{math|fg}}", meaning first apply {{math|f}} and then apply {{math|g}}, in keeping with the order the symbols occur in postfix notation, thus making the notation "{{math|fg}}" ambiguous. Computer scientists may write "{{math|f ; g}}" for this,[12] thereby disambiguating the order of composition. To distinguish the left composition operator from a text semicolon, in the Z notation the ⨾ character is used for left relation composition.[13] Since all functions are binary relations, it is correct to use the [fat] semicolon for function composition as well (see the article on composition of relations for further details on this notation). Composition operator{{main|Composition operator}}Given a function {{math|g}}, the composition operator {{math|Cg}} is defined as that operator which maps functions to functions as Composition operators are studied in the field of operator theory. In programming languages{{main|Function composition (computer science)}}Function composition appears in one form or another in numerous programming languages. Multivariate functionsPartial composition is possible for multivariate functions. The function resulting when some argument {{math|xi}} of the function {{math|f}} is replaced by the function {{math|g}} is called a composition of {{math|f}} and {{math|g}} in some computer engineering contexts, and is denoted {{math|1=f {{!}}xi = g}} When {{math|g}} is a simple constant {{math|b}}, composition degenerates into a (partial) valuation, whose result is also known as restriction or co-factor.[14] In general, the composition of multivariate functions may involve several other functions as arguments, as in the definition of primitive recursive function. Given {{math|f}}, a {{math|n}}-ary function, and {{math|n}} {{math|m}}-ary functions {{math|g1, ..., gn}}, the composition of {{math|f}} with {{math|g1, ..., gn}}, is the {{math|m}}-ary function . This is sometimes called the generalized composite of f with {{math|g1, ..., gn}}.[15] The partial composition in only one argument mentioned previously can be instantiated from this more general scheme by setting all argument functions except one to be suitably chosen projection functions. Note also that {{math|g1, ..., gn}} can be seen as a single vector/tuple-valued function in this generalized scheme, in which case this is precisely the standard definition of function composition.[16] A set of finitary operations on some base set X is called a clone if it contains all projections and is closed under generalized composition. Note that a clone generally contains operations of various arities.[15] The notion of commutation also finds an interesting generalization in the multivariate case; a function f of arity n is said to commute with a function g of arity m if f is a homomorphism preserving g, and vice versa i.e.:[17] . A unary operation always commutes with itself, but this is not necessarily the case for a binary (or higher arity) operation. A binary (or higher arity) operation that commutes with itself is called medial or entropic.[17] GeneralizationsComposition can be generalized to arbitrary binary relations. If {{math|R ⊆ X × Y}} and {{math|S ⊆ Y × Z}} are two binary relations, then their composition {{math|S∘R}} is the relation defined as {{math|{(x, z) ∈ X × Z : ∃y ∈ Y. (x, y) ∈ R ∧ (y, z) ∈ S}{{void}}}}. Considering a function as a special case of a binary relation (namely functional relations), function composition satisfies the definition for relation composition. The composition is defined in the same way for partial functions and Cayley's theorem has its analogue called the Wagner-Preston theorem.[18] The category of sets with functions as morphisms is the prototypical category. The axioms of a category are in fact inspired from the properties (and also the definition) of function composition.[19] The structures given by composition are axiomatized and generalized in category theory with the concept of morphism as the category-theoretical replacement of functions. The reversed order of composition in the formula {{math|1=(f ∘ g)−1 = (g−1 ∘ f −1)}} applies for composition of relations using converse relations, and thus in group theory. These structures form dagger categories. TypographyThe composition symbol {{math|∘ }} is encoded as {{unichar|2218|ring operator|html=}}; see the Degree symbol article for similar-appearing Unicode characters. In TeX, it is written See also
Notes1. ^Some authors use {{math|f ∘ g : X → Z}}, defined by {{math|1=(f ∘ g )(x) = g(f(x))}} instead. This is common when a postfix notation is used, especially if functions are represented by exponents, as, for instance, in the study of group actions. See {{citation|first1=John D.|last1=Dixon|first2=Brian|last2=Mortimer|title=Permutation groups|year=1996|publisher=Springer|isbn=0-387-94599-7|page=5}} 2. ^1 {{cite book|author=Daniel J. Velleman|title=How to Prove It: A Structured Approach|url=https://books.google.com/books?id=sXt-ROLLNHcC&pg=PA232|year=2006|publisher=Cambridge University Press|isbn=978-1-139-45097-3|page=232}} 3. ^The strict sense is used, e.g., in category theory, where a subset relation is modelled explicitly by an inclusion function. 4. ^{{cite book|author=Nancy Rodgers|title=Learning to Reason: An Introduction to Logic, Sets, and Relations|year=2000|publisher=John Wiley & Sons|isbn=978-0-471-37122-9|pages=359–362|url=https://books.google.com/books?id=NuN2Iyqzqp4C&printsec=frontcover#v=onepage&q=composition&f=false}} 5. ^{{cite book|author=Christopher Hollings|title=Mathematics across the Iron Curtain: A History of the Algebraic Theory of Semigroups|url=https://books.google.com/books?id=O9wJBAAAQBAJ&pg=PA334|year=2014|publisher=American Mathematical Society|isbn=978-1-4704-1493-1|page=334}} 6. ^{{cite book|author=Pierre A. Grillet|title=Semigroups: An Introduction to the Structure Theory|url=https://books.google.com/books?id=yM544W1N2UUC&pg=PA2|year=1995|publisher=CRC Press|isbn=978-0-8247-9662-4|page=2}} 7. ^{{cite book|author1=Pál Dömösi|author2=Chrystopher L. Nehaniv|title=Algebraic Theory of Automata Networks: A Introduction|url=https://books.google.com/books?id=W0i5nfQLOGIC&pg=PA8|year=2005|publisher=SIAM|isbn=978-0-89871-569-9|pages=8}} 8. ^{{cite book|author=Nathan Carter|title=Visual Group Theory|url=https://books.google.com/books?id=T_o0CnMZecMC&pg=PA95|date=9 April 2009|publisher=MAA|isbn=978-0-88385-757-1|page=95}} 9. ^{{cite book|author1=Olexandr Ganyushkin|author2=Volodymyr Mazorchuk|title=Classical Finite Transformation Semigroups: An Introduction|url=https://books.google.com/books?id=LC3jxfGEcpYC&pg=PA24|year=2008|publisher=Springer Science & Business Media|isbn=978-1-84800-281-4|page=24}} 10. ^{{cite book|author=Oleg A. Ivanov|title=Making Mathematics Come to Life: A Guide for Teachers and Students|url=https://books.google.com/books?id=z7EHBAAAQBAJ&pg=PA217|date=1 January 2009|publisher=American Mathematical Soc.|isbn=978-0-8218-4808-1|pages=217–}} 11. ^{{cite book|author=Jean Gallier|authorlink= Jean Gallier |title=Discrete Mathematics|url=https://books.google.com/books?id=HXSjIP0OgCUC&pg=PA118|year=2011|publisher=Springer |isbn=978-1-4419-8047-2|page=118}} 12. ^{{cite book|author1=Michael Barr|author2=Charles Wells|title=Category Theory for Computing Science|url=http://www.math.mcgill.ca/triples/Barr-Wells-ctcs.pdf|year=1998|page=6}} This is the updated and free version of book originally published by Prentice Hall in 1990 as {{isbn|978-0-13-120486-7}}. 13. ^ISO/IEC 13568:2002(E), p. 23 14. ^{{cite journal |author=Bryant, R.E. |title=Logic Minimization Algorithms for VLSI Synthesis |journal=IEEE Transactions on Computers|volume=C-35 |issue=8|date=August 1986 |pages=677–691 |doi=10.1109/tc.1986.1676819 |url=http://www.cs.cmu.edu/~bryant/pubdir/ieeetc86.pdf}} 15. ^1 {{cite book|author=Clifford Bergman|title=Universal Algebra: Fundamentals and Selected Topics|url=https://books.google.com/books?id=QXi3BZWoMRwC&pg=PA79|year=2011|publisher=CRC Press|isbn=978-1-4398-5129-6|pages=79–80}} 16. ^{{cite book|author=George Tourlakis|title=Theory of Computation|url=https://books.google.com/books?id=zy3M24m5cykC&pg=PA100|year=2012|publisher=John Wiley & Sons|isbn=978-1-118-31533-0|page=100}} 17. ^1 {{cite book|author=Clifford Bergman|title=Universal Algebra: Fundamentals and Selected Topics|url=https://books.google.com/books?id=QXi3BZWoMRwC&pg=PA90|year=2011|publisher=CRC Press|isbn=978-1-4398-5129-6|pages=90–91}} 18. ^S. Lipscomb, "Symmetric Inverse Semigroups", AMS Mathematical Surveys and Monographs (1997), {{isbn|0-8218-0627-0}}, p. xv 19. ^{{cite book|author1=Peter Hilton|author2=Yel-Chiang Wu|title=A Course in Modern Algebra|url=https://books.google.com/books?id=ua5gKZt3R6AC&pg=PA65|year=1989|publisher=John Wiley & Sons|isbn=978-0-471-50405-4|page=65}} References{{Reflist|30em}}External links
3 : Functions and mappings|Basic concepts in set theory|Binary operations |
随便看 |
|
开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。