Having trouble getting started with a proof involving functions The proof looks like this: 

Suppose that a function $f(x) = ax + b$ is its own inverse, meaning that $f^{-1}(x) = ax + b$ also. Prove that we must have either have $a = -1$ or $a = 1, b = 0$.

From my current knowledge on the subject, I know that the inverse of a function is really just mapping the arrows backward and in some cases, it can mean that its inverse is not necessarily a function. However, this proof has me lost and confused and hints + explanations would be absolutely amazing!
Until then I will continue pounding away at the proof trying different techniques but as of right now I am really quite lost
Thanks again!
 A: Hint: You may use that $x=f^{-1}(f(x))$. This gives you (hope not too much of a spoiler) $$x=f^{-1}(f(x))=(af(x)+b)=a(ax+b)+b$$ which implies that $x=a^2x+ab+b$ or equivalently $b(a+1)+(a^2-1)x=0$ for all $x\in\mathbb R$.

Edit: It is given that $f^{-1}(\color{blue} x)=a\color{blue}x+b$. So, $$f^{-1}(\color{blue}{f(x)})=a\color{blue}{f(x)}+b$$ What is $f(x)$? You know that $f(x)=ax+b$. So plug it in the RHS of the last equation $$f^{-1}(\color{blue}{f(x)})=a\color{blue}{(ax+b)}+b$$
Now, in the LHS $f^{-1}$ and $f$ cancel out to leave you only with $x$, so you have $$x=a(ax+b)+b$$ The rest is algebra, meaning that you have to group now terms together to obtain the solution. Just note that this holds for any $x\in\mathbb R$, you may choose. For instance, you may choose $x=0$ or $x=1$ and the last equation must hold.
A: If $y=f(x)=ax+b$, $f^{-1}(x)$ can be found by interchanging $x$ and $y$ (and solving for y).  So write $x=ay+b$.  Then $y=\frac1a\cdot (x-b)$.  So $f^{-1}(x)=\frac 1a\cdot (x-b)$. 
Next, if $f(x)=f^{-1}(x)$, we get $ax+b=\frac1a\cdot (x-b)$.  Then $(a^2-1)x+ab+b=0$.  So $a^2-1=0$ and $ab+b=0$.  So $a^2=1\implies a=\pm1$ and $b(a+1)=0\implies b=0\lor a=-1$.
A: involutory function, is a function f that is its own inverse, means
f(f(x)) = x for all x in the domain of f.
For example 
f(x)= 3x-2 and g(x)=(x+2)/3 are inverse of each other 
