Error in the book? Or wrong logic? In the book "Elementary linear algebra with supplemental applications", 11th edition, page 81,task 127, the following task appears: 

Show that if $A$ is a square matrix such that $A^K=0$ for some positive integer $K$, then the matrix $A$ is invertible and the inverse of the matrix $(I-A)$ is equal to $I + A + A^2 + ... + A^{K-1}$.

I have no difficulty in arriving at the identity given that $A^K = 0$, however I think there is something wrong here... Consider the following: 
Let $A$ be a square matrix not equal to 0, such that $A^K=0$ for some nonnegative integer $K \ge 2$, and assume for contradiction that $A^{-1}$ exists. Then we can deduce the following:
$$A^K=0 \implies A^K A^{-1}=0 \implies A^{K-1} A A^{-1} = 0 \implies A^{K-1} I = 0$$
and we are left with $A^{K-1} = 0$.
Thus, $A^K=0 \implies A^{K-1} = 0$, and using the same logic (multiplying by $A^{-1}$), we deduce $A^K=0 \implies A^{K-1} = 0 \implies \cdots \implies A^2 = 0 \implies A = 0$, a contradiction. Thus, the three statements "$A$ does not equal $0$", "$A^{-1}$ exists" and "$A^K=0$ for some nonnegative integer $K$ greater than or equal to $2$" cannot all be true at the same time. And thus the task in the book is inncorrect since it states that $A^{-1}$ exists.
Is the book wrong, or is there something wrong with my use of logic here? :) 

If $A^k=O$ then $A^{-1}$ does not exist. I believe the author intended to say $I-A$ is invertible.
