Recover ordinary eigenvector from generalized eigenvector Given a square matrix $A$ with eigenvalue $\lambda$ with $v_2=(A-\lambda I)^2 v_1$, where $(A-\lambda I)v_1=0$. Can I recover $v_1$ as the following:
$v_1=(A-\lambda I)^{-2} v_2$?
In other words, is $(A-\lambda I)$ definitely invertible?

A generalized eigenvector is not characterized in the way you describe. Rather, if $v$ is a generalized eigenvector, it satisfies $(A-\lambda I)^k v = 0$ for some $k$, and therefore $(A - \lambda I)^{k-1} v$ will be an eigenvector of $A$ for the same value of $k$. So if you have a generalized eigenvector to the eigenvalue $\lambda$, it's very easy to recover an actual eigenvector: just keep multiplying by $(A-\lambda I)$ lots of times, and take the vector you get right before you get $0$.
In general, the generalized eigenvectors to the eigenvalue $\lambda$ have a basis $v_1, \dots, v_n$ that fits into the picture
\begin{align}
     v_1 \xrightarrow{A - \lambda I} v_2 \xrightarrow{A - \lambda I}  \dots &\xrightarrow{A - \lambda I} v_{n_1} \xrightarrow{A - \lambda I} 0 \\
         v_{n_1+1} \xrightarrow{A - \lambda I} v_{n_1+2} \xrightarrow{A - \lambda I}  \dots &\xrightarrow{A - \lambda I} v_{n_2} \xrightarrow{A - \lambda I} 0 \\
     v_{n_2+1} \xrightarrow{A - \lambda I} v_{n_2+2} \xrightarrow{A - \lambda I}  \dots &\xrightarrow{A - \lambda I} v_{n_3} \xrightarrow{A - \lambda I} 0 \\
 & \vdots \\
     v_{n_{k-1}+1} \xrightarrow{A - \lambda I} v_{n_{k-1}+2} \xrightarrow{A - \lambda I}  \dots &\xrightarrow{A - \lambda I} v_{n_k} \xrightarrow{A - \lambda I} 0 
\end{align}
for some $n_1 < n_2 < \dots < n_k = n$. Here, $v_{n_1}, v_{n_2}, \dots, v_{n_k}$ are the eigenvectors, and the other $v_i$ are the generalized eigenvectors.
