Let X be a $40\times40$ matrix such that $X^3 = 2I$. I want to show that $Y= X^2 -2X + 2I$ is invertible as well.
I tried working with the equations to see if I can get Y as a product of matrices that I thought would be invertible such as $X$ or $X-I$ or $X^2+X+I$ but I couldn't get anything.
I was also wondering if I can use properties of row and column spaces to approach this question. I know that $X$ is invertible so $det(X) \ne 0$ so the column vectors of $X$ are linearly independent and hence its rank is 40. Still I don't know how I can make use of this.
$$X^3-2I=0,$$therefore the eigenvalues $\lambda_j(X)$ of $X$ can be only the roots of the equation $z^3-2=0$. The eigenvalues $\mu_j(Y)$ of $Y=X^2-2X+2I$ have the form $\lambda_j^2-2\lambda_j+2$. You only need to show that $\mu_j(Y)$ can not be zero.
Second option: let us try to find the inverse of $Y$ directly. We will seek it in the form $Y^{-1} = aX^2+bX+cI$. Technically, $Y$ is a polynomial of $X$, so we can find its inverse as a series $\sum_{k\ge 0} a_kX^k$, but, as $X^3=2I$ we are left with only three possible powers of $X$.
Now write $$I= YY^{-1} =(X^2-2X+2I)(aX^2+bX+cI)=aX^4-2aX^3+2aX^2+bX^3-2bX^2+2bX+cX^2-2cX+2cI$$ $$=2aX-4aI+2aX^2+2bI-2bX^2+2bX+cX^2-2cX+2cI.$$ Group the terms at $I$,$X$, and $X^2$: $$I= X^2(2a-2b+c)+X(2a+2b-2c)+I(-4a+2b+2c).$$ Now solve the system $$-4a+2b+2c=1\\2a+2b-2c=0\\2a-2b+c=0.$$ It has a unique solution, therefore $Y^{-1}$ exists.