. There exists a nondiagonal matrix $A\in \mathcal {M}_n (\mathbb{R}) $ s.t. $A^{k+1}=I_n $ and $I_n-A $ invertible? Let $k\in \mathbb {N} $. There exists a nondiagonal  matrix $A\in \mathcal {M}_n (\mathbb{R}) $ s.t. $A^{k+1}=I_n $ and  $I_n-A $ invertible?
 A: *

*If $k$ is odd, then you can always take $A = -I_n$ as in the other answer.

*If $k$ is even and $n$ is even too, then you can take the block matrix, where $B$ appears $n/2$ times:
$$A = \begin{pmatrix}
B & 0 & 0 &\dots & 0 \\
0 & B & 0 & \dots & 0 \\
\vdots & \ddots & \ddots & \ddots& \vdots \\
0 && 0 & B &0\\
0 & \dots & 0 & 0 & B  
\end{pmatrix},$$
and the rotation matrix $B$ is given by:
$$B = \begin{pmatrix} \cos\bigl(\frac{2\pi}{k+1)}\bigr) & \sin\bigl(\frac{2\pi}{k+1}\bigr) \\ -\sin\bigl(\frac{2\pi}{k+1}\bigr) & \cos\bigl(\frac{2\pi}{k+1}\bigr) \end{pmatrix}.$$
The eigenvalues of $A$ are all nonreal, hence $A-I_n$ is invertible.

*If $k$ is even and $n$ is odd, then $A$ must have a real eigenvalue $\lambda$, because its polynomial characteristic has odd degree (and every real-valued odd-degree polynomial has a real root). But then $\lambda^{k+1} = 1$, hence $\lambda = 1$. Therefore $A - I_n$ has $0$ as an eigenvalue and isn't invertible.

A: If $k $ is odd, you can take $A=-I $. So the answer in this case is yes.
If $k $ is even and $n$ is odd, then $A^{k+1} $ has a real eigenvalue $\lambda $ such that $\lambda ^{k+1}=1$. So $\lambda=1$, and so $0$ is an eigenvalue of $I-A $. So the answer in this case is no.
For $k$ even and and $n$ even, see the example in Najib's answer. 
