Let V be a non trivial vector space s.t. $dim V = n$ over $\mathbb{C}$. also let $T:V\to V$ be a linear transformation over $\mathbb{C}$.
now we shall define A = $\mathbb{C} [x]$ to be the polynomials algebra. such that $V$ is a module of $A$ given by the following action: for every $a = f(x) \in A , v\in V$ we define $a* v = f(T)(v)$. now suppose that $T$ is diagonalizable matrix and $\lambda_1,...,\lambda_k$ are it's different eigenvalues and $n_1,...,n_k$ are it's multiplicity.
prove that $End_A(V) \cong \bigoplus_{j=1}^{k} M_{n_j} (\mathbb{C})$ as algebras (where $M_{n}(\mathbb{C})$ is the $n \times n$ matrix algebra)
Pick a basis of eigenvectors for $T$ : let's call it $B=\{v_1 \dots v_n\}$, such that $v_j$ has eigenvalue $\lambda_i$ for every $n_i < i \leq n_{i+1}$.
Now you can write $T$ in this basis ,getting $S \in M(n,\mathbb{C})$ and define a structure of $A$-module on $\mathbb{C}^n$ as $xv=Sv$. I'm not gonna write down the complete proof, but you can chech that the "writing in $B$ basis" isomorphism between $End_{\mathbb{C}}(V) $ and $M(n,\mathbb{C})$ restricts to an isomorphism of algebras between $End_{A}(V) $ and $End_A(\mathbb{C}^n) \subset M(n,\mathbb{C}).$
I've reduced to matrix case to make things clearer (at least I hope): now checking that a matrix $C \in M(n,\mathbb{C})$ defines an $A$-endomorphism means that $$C(xv)=x(Cv)$$ for every $v \in \mathbb{C}^n$ which turns out to be equivalent to $$CS=SC .$$
Now, $S$ is a block diagonal matrix with blocks given by scalar multiples of the identity of dimensions $n_1, \dots n_k$. It's a linear algebra fact that the space of matrix that commutes with such a matrix is made by all block diagonal matrix with block given by scalar multiples of the identity of the previous dimensions and so you get the isomorphism .