A function is called identity function if its domain and range is set of real numbers i.e f:R–>R and is defined as f(x)=x.
Further, in the below image you can see for every value of x , f(x) has the same value. In the graph, you can see a straight which passes through origin.
Watch video-