(f o g) (x) = xand

(g o f) (x) = x

then both f(x) and g(x) are inverses of each other.

For example, given two functions

f(x) = 5x + 2

g(x) = (x - 2)/5Then (f o g)(x) and (g o f)(x) can be found out,

(f o g)(x) = f(g(x)) = f( (x - 2)/5 )

= 5((x - 2)/5) + 2

= x - 2 + 2

= xSo (f o g)(x) = x. Now calculate (g o f)(x),

(g o f)(x) = g(f(x)) = g(5x + 2)

= ((5x + 2) - 2)/5

= (5x + 2 - 2) / 5

= 5x / 5

= xThus (g o f)(x) = x, and (f o g)(x) = x. Thus f(x) and g(x) are inverse functions.