Why $A-I $ invertible implies $ I + A + A^2 + \cdots + A^{k-1} = 0 $ Let $A$ be a square complex matrix such that $1$ is not an eigenvalue of $A$ and $A^k=I_n$ for some positive integer $k$. I want to show that $$
I + A + A^2 + \cdots + A^{k-1} = 0
$$.
I was reading an answer but I do not understand the last step. I understand why $A-I$ is invertible but how does it help me in arriving at the conclusion.
Here is the solution I am reading:
If $A^k = I$, then we have $A^k - I = 0$.  Factoring, we have
$$
(A - I)(I + A + A^2 + \cdots + A^{k-1}) = 0
$$
Since $1$ is not an eigenvalue, $A-I$ is invertible so that
$$
I + A + A^2 + \cdots + A^{k-1} = 0
$$
Edit: Added detail.
Thanks.

Since $(A - I)(I + A + A^2 + \cdots + A^{k-1})=0$ and $A-I$ is invertible, by composing by the inverse $(A-I)^{-1}$ of $A-I$, we have:
$(A-I)^{-1}(A - I)(I + A + A^2 + \cdots + A^{k-1}) = I + A + A^2 + \cdots + A^{k-1}=0$
