Solution (source code)

= Solution

If every <eigenvalue> is nonzero, define $B=\sum_n\lambda_n^{-1}P_n$, where $P_n=\mathbf e_n\mathbf e_n^{\mathsf T}$. Using the mutually <orthogonal projection> identity $P_nP_m=\delta_{nm}P_n$,
$$
AB=\sum_{n,m}\frac{\lambda_n}{\lambda_m}P_nP_m=\sum_nP_n=I.
$$
The same calculation gives $BA=I$. Thus the <matrix inverse> is
$$
\boxed{A^{-1}=\sum_{n=1}^N\frac1{\lambda_n}\mathbf e_n\mathbf e_n^{\mathsf T}.}
$$