To solve this we first make the observation that if
then
is invertible and
if and only if
. Indeed, clearly if
the result follows. Conversely, the conclusion follows by noticing that since
that
from where the conclusion follows.
So, with this observation let
. Then, since
we see that
. Note though that by assumption of the problem and the above observation we have that
. But, by the Pigeon Hole principle we know that
takes the value either
or
at least three times on
. But, since
this implies that
is constant and
or
. Thus, by our observation we may conclude that
is invertible and
for every
.