# Abstract math question: bijectivity on finite and infinite sets?

Supposed that A is a finite set, f: A --> A and g: A --> A. Supposed in addition that f o g: A --> A is a bijection. Prove that f and g are both bijections.

Give an explicit example to show that the conclusions of the previous problem is false if A is an infinite set. In other words, if A is an infinite set, f: A --> A and g: A --> A are functions and f o g: A --> A is a bijection it is not necessarily the case that f and g are both bijections.