Direct sum and proof writing with equivalences Here's a small exercise I'm working on :

Let $E$ be a $\mathbb{K}$-vector space and $f\in\mathcal{L}(E)$ verifying $f^2-5f+6Id_E=0$.
Show that $E=\ker(f-2\mathrm{id}_E)\bigoplus \ker(f-3\mathrm{id}_E)$.

Here's a shorthand proof I'm trying to write :

Let $x\in E$ and $y\in \ker(f-2\mathrm{id}_E)$ ($y$ exists since $\ker(f-2\mathrm{id}_E))$ is a vector space, thus contains $0_E$).
$\begin{equation}
  \begin{split}
x-y\in \ker(f-3\mathrm{id}_E)
&\Leftrightarrow f(x-y)=3(x-y) \\
&\Leftrightarrow f(x)-f(y)=3x-3y \\
&\Leftrightarrow f(x)-2y=3x-3y \text{ (because $f(y)=2y$)}\\
&\Leftrightarrow y=3x-f(x)
\end{split}
\end{equation}$


Thus, $\forall x\in E, \exists!y\in \ker(f-2\mathrm{id}_E)$ such that $x-y\in \ker(f-3\mathrm{id}_E)$. Eventually $E=\ker(f-2\mathrm{id}_E)\bigoplus \ker(f-3\mathrm{id}_E)$.

This feels wrong because I've never used the property that $f^2-5f+6\mathrm{id}_E=0$.
Thus I suspect at least one of my equivalences above is false and should be a simple implication (this is backed up by less direct proof I've written that finds the necessary form of $y$, then I need the relation with $f$ to prove this form is a solution).
Unfortunately, I can't convince myself which one of these equivalences is a mistake.
Any hint ? Thanks in advance.
EDIT 1 : there was a typo at the start of the proof near the first $x-y$ (changed $\ker(f-2\mathrm{id}_E)$ into $\ker(f-3\mathrm{id}_E)$.
 A: Note that $f^2-5f+6\mathrm{id}_E=(f-3\mathrm{id}_E)(f-2\mathrm{id}_E)$.
You start incorrectly.
You assume $x\in E$ and $y\in\ker(f-\mathrm{id}_E)$. I do not see why you assume $y\in \ker(f-2\mathrm{id}_E)$.
What you have to prove is the equality of the sets $E$ and $\ker(f-2\mathrm{id}_E)\oplus\ker(f-3\mathrm{id}_E)$.
For that you have to (or can) prove

*

*$E\subseteq \ker(f-2\mathrm{id}_E)\oplus\ker(f-3\mathrm{id}_E)$ and


*$E\supseteq \ker(f-2\mathrm{id}_E)\oplus\ker(f-3\mathrm{id}_E)$.
To show the first implication you assume $x\in E$ and show that $x\in \ker(f-2\mathrm{id}_E)\oplus\ker(f-3\mathrm{id}_E)$.
So there is no second variable involved.
One implication is trivial. Which one?
For the nontrivial one use that $f^2-5f-\mathrm{id}_E=0$. This means that for every $x\in E$ we have $f(x)^2-5f(x)-6=0$. Now use the mentioned factorization.
A: Your proof works, let me write it more properly:
We know that if $F$ and $G$ are subspaces of $E$, then $E = F \oplus G$ if and only if for each $x \in E$ there exists a unique $y \in F$ such that $x-y \in G$. Thus, for each $x \in E$, define $y$ as $3x-f(x)$, and note that:

*

*$y \in \ker(f-2\operatorname{id}_E)$ because $f^2(x)-5f(x)+6x=0$ (since $f^2-5f+6\operatorname{id}_E=0$) implies that $$f(y) = 3f(x)-f^2(x) = 3f(x)+ \big(\!\!-5f(x)+6x\big) = 2y;$$

*$x-y \in \ker(f-3\operatorname{id}_E)$ because $$f(x-y) = f\big( f(x)-2x \big) = f^2(x)-2f(x) = \big(5f(x)-6x\big)-2f(x) = 3(x-y).$$
Thus, for each $x \in E$ there exists $y \in \ker(f-2\operatorname{id}_E)$ such that $x-y \in \ker(f-3\operatorname{id}_E)$. Now, it remains to prove the uniqueness, and that's it.
