**Inverse Functions –**

In mathematics a function, a, is said to be an inverse of another, b, if given the output of b a returns the input value given to b. Additionally, this must hold true for every element in the domain co-domain(range) of b. In other words, assuming x and y are constants, if b(x) = y and a(y) = x then the function a is said to be an inverse of the function b.

**Example of Inverse Function –**

Consider the functions a(x) = 5x + 2 and b(y) = (y-2)/5. Here function b is an inverse function of a. We can see this by inserting values into the functions. For example when x is 1 the output of a is a(1) = 5(1) + 2 = 7. Using this output as y in function b gives b(7) = (7-2)/5 = 1 which was the input value to function a.

**Properties of Inverse Functions –**

Two functions f and g are said to be inverses of each other if and only if:

- f and g are both one to one functions. One to One functions map each value in their domain to exactly one value in the co-domain(range). An example of a One to One function is f(x) = x
- The co-domain(range) of f is the domain of g and vice versa

**Note:** Some functions are only invertible for a set of specific values in their domain. In this case both the range and domain of the inverse function are restricted to only those values.

**Composite Functions –**

A composite function is a function whose input is another function. So, if we have two functions A(x), which maps elements from set B to set C, and D(x), which maps from set C to set E, then the composite of these two functions, written as *DoA*, is a function that maps elements from B to E i.e. DoA = D(A(x)).

For example consider the functions A(x) = 5x + 2 and B(x) = x + 1. The composite function *AoB* = A(B(x)) = 5(x+1) + 2.

**Properties of Composite Functions –**

Composite functions posses the following properties:

- Given the composite function
*fog*= f(g(x)) the co-domain of g must be a subset, i.e. proper or improper subset, of the domain of f - Composite functions are associative. Given the composite function
*a o b o c*the order of operation is irrelevant i.e. (a o b) o c = a o (b o c). - Composite functions are not commutative. So
*AoB*is not the same as*BoA*. Using the example A(x) = 5x + 2 and B(x) = x + 1*AoB*= A(B(x)) = 5(x+1) + 2 while*BoA*= B(A(x)) = (5x + 2) + 1.

Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.

## Recommended Posts:

- Scala | Function Composition
- Composition in Golang
- ARP, Reverse ARP(RARP), Inverse ARP (InARP), Proxy ARP and Gratuitous ARP
- Finding inverse of a matrix using Gauss - Jordan Method | Set 2
- Inverse of Matrix in R
- How to inverse a matrix using NumPy
- Mathematics | Unimodal functions and Bimodal functions
- Total Recursive Functions and Partial Recursive Functions in Automata
- Fruitful Functions and Void Functions in Julia
- Discrete Maths | Generating Functions-Introduction and Prerequisites
- PHP | startsWith() and endsWith() Functions
- Difference between decodeURIComponent() and decodeURI() functions in JavaScript
- How to use Array Reverse Sort Functions for Integer and Strings in Golang?
- Logarithmic and Power Functions in R Programming
- Perl - Difference between Functions and Subroutines
- Mathematics | Classes (Injective, surjective, Bijective) of Functions
- Representation of Boolean Functions
- Minimization of Boolean Functions
- Scala | Functions Call-by-Name
- Mathematics | Total number of possible functions

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.