$A\in M_2(\mathbb{R}), \lambda \in \mathbb{R}$ such that $A^{2}-\lambda A+\lambda ^{2}I_{2}=O_2$, $A^{2018}=?$ $A\in M_2(\mathbb{R}), \lambda \in \mathbb{R}$ such that  $$A^{2}-\lambda A+\lambda ^{2}I_{2}=O_2$$
I need to find $A^{2018}$.
From that equation I know that $det(A)=\lambda^{2}$ and $tr(A)=\lambda$. 
Also I get $A^{2}=\lambda\cdot A-\lambda^{2} I$ 
How to continue ?

$$A^{2}-\lambda A+\lambda ^{2}I_{2}=O_2 \implies A^2=\lambda A-\lambda ^2 I \implies  A^3=-\lambda ^3 I$$
Note that $$2018=3(672)+2$$
Thus $$A^{2018} = (-\lambda ^3 I)^{672} A^2 =\lambda ^{2017} A -\lambda^{2018} I = \lambda ^{2017}( A -\lambda I)$$
