Let y=f(x)=2x, then log2(y)=x, and we can write x=g(y)=log2(y). Therefore g(x)=log2(x) because x is merely a placeholder in defining the function. g(x)=f-1(x), because g(f(x))=f(g(x))=x:
g(f(x))=g(2x)=log2(2x)=x, and f(g(x))=f(log2(x))=2log₂(x)=x.
To use the graph of f(x)=2x we simply use the horizontal axis as the vertical axis and vice versa. Alternatively, rotate the graph through 90 degrees and reflect the horizontal axis in the vertical axis to obtain the normal x-y view.