I just started reading the book Lambda-Calculus and Combinators An Introduction. Using this definition of Substitution in Page 7.

I want to prove that if $M$ is any term $[x/x] M \equiv M$. In the book it is given that proof follows by checking the clauses in the definition. I can't see any formal proof from that. I think that it requires induction on M. Any hints?
I am pasting the answer which Aleš Bizjac left in a comment.