Does a non-invertible matrix A exist where some power of A is the identity matrix? [closed]

I believe this solution is right, feel free to correct me if I'm wrong.

My solution:

For $A$ to be non-invertible, it must be the case that $det(A) = 0$.

Then, $det(A^5)$ and $det(A^3)$ must also be $0$ since $det(XY) = det(X) \cdot det(Y)$.

The equation $A^5 - A^3 = I_3$ can be factored as $A^3(A^2 - I_3) = I_3$.

Hence, $det(A^3(A^2-I_3)) = det(I_3) = 1$.

Therefore, $det(A^3) \cdot det(A^2 - I_3) = 1$.

This implies that $det(A^3) \neq 0$.

This contradicts the statement that $det(A^3) = 0$.

Hence, such a matrix cannot exist.