Function composition

In mathematics, function composition is a way of making a new function from two other functions through a chain-like process.

Function composition

In mathematics, function composition is a way of making a new function from two other functions through a chain-like process.

More specifically, given a function f from X to Y and a function g from Y to Z, then the function "g composed with f", written as g ∘ f, is a function from X to Z (notice how it is usually written in the opposite way to how people would expect it to be).

The value of f given the input x is written as f(x). The value of g ∘ f given the input x is written as (g ∘ f)(x), and is defined as g(f(x)).

As an example. let f be a function which doubles a number (multiplies it by 2), and let g be a function which subtracts 1 from a number. These two functions can be written as:

Here, g composed with f would be the function which doubles a number, and then subtracts 1 from it. That is:

On the other hand, f composed with g would be the function which subtracts 1 from a number, and then doubles it:

Composition of functions can also be generalized to binary relations, where it is sometimes represented using the same symbol (as in ).[1]

Properties

Function composition can be proven to be associative, which means that:[2]

However, function composition is in general not commutative, which means that:[3]

This can be also seen in the first example, where (g ∘ f)(2) = 2*2 - 1 = 3 and (f ∘ g)(2) = 2*(2-1) = 2.

References

  1. ↑ "Comprehensive List of Algebra Symbols". Math Vault. 2020-03-25. Retrieved 2020-08-28.
  2. ↑ Weisstein, Eric W. "Composition". mathworld.wolfram.com. Retrieved 2020-08-28.
  3. ↑ "3.4: Composition of Functions". Mathematics LibreTexts. 2020-01-16. Retrieved 2020-08-28.


Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.